Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
(require '[clojure.java.jdbc :as sql])
|
||||
; Using h2database for this simple example.
|
||||
(def db {:classname "org.h2.Driver"
|
||||
:subprotocol "h2:file"
|
||||
:subname "db/my-dbname"})
|
||||
|
||||
(sql/update! db :players {:name "Smith, Steve" :score 42 :active true} ["jerseyNum = ?" 99])
|
||||
|
||||
; As an alternative to update!, use execute!
|
||||
(sql/execute! db ["UPDATE players SET name = ?, score = ?, active = ? WHERE jerseyNum = ?" "Smith, Steve" 42 true 99])
|
||||
Loading…
Add table
Add a link
Reference in a new issue