Skip to content

Instantly share code, notes, and snippets.

@ctataryn
Created November 25, 2011 22:51
Show Gist options
  • Save ctataryn/1394605 to your computer and use it in GitHub Desktop.
Save ctataryn/1394605 to your computer and use it in GitHub Desktop.
Korma H2
(ns quadbot.persistence
(:use [korma.db])
(:use [korma.core])
(:use [clojure.test]))
(defdb mydb {:classname "org.h2.Driver"
:subprotocol "h2"
:subname "jdbc:h2:~/test"
:user "sa"
:password ""})
(defentity users)
(deftest insert-select
(is (= (do
(-> (insert "users")
(values {:first "chris" :last "granger"}))
(select users) ) "bleh")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment