Liking cljdoc? Tell your friends :D

toucan2.model


default-connectableclj

(default-connectable model)

The default connectable that should be used when executing queries for model if no toucan2.connection/*current-connectable* is currently bound. By default, this just returns the global default connectable, :default, but you can tell Toucan to use a different default connectable for a model by implementing this method.

The default connectable that should be used when executing queries for `model` if
no [[toucan2.connection/*current-connectable*]] is currently bound. By default, this just returns the global default
connectable, `:default`, but you can tell Toucan to use a different default connectable for a model by implementing
this method.
raw docstring

deferred-current-connectableclj

(deferred-current-connectable model)

do-with-modelclj

(do-with-model modelable f)

primary-key-valuesclj

(primary-key-values instance)
(primary-key-values model m)

Return a map of primary key values for a Toucan 2 instance.

Return a map of primary key values for a Toucan 2 `instance`.
raw docstring

primary-keysclj

(primary-keys model)

Return a sequence of the primary key columns names, as keywords, for a model.

Return a sequence of the primary key columns names, as keywords, for a model.
raw docstring

primary-keys-vecclj

(primary-keys-vec model)

Get the primary keys for a model as a vector.

Get the primary keys for a `model` as a vector.
raw docstring

select-pks-fnclj

(select-pks-fn modelable)

Return a function to get the value(s) of the primary key(s) from a row. Used by toucan2.select/select-pks-reducible and thus by toucan2.select/select-pks-set, toucan2.select/select-pks-vec, etc.

The primary keys are determined by toucan2.model/primary-keys. By default this is simply the keyword :id.

Return a function to get the value(s) of the primary key(s) from a row. Used by [[toucan2.select/select-pks-reducible]]
and thus by [[toucan2.select/select-pks-set]], [[toucan2.select/select-pks-vec]], etc.

The primary keys are determined by [[toucan2.model/primary-keys]]. By default this is simply the keyword `:id`.
raw docstring

table-nameclj

(table-name model)

with-modelcljmacro

(with-model [model-binding modelable] & body)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close