Here's how I do it with clojure.java.jdbc:
(defn do-stored
Executes an (optionally parameterized) SQL callable statement on
the open database connection. Each param-group is a seq of values
for all of the parameters.
[sql param-groups]
(with-open [stmt (.prepareCall (sql/connection)
the DB, might as well use
clojure.
On Nov 19, 3:34 pm, willyh wheine...@gmail.com wrote:
Here's how I do it with clojure.java.jdbc:
(defn do-stored
Executes an (optionally parameterized) SQL callable statement on
the open database connection. Each param-group is a seq
project.clj:
---
(defproject testsqlite 1.0.0-SNAPSHOT
:description FIXME: write description
:disable-deps-clean false
:dependencies [[org.clojure/clojure
Use this project.clj instead (eliminating the reference to clojure-contrib):
(defproject testsqlite 1.0.0-SNAPSHOT
:description FIXME: write description
:disable-deps-clean false
:dependencies [[org.clojure/clojure 1.3.0]
[org.clojure/java.jdbc 0.1.0]
I'm using the sqlite-jdbc jar from a maven repository. I use this in
my leiningen project to fetch it:
[org.xerial/sqlite-jdbc 3.7.2]
I haven't had any issues with it, but that doesn't mean you won't.
On Nov 9, 12:50 pm, labwor...@gmail.com wrote:
sqlite3 had some problems but a later version
I use the following helper function:
(defn getResource
Load resource. This is guaranteed to work with JNLP'd jars.
[resource-string]
(.getResource (.getContextClassLoader (Thread/currentThread))
resource-string))
Note the comment. I had a lot of trouble loading resources when my
uberjars
/blob/3a3374f714e5a755b7de2a761f376...
On Fri, Sep 16, 2011 at 8:58 AM, willyh wheine...@gmail.com wrote:
I use the following helper function:
(defn getResource
Load resource. This is guaranteed to work with JNLP'd jars.
[resource-string]
(.getResource (.getContextClassLoader