Basic transacting

Let's write some data. Sorry I mean transact.

Connect to your DB quick and let's get busy.

$ lein repl
=> (d/create-database config)
=> (def conn (d/connect config))

I'm assuming you've gone through the material up to this point. If not, you know what to do fam.

;; The first transaction will be the schema we are using:
=> (d/transact conn [{:db/ident :name
                      :db/valueType :db.type/string
                      :db/cardinality :db.cardinality/one }
                     {:db/ident :age
                      :db/valueType :db.type/long
                      :db/cardinality :db.cardinality/one }])

Last updated