Skip to content

Commit ec408d5

Browse files
committed
Added dbPath property
1 parent bce88aa commit ec408d5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Sources/SQLiteAdapter/SQLiteAdapter.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public protocol SQLiteType {
7474
open class SQLite: SQLiteType {
7575

7676
public private(set) var dbPointer: OpaquePointer?
77+
public private(set) var dbPath: String!
7778

7879
private let SQLITE_STATIC = unsafeBitCast(0, to: sqlite3_destructor_type.self)
7980
private let SQLITE_TRANSIENT = unsafeBitCast(-1, to: sqlite3_destructor_type.self)
@@ -89,6 +90,7 @@ open class SQLite: SQLiteType {
8990

9091
if sqlite3_open(path, &db) == SQLITE_OK {
9192
dbPointer = db
93+
dbPath = path
9294
log("database opened successfully, path: \(path)")
9395
} else {
9496
defer {

0 commit comments

Comments
 (0)