Created
November 25, 2011 22:51
-
-
Save ctataryn/1394605 to your computer and use it in GitHub Desktop.
Korma H2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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