Re: Clojure Stored Procedure

2011-11-19 Thread willyh
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)

Re: Clojure Stored Procedure

2011-11-19 Thread willyh
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

Re: using sqlite3

2011-11-09 Thread willyh
project.clj: --- (defproject testsqlite 1.0.0-SNAPSHOT :description FIXME: write description :disable-deps-clean false :dependencies [[org.clojure/clojure

Re: using sqlite3

2011-11-09 Thread willyh
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]

Re: sqlitejdbc jar on clojars

2011-11-09 Thread willyh
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

Re: including sound or image files with Leiningen uberjar command

2011-09-16 Thread willyh
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

Re: including sound or image files with Leiningen uberjar command

2011-09-16 Thread willyh
/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