Add unit tests
This commit is contained in:
parent
ddc47abdde
commit
bbb7f14650
38 changed files with 1040 additions and 515 deletions
|
|
@ -51,6 +51,19 @@ public final class Statement {
|
|||
// MARK: - StatementProtocol
|
||||
|
||||
extension Statement: StatementProtocol {
|
||||
public var sql: String? {
|
||||
let cSQL = sqlite3_sql(statement)
|
||||
guard let cSQL else { return nil }
|
||||
return String(cString: cSQL)
|
||||
}
|
||||
|
||||
public var expandedSQL: String? {
|
||||
let cSQL = sqlite3_expanded_sql(statement)
|
||||
defer { sqlite3_free(cSQL) }
|
||||
guard let cSQL else { return nil }
|
||||
return String(cString: cSQL)
|
||||
}
|
||||
|
||||
public func parameterCount() -> Int32 {
|
||||
sqlite3_bind_parameter_count(statement)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue