Liking cljdoc? Tell your friends :D

toucan2.operation

Common/shared code for implementing operations like the code in toucan2.insert or toucan2.update.

Common/shared code for implementing operations like the code in [[toucan2.insert]] or [[toucan2.update]].
raw docstring

reducibleclj

(reducible query-type modelable unparsed-args)

reducible*clj

(reducible* query-type model parsed-args)

Return a reducible query based on parsed-args. This should return either an update count (number of rows updated) or a sequence of PK values for affected rows; which of these gets returned depends on [[toucan2.jdbc.query/options]] (for the JDBC backend) or similar.

Return a reducible query based on `parsed-args`. This should return either an update count (number of rows updated) or
a sequence of PK values for affected rows; which of these gets returned depends on [[toucan2.jdbc.query/options]] (for
the JDBC backend) or similar.
raw docstring

reducible-returning-instancesclj

(reducible-returning-instances query-type modelable-columns unparsed-args)

Helper wrapper for reducible-returning-instances* that also resolves model and parses unparsed-args.

Helper wrapper for [[reducible-returning-instances*]] that also resolves `model` and parses `unparsed-args`.
raw docstring

reducible-returning-instances*clj

(reducible-returning-instances* query-type model parsed-args)

Given parsed-args, return a reducible that yields rows of model, as toucan2.instance maps.

The default implementation builds a reducible that combines a reducible-returning-pks* and [[->ReducibleReturningInstancesFromPKs]].

Given `parsed-args`, return a reducible that yields rows of `model`, as [[toucan2.instance]] maps.

The default implementation builds a reducible that combines a [[reducible-returning-pks*]]
and [[->ReducibleReturningInstancesFromPKs]].
raw docstring

reducible-returning-pksclj

(reducible-returning-pks query-type modelable unparsed-args)

Helper wrapper for reducible-returning-pks* that also resolves modelable and parses unparsed-args.

Helper wrapper for [[reducible-returning-pks*]] that also resolves `modelable` and parses `unparsed-args`.
raw docstring

reducible-returning-pks*clj

(reducible-returning-pks* query-type model parsed-args)

Given parsed-args return a reducible that when reduced yields a sequence of PK values for affected rows. Each PK value should be a plain value for rows with a single primary key, e.g. an integer for a row with an integer :id column, or a vector of primary key values in the same order as toucan2.model/primary-keys for models with composite primary keys.

The default implementation combines reducible* with return-pks-eduction.

Given `parsed-args` return a reducible that when reduced yields a sequence of PK values for affected rows. Each PK
value should be a plain value for rows with a single primary key, e.g. an integer for a row with an integer `:id`
column, or a vector of primary key values in the same order as [[toucan2.model/primary-keys]] for models with
composite primary keys.

The default implementation combines [[reducible*]] with [[return-pks-eduction]].
raw docstring

return-pks-eductionclj

(return-pks-eduction model reducible-operation)

Given a reducible-operation returning whatever (presumably returning affected row counts) wrap it in an eduction and in [[->WithReturnKeys]] so it returns a sequence of primary key vectors.

Given a `reducible-operation` returning whatever (presumably returning affected row counts) wrap it in an eduction and
in [[->WithReturnKeys]] so it returns a sequence of primary key vectors.
raw docstring

returning-instances!clj

(returning-instances! query-type modelable-columns unparsed-args)

Helper wrapper for reducible-returning-instances that also fully realizes the reducible it returns.

Helper wrapper for [[reducible-returning-instances]] that also fully realizes the reducible it returns.
raw docstring

returning-pks!clj

(returning-pks! query-type modelable unparsed-args)

Helper wrapper for reducible-returning-pks that also fully realizes the results.

Helper wrapper for [[reducible-returning-pks]] that also fully realizes the results.
raw docstring

returning-update-count!clj

(returning-update-count! query-type modelable unparsed-args)

select-reducible-with-pksclj

(select-reducible-with-pks model columns row-pks)

Return a reducible that returns instances of model that match a sequence of PKs. Each PK should be either a single value or vector of values (for models with a composite PK). This is used to implement the default implementation of reducible-returning-instances*.

Return a reducible that returns instances of `model` that match a sequence of PKs. Each PK should be either a single
value or vector of values (for models with a composite PK). This is used to implement the default implementation
of [[reducible-returning-instances*]].
raw docstring

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

× close