mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Sample SPM executable
This commit is contained in:
1 parent
362b8d3243
commit
1810edfa6e
2 files changed
+20
No files matched your search
@@ -0,0 +1,10 @@
|
||||
// swift-tools-version:3.1
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SPM",
|
||||
dependencies: [
|
||||
.Package(url: "https://github.com/groue/GRDB.swift.git", majorVersion: 0)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
import GRDB
|
||||
import CSQLite
|
||||
|
||||
let CVersion = String(cString: sqlite3_libversion())
|
||||
print("SQLite version from C API: \(CVersion)")
|
||||
|
||||
let SQLVersion = try! DatabaseQueue().inDatabase { db in
|
||||
try String.fetchOne(db, "SELECT sqlite_version()")!
|
||||
}
|
||||
print("SQLite version from SQL function: \(SQLVersion)")
|
||||
Reference in new issue
Block a user