Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ let package = Package(
.define("SQLCIPHER_CRYPTO_LIBTOMCRYPT"),
//.unsafeFlags(["-Wno-shorten-64-to-32", "-Wno-ambiguous-macro"]), // enabled manually in libs
],
linkerSettings: [.linkedLibrary("log", .when(platforms: [.android]))],
plugins: [.plugin(name: "skipstone", package: "skip")]),
]
)
Expand Down
4 changes: 3 additions & 1 deletion Sources/SkipSQL/SQLContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public class SQLContext {
if let flags = flags {
return library.sqlite3_open_v2(path, ptr, flags.rawValue, nil)
} else {
return library.sqlite3_open(path, ptr)
let flags: OpenFlags = [OpenFlags.create, OpenFlags.readWrite]
return library.sqlite3_open_v2(path, ptr, flags.rawValue, nil)
//return library.sqlite3_open(path, ptr)
}
})

Expand Down
5 changes: 3 additions & 2 deletions Sources/SkipSQL/SQLite.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public struct SQLiteConfiguration {
#elseif canImport(SQLite3)
SQLiteConfiguration(library: SQLiteCLibrary.shared)
#else
// on Android you need to use SQLPlus
fatalError("no platform SQLiteCLibrary available; use SkipSQLPlus instead")
SQLiteConfiguration(library: SQLiteCLibrary.shared)
// // on Android you need to use SQLPlus
// fatalError("no platform SQLiteCLibrary available; use SkipSQLPlus instead")
#endif
}()
}
Expand Down
Loading
Loading