CoreStatement
public final class CoreStatement: CoreRepresentable
CoreStatement for preparing or executing WINQ sql.
-
The tag of the related database.
Declaration
Swift
public var tag: Tag? -
The path of the related database.
Declaration
Swift
public var path: String -
The wrapper of
sqlite3_bind_*for binding property of object to index.Throws
ErrorDeclaration
Swift
public func bind<TableEncodableType: TableEncodable>( _ propertyConvertible: PropertyConvertible, of object: TableEncodableType, toIndex index: Int = 1) throwsParameters
propertyConvertiblePropertyorCodingTableKeyobjectTable encodable object
indexBegin with 1
-
The wrapper of
sqlite3_bind_*for binding properties of object to indexes.Throws
Begin with 1Declaration
Swift
public func bind<TableEncodableType: TableEncodable>( _ indexedPropertyConvertibleList: [(_: PropertyConvertible, toIndex: Int)], of object: TableEncodableType) throwsParameters
indexedPropertyConvertibleListIndexed
PropertyorCodingTableKeylistobjectTable encodable object
-
The wrapper of
sqlite3_bind_*for binding properties of object.Throws
Begin with 1Declaration
Swift
public func bind<TableEncodableType: TableEncodable>( _ propertyConvertibleList: [PropertyConvertible], of object: TableEncodableType) throwsParameters
propertyConvertibleListPropertyorCodingTableKeylistobjectTable encodable object
-
The wrapper of
sqlite3_bind_*for binding column encodable object.Declaration
Swift
public func bind(_ value: ColumnEncodableBase?, toIndex index: Int)Parameters
valueColumn encodable object
indexBegin with 1
-
The wrapper of
sqlite3_column_*for getting column decodable value.Declaration
Swift
public func value(atIndex index: Int, of type: ColumnDecodableBase.Type) -> ColumnDecodableBase?Parameters
indexBegin with 0
typeType of column codable object
Return Value
Same as type
-
The wrapper of
sqlite3_column_*for getting column decodable value.Declaration
Swift
public func value<ColumnDecodableType: ColumnDecodable>( atIndex index: Int, of type: ColumnDecodableType.Type = ColumnDecodableType.self) -> ColumnDecodableType?Parameters
indexBegin with 0
typeType of column codable object
Return Value
Same as type
-
The wrapper of
sqlite3_column_*for getting fundamentable value.Declaration
Swift
public func value(atIndex index: Int) -> FundamentalValueParameters
indexBegin with 0
Return Value
Int32,Int64,Double,String,Dataornilvalue. -
The wrapper of
sqlite3_column_*for getting column decodable value.Declaration
Swift
public func value<ColumnDecodableType: ColumnDecodable>( byName name: String, of type: ColumnDecodableType.Type = ColumnDecodableType.self) -> ColumnDecodableType?Parameters
nameName of the column
typeType of column codable object
Return Value
Same as type. Nil will be returned if no such a column.
-
Get index by column name.
Declaration
Swift
public func index(byName name: String) -> Int?Parameters
nameName of the column
Return Value
Index of given column name. Nil will be returned if no such a column.
-
The wrapper of
sqlite3_stepThrows
ErrorDeclaration
Swift
public func step() throws -> BoolReturn Value
True means you can continue stepping while false means the stepping has been completed.
-
The wrapper of
sqlite3_resetThrows
ErrorDeclaration
Swift
public func reset() throws -
The wrapper of
sqlite3_column_typeDeclaration
Swift
public func columnType(atIndex index: Int) -> ColumnTypeParameters
indexBegin with 0
Return Value
Type of the column
-
The wrapper of
sqlite3_column_typeDeclaration
Swift
public func columnType(byName name: String) -> ColumnTypeParameters
nameName of the column
Return Value
Column type. For a non-exists column,
.nullwill be returned. -
The wrapper of
sqlite3_column_count.Declaration
Swift
public func columnCount() -> IntReturn Value
Count of column result
-
The wrapper of
sqlite3_column_name.Declaration
Swift
public func columnName(atIndex index: Int) -> StringParameters
indexBegin with 0
Return Value
Column name
-
The wrapper of
sqlite3_column_table_name.Declaration
Swift
public func columnTableName(atIndex index: Int) -> StringParameters
indexBegin with 0
Return Value
The related table of column at index
-
The wrapper of
sqlite3_finalizeThrows
ErrorDeclaration
Swift
public func finalize() throws -
The number of changed rows in the most recent call.
It should be called after executing successfullyDeclaration
Swift
public var changes: Int -
The row id of most recent insertion.
Declaration
Swift
public var lastInsertedRowID: Int64
View on GitHub
Install in Dash
CoreStatement Class Reference