To use Swift-Kuery-SQLite you must install SQLite.
You can install SQLite with Homebrew:
$ brew install sqlite
Or, if you prefer MacPorts, you can use that too, though note that you need to symlink a file into the place that Homebrew installs it:
$ port install sqlite3 $ mkdir -p /usr/local/opt/sqlite/include $ ln -s /opt/local/include/sqlite3.h /usr/local/opt/sqlite/include/
$ sudo apt-get install sqlite3 libsqlite3-dev
First create an instance of
Swift-Kuery-SQLite by calling:
let db = SQLiteConnection(filename: "myDB.db")
To establish a connection call:
db.connect(onCompletion: (QueryError?) -> ())
You now have a connection that can be used to execute SQL queries created using Swift-Kuery. View the Kuery documentation for more information, or see the Database Connectivity with Kuery chapter of the Kitura Until Dawn guidebook/tutorial.
This library is licensed under Apache 2.0. Full license text is available in LICENSE.