Skip to content

Instantly share code, notes, and snippets.

@krisleech
Last active January 23, 2017 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krisleech/a6502134b82065adfb4470a03451bf86 to your computer and use it in GitHub Desktop.
Save krisleech/a6502134b82065adfb4470a03451bf86 to your computer and use it in GitHub Desktop.
Clojure JDBC HyperSQL (like SQLite but Java only so self contained)
(require '[clojure.java.jdbc :as j])
;; file
(j/execute! { :subprotocol "hsqldb" :subname "file:./db/testdb"} ["CREATE TABLE changes(id INT)"])
;; in memory
(j/execute! { :subprotocol "hsqldb" :subname "file:./db/testdb"} ["CREATE TABLE changes(id INT)"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment