Storage
A value stored in a database table, with its exact SQLite storage (NULL, INTEGER, REAL, TEXT, BLOB).
@frozen enum Storage
Related SQLite documentation: https://www.sqlite.org/datatype3.html#storage_classes_and_datatypes
A value stored in a database table, with its exact SQLite storage (NULL, INTEGER, REAL, TEXT, BLOB).
@frozen enum Storage
Related SQLite documentation: https://www.sqlite.org/datatype3.html#storage_classes_and_datatypes
import GRDB
A toolkit for SQLite databases, with a focus on application development
struct DatabaseValue
A value stored in a database table.
case null
The NULL storage class.
case int64(Int64)
The INTEGER storage class, wrapping an Int64.
case double(Double)
The REAL storage class, wrapping a Double.
case string(String)
The TEXT storage class, wrapping a String.
case blob(Data)
The BLOB storage class, wrapping Data.
var isNull: Bool { get }
A boolean value indicating is the database value is NULL
.
let storage: Storage
The SQLite storage.
init(sqliteStatement: SQLiteStatement, index: CInt)
Creates a DatabaseValue
initialized from a raw SQLite statement pointer.
init?(value: Any)
Creates a DatabaseValue
from any value.
static let null: DatabaseValue
The NULL DatabaseValue.
static func fromDatabaseValue(_ dbValue: DatabaseValue) -> DatabaseValue?
Returns the database value
var databaseValue: DatabaseValue { get }
Returns self
var description: String { get }
var sqlExpression: SQLExpression { get }
static func == (lhs: DatabaseValue, rhs: DatabaseValue) -> Bool
Returns whether two DatabaseValue
are equal.
func bind(to sqliteStatement: SQLiteStatement, at index: CInt) -> CInt
func hash(into hasher: inout Hasher)
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Sendable
var value: (any DatabaseValueConvertible)? { get }
Returns Int64
, Double
, String
, Data
or nil.
static func == (lhs: Self, rhs: Self) -> Bool
Return true if the storages are identical.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.