Extensions
The following extensions are available globally.
-
Declaration
Swift
extension Array
-
Declaration
Swift
extension Sequence
-
Declaration
Swift
extension Set
-
Swift’s Optional comes with built-in methods that allow to fetch cursors and arrays of optional DatabaseValueConvertible:
try Optional<String>.fetchCursor(db, sql: "SELECT name FROM ...", arguments:...) // Cursor of String? try Optional<String>.fetchAll(db, sql: "SELECT name FROM ...", arguments:...) // [String?] let statement = try db.makeSelectStatement(sql: "SELECT name FROM ...") try Optional<String>.fetchCursor(statement, arguments:...) // Cursor of String? try Optional<String>.fetchAll(statement, arguments:...) // [String?]
DatabaseValueConvertible is adopted by Bool, Int, String, etc.
See moreDeclaration
Swift
extension Optional where Wrapped: DatabaseValueConvertible
-
Declaration
Swift
extension Collection where Element == SQLLiteral
-
CGFloat adopts DatabaseValueConvertible
See moreDeclaration
Swift
extension CGFloat: DatabaseValueConvertible
-
Data is convertible to and from DatabaseValue.
See moreDeclaration
Swift
extension Data: DatabaseValueConvertible, StatementColumnConvertible
-
NSDate is stored in the database using the format
See moreyyyy-MM-dd HH:mm:ss.SSS
, in the UTC time zone.Declaration
Swift
extension NSDate: DatabaseValueConvertible
-
Date is stored in the database using the format
See moreyyyy-MM-dd HH:mm:ss.SSS
, in the UTC time zone.Declaration
Swift
extension Date: DatabaseValueConvertible
-
NSData is convertible to and from DatabaseValue.
See moreDeclaration
Swift
extension NSData: DatabaseValueConvertible
-
NSNull adopts DatabaseValueConvertible
See moreDeclaration
Swift
extension NSNull: DatabaseValueConvertible
-
NSNumber adopts DatabaseValueConvertible
See moreDeclaration
Swift
extension NSNumber: DatabaseValueConvertible
-
NSString adopts DatabaseValueConvertible
See moreDeclaration
Swift
extension NSString: DatabaseValueConvertible
-
NSURL stores its absoluteString in the database.
See moreDeclaration
Swift
extension NSURL: DatabaseValueConvertible
-
NSUUID adopts DatabaseValueConvertible
See moreDeclaration
Swift
extension NSUUID: DatabaseValueConvertible
-
UUID adopts DatabaseValueConvertible
See moreDeclaration
Swift
extension UUID: DatabaseValueConvertible
-
Bool adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Bool: DatabaseValueConvertible, StatementColumnConvertible
-
Int adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Int: DatabaseValueConvertible, StatementColumnConvertible
-
Int8 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Int8: DatabaseValueConvertible, StatementColumnConvertible
-
Int16 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Int16: DatabaseValueConvertible, StatementColumnConvertible
-
Int32 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Int32: DatabaseValueConvertible, StatementColumnConvertible
-
Int64 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Int64: DatabaseValueConvertible, StatementColumnConvertible
-
UInt adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension UInt: DatabaseValueConvertible, StatementColumnConvertible
-
UInt8 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension UInt8: DatabaseValueConvertible, StatementColumnConvertible
-
UInt16 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension UInt16: DatabaseValueConvertible, StatementColumnConvertible
-
UInt32 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension UInt32: DatabaseValueConvertible, StatementColumnConvertible
-
UInt64 adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension UInt64: DatabaseValueConvertible, StatementColumnConvertible
-
Double adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Double: DatabaseValueConvertible, StatementColumnConvertible
-
Float adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension Float: DatabaseValueConvertible, StatementColumnConvertible
-
String adopts DatabaseValueConvertible and StatementColumnConvertible.
See moreDeclaration
Swift
extension String: DatabaseValueConvertible, StatementColumnConvertible
-
Declaration
Swift
extension TableRequest where Self: FilteredRequest
-
Declaration
Swift
extension JoinableRequest
-
Declaration
Swift
extension Range where Bound: SQLExpressible
-
Declaration
Swift
extension ClosedRange where Bound: SQLExpressible
-
Declaration
Swift
extension CountableRange where Bound: SQLExpressible
-
Declaration
Swift
extension CountableClosedRange where Bound: SQLExpressible