In dataset/sandbox.clj
, you will find a namespace to quickly get
up and running. The set-up relies on three steps:
db.fixtures
is a namespace providing support for fixtures. This namespace
is only present under the dev leiningen profile:
(load-fixtures :small)
The is ample documentation in README around creating
schemas. The one provided in sandbox
is a minimal one:
(s/def :account/name string?)
(s/def :account/state #{:active :suspended :terminated})
(s/def :account/id nat-int?)
(s/def :account/account (s/keys :req [:account/name :account/state] :opt [:account/id]))
(def env
{:jdbc jdbc-config
:schema (make-schema (entity-from-spec :account/account))})
At this point, you are ready to go:
(q/execute env :account)
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close