Sample SPM executable

This commit is contained in:
Gwendal Roué committed 2017-04-11 13:58:41 +02:00
1 parent 362b8d3243
commit 1810edfa6e
2 files changed
+20

No files matched your search

+10
View File
@@ -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)
]
)
+10
View File
@@ -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)")