A classy high-level Clojure library for defining application models and retrieving them from a DB
root-model-namespace
-- this makes it easier to define multiple models in the same namespace or in namespaces that don't follow the root-model-namespace
convention (#91, credit @dpsutton)type-fns
for PK fields (#87)with-temp
should respect custom primary key (#86)defmodel
now uses Potemkin's defrecord+
to define corresponding record types rather than clojure.core/defrecord
. This macro works similarly to vanilla defrecord
but does not redefine the class if the body of the defrecord
form has not changed since its initial definition. This fixes many annoyances in REPL-based development where reloading a namespace defining a Toucan model would require reloading any namespaces that referred to the resulting class directly, e.g. for class-based dispatch in interfaces, protocols, or multimethods. (#69)*transaction-connection*
is now public (#61)jdbc/query
and jdbc/execute!
are now configurable by calling toucan.db/set-default-jdbc-options!
(#60, #63)org.clojure/java.jdbc
dependency (#57)