Skip to content

Commit 2ba9dc7

Browse files
committed
Update SQLiteAdapter.swift
1 parent 9a53f5e commit 2ba9dc7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Sources/SQLiteAdapter/SQLiteAdapter.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public typealias SQLValues = [(type: SQLType, value: Any?)]
4747

4848
open class SQLite {
4949

50-
private var dbPointer: OpaquePointer?
50+
public private(set) var dbPointer: OpaquePointer?
5151

5252
private let SQLITE_STATIC = unsafeBitCast(0, to: sqlite3_destructor_type.self)
5353
private let SQLITE_TRANSIENT = unsafeBitCast(-1, to: sqlite3_destructor_type.self)
@@ -86,6 +86,12 @@ open class SQLite {
8686
}
8787
}
8888

89+
private func log(_ str: String) {
90+
#if DEBUG
91+
print("SQLite: \(str)")
92+
#endif
93+
}
94+
8995
private func getErrorMessage(dbPointer: OpaquePointer?) -> String {
9096
if let errorPointer = sqlite3_errmsg(dbPointer) {
9197
let errorMessage = String(cString: errorPointer)
@@ -94,12 +100,6 @@ open class SQLite {
94100
return "SQLite error"
95101
}
96102

97-
private func log(_ str: String) {
98-
#if DEBUG
99-
print("SQLite: \(str)")
100-
#endif
101-
}
102-
103103
private func prepareStatement(sql: String) throws -> OpaquePointer? {
104104
var queryStatement: OpaquePointer?
105105
guard sqlite3_prepare_v2(dbPointer, sql, -1, &queryStatement, nil) == SQLITE_OK else {

0 commit comments

Comments
 (0)