DatabaseValue
public struct DatabaseValue : Hashable, CustomStringConvertible, DatabaseValueConvertible, SQLSpecificExpressible
extension DatabaseValue: StatementBinding
                DatabaseValue is the intermediate type between SQLite and your values.
- 
                  
                  
The SQLite storage
Declaration
Swift
public let storage: Storage - 
                  
                  
The NULL DatabaseValue.
Declaration
Swift
public static let null: DatabaseValue - 
                  
                  
An SQLite storage (NULL, INTEGER, REAL, TEXT, BLOB).
See moreDeclaration
Swift
@frozen public enum Storage : Equatable - 
                  
                  
Creates a DatabaseValue from Any.
The result is nil unless object adopts DatabaseValueConvertible.
Declaration
Swift
public init?(value: Any) 
- 
                  
                  
Returns true if databaseValue is NULL.
Declaration
Swift
public var isNull: Bool { get } 
- 
                  
                  
Declaration
Swift
public func bind(to sqliteStatement: SQLiteStatement, at index: CInt) -> CInt 
- 
                  
                  
Returns whether two DatabaseValues are equal.
1.databaseValue == "foo".databaseValue // false 1.databaseValue == 1.databaseValue // trueWhen comparing integers and doubles, the result is true if and only values are equal, and if converting one type to the other does not lose information:
1.databaseValue == 1.0.databaseValue // trueFor a comparison that distinguishes integer and doubles, compare storages instead:
1.databaseValue.storage == 1.0.databaseValue.storage // falseDeclaration
Swift
public static func == (lhs: DatabaseValue, rhs: DatabaseValue) -> Bool - 
                  
                  
Returns self
Declaration
Swift
public var databaseValue: DatabaseValue { get } - 
                  
                  
Returns the database value
Declaration
Swift
public static func fromDatabaseValue(_ dbValue: DatabaseValue) -> DatabaseValue? - 
                  
                  
Declaration
Swift
public var sqlExpression: SQLExpression { get } 
View on GitHub
Install in Dash
        DatabaseValue Structure Reference