Extensions
The following extensions are available globally.
-
Declaration
Swift
struct Array<Element> : RandomAccessCollection, MutableCollection
-
Declaration
Swift
protocol Sequence
-
Undocumented
See more
-
Undocumented
See more
-
Swift’s Optional comes with built-in methods that allow to fetch cursors and arrays of optional DatabaseValueConvertible:
try Optional<String>.fetchCursor(db, "SELECT name FROM ...", arguments:...) // DatabaseCursor<String?> try Optional<String>.fetchAll(db, "SELECT name FROM ...", arguments:...) // [String?] let statement = try db.makeSelectStatement("SELECT name FROM ...") try Optional<String>.fetchCursor(statement, arguments:...) // DatabaseCursor<String?> try Optional<String>.fetchAll(statement, arguments:...) // [String?]
DatabaseValueConvertible is adopted by Bool, Int, String, etc.
See moreDeclaration
Swift
enum Optional<Wrapped> : ExpressibleByNilLiteral
-
NSData is convertible to and from DatabaseValue.
See moreDeclaration
Swift
class NSData : NSObject, NSCopying, NSMutableCopying, NSSecureCoding
-
DatabaseValueConvertible is free for RawRepresentable types whose raw value is itself DatabaseValueConvertible.
See more// If the RawValue adopts DatabaseValueConvertible... enum Color : Int { case red case white case rose } // ... then the RawRepresentable type can freely adopt DatabaseValueConvertible: extension Color : DatabaseValueConvertible { /* empty */ }
Declaration
Swift
protocol RawRepresentable
-
DatabaseValueConvertible is free for ReferenceConvertible types whose ReferenceType is itself DatabaseValueConvertible.
See moreclass FooReference { ... } struct Foo : ReferenceConvertible { typealias ReferenceType = FooReference } // If the ReferenceType adopts DatabaseValueConvertible... extension FooReference : DatabaseValueConvertible { ... } // ... then the ReferenceConvertible type can freely adopt DatabaseValueConvertible: extension Foo : DatabaseValueConvertible { /* empty */ }
Declaration
Swift
protocol ReferenceConvertible : CustomStringConvertible, CustomDebugStringConvertible, Hashable, Equatable
-
Declaration
Swift
struct Range<Bound> where Bound : Comparable
-
Declaration
Swift
struct ClosedRange<Bound> where Bound : Comparable
-
Declaration
Swift
struct CountableRange<Bound> : RandomAccessCollection where Bound : Comparable, Bound : _Strideable, Bound.Stride : SignedInteger
-
Declaration
Swift
struct CountableClosedRange<Bound> : RandomAccessCollection where Bound : Comparable, Bound : _Strideable, Bound.Stride : SignedInteger
-
Bool adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
struct Bool
-
Int adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
struct Int : SignedInteger, Comparable, Equatable
-
Int32 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
struct Int32 : SignedInteger, Comparable, Equatable
-
Int64 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
struct Int64 : SignedInteger, Comparable, Equatable
-
Double adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
struct Double
-
Float adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
struct Float
-
String adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
struct String