Liking cljdoc? Tell your friends :D

toucan2.insert

Implementation of insert!.

Implementation of [[insert!]].
raw docstring

insert!clj

(insert! modelable row-or-rows)
(insert! modelable columns row-vectors)
(insert! modelable k v & more)

Returns number of rows inserted.

Returns number of rows inserted.
sourceraw docstring

insert-returning-instances!clj

(insert-returning-instances! modelable row-or-rows)
(insert-returning-instances! [modelable & columns-to-return] row-or-rows)
(insert-returning-instances! modelable columns row-vectors)
(insert-returning-instances! [modelable & columns-to-return]
                             columns
                             row-vectors)
(insert-returning-instances! modelable k v & more)
(insert-returning-instances! [modelable & columns-to-return] k v & more)

Like insert!, but returns a vector of the primary keys of the newly inserted rows rather than the number of rows inserted. The primary keys are determined by model/primary-keys. For models with a single primary key, this returns a vector of single values, e.g. [1 2] if the primary key is :id and you've inserted rows 1 and 2; for composite primary keys this returns a vector of tuples where each tuple has the value of corresponding primary key as returned by model/primary-keys, e.g. for composite PK [:id :name] you might get [[1 "Cam"] [2 "Sam"]].

Like [[insert!]], but returns a vector of the primary keys of the newly inserted rows rather than the number of rows
inserted. The primary keys are determined by [[model/primary-keys]]. For models with a single primary key, this
returns a vector of single values, e.g. `[1 2]` if the primary key is `:id` and you've inserted rows 1 and 2; for
composite primary keys this returns a vector of tuples where each tuple has the value of corresponding primary key as
returned by [[model/primary-keys]], e.g. for composite PK `[:id :name]` you might get `[[1 "Cam"] [2 "Sam"]]`.
sourceraw docstring

insert-returning-pks!clj

(insert-returning-pks! modelable row-or-rows)
(insert-returning-pks! modelable columns row-vectors)
(insert-returning-pks! modelable k v & more)

Like insert!, but returns a vector of the primary keys of the newly inserted rows rather than the number of rows inserted. The primary keys are determined by model/primary-keys. For models with a single primary key, this returns a vector of single values, e.g. [1 2] if the primary key is :id and you've inserted rows 1 and 2; for composite primary keys this returns a vector of tuples where each tuple has the value of corresponding primary key as returned by model/primary-keys, e.g. for composite PK [:id :name] you might get [[1 "Cam"] [2 "Sam"]].

Like [[insert!]], but returns a vector of the primary keys of the newly inserted rows rather than the number of rows
inserted. The primary keys are determined by [[model/primary-keys]]. For models with a single primary key, this
returns a vector of single values, e.g. `[1 2]` if the primary key is `:id` and you've inserted rows 1 and 2; for
composite primary keys this returns a vector of tuples where each tuple has the value of corresponding primary key as
returned by [[model/primary-keys]], e.g. for composite PK `[:id :name]` you might get `[[1 "Cam"] [2 "Sam"]]`.
sourceraw docstring

reducible-insertclj

(reducible-insert modelable row-or-rows)
(reducible-insert modelable columns row-vectors)
(reducible-insert modelable k v & more)
source

reducible-insert-returning-instancesclj

(reducible-insert-returning-instances modelable row-or-rows)
(reducible-insert-returning-instances [modelable & columns-to-return]
                                      row-or-rows)
(reducible-insert-returning-instances modelable columns row-vectors)
(reducible-insert-returning-instances [modelable & columns-to-return]
                                      columns
                                      row-vectors)
(reducible-insert-returning-instances modelable k v & more)
(reducible-insert-returning-instances [modelable & columns-to-return]
                                      k
                                      v
                                      &
                                      more)
source

reducible-insert-returning-pksclj

(reducible-insert-returning-pks modelable row-or-rows)
(reducible-insert-returning-pks modelable columns row-vectors)
(reducible-insert-returning-pks modelable k v & more)
source

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

× close