mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-27 04:14:21 +00:00
MetalType documentation
This commit is contained in:
1 parent
d61e59cf6f
commit
b28f855bd4
1 file changed
+15
-2
@@ -1,14 +1,27 @@
|
||||
/**
|
||||
TODO
|
||||
When a type adopts both DatabaseValueConvertible and MetalType, it is granted
|
||||
with faster access to the SQLite database values.
|
||||
*/
|
||||
public protocol MetalType {
|
||||
|
||||
/**
|
||||
Returns an instance initialized from a raw SQLite statement pointer.
|
||||
|
||||
As an example, here is the how Int64 adopts MetalType:
|
||||
|
||||
extension Int64: MetalType {
|
||||
public init(sqliteStatement: SQLiteStatement, index: Int32) {
|
||||
self = sqlite3_column_int64(sqliteStatement, index)
|
||||
}
|
||||
}
|
||||
|
||||
Implement this method in an optimistic mind: don't check for NULL, don't
|
||||
check for type mismatch.
|
||||
|
||||
See https://www.sqlite.org/c3ref/column_blob.html for more information.
|
||||
|
||||
- parameter sqliteStatement: A pointer to a SQLite statement.
|
||||
- parameter index: The column index.
|
||||
*/
|
||||
init(sqliteStatement: SQLiteStatement, index: Int32)
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user