When using clojure's korma sqlite3 helpers, what's the default path for the sqlite3 database?

Viewed 821

When using korma.db, defdb can take a sqlite3 helper to establish a connexion to a sqlite3 database. However, I've tried placing the database on the root of the project directory, alongside project.clj, and on the resources directory, but when I try to use the db I get:

Failure to execute query with SQL: SELECT "examples".* FROM "examples" :: [] SQLException: Message: [SQLITE_ERROR] SQL error or missing database (no such table: examples)

Needless to say my sqlite database contains an examples table. When trying to do this, I get a sqlite.db file of zero bytes placed on the root project dir.

I'm doing this from lein repl within the project, by the way.

Edit: This is what I do when it fails:

(use 'korma.db)
(defdb db (sqlite3 {:db "filename.db"}))
(use 'korma.core)
(defentity examples)
(select examples)
1 Answers
Related