Liking cljdoc? Tell your friends :D

sweet-crud.core


convert-numbers-mapclj

(convert-numbers-map r)
source

create-record!clj

(create-record! table pk key-seq conn record & [return?])
source

defcrudcljmacro

(defcrud singular table pk)
(defcrud singular table pk key-seq)
(defcrud singular table pk key-seq plural)
source

delete-record!clj

(delete-record! table pk conn record-or-id)
source

find-record-by-idclj

(find-record-by-id table pk conn id)
source

find-recordsclj

(find-records table conn)
source

find-records-by-criteriaclj

(find-records-by-criteria table where-clauses conn)

criteria should be a honeysql where clause.

criteria should be a honeysql where clause.
sourceraw docstring

update-by-pk-queryclj

(update-by-pk-query id-field table record)

Creates a default update query, and returns it using sql/format, ready to pass on to jdbc. Does not do any checks; just applies the keys in the map. if a value is nil, it will 'unset' the value in the DB

Creates a default update query, and returns it using sql/format, ready to pass on to jdbc.
Does not do any checks; just applies the keys in the map. if a value is nil, it will 'unset' the value in the DB
sourceraw docstring

update-record!clj

(update-record! table pk key-seq conn record & [return?])

If return is supplied, it will return the value

If return is supplied, it will return the value
sourceraw docstring

update-record-in-db!clj

(update-record-in-db! table pk conn record)

Generic function that updates a record in specified table

Generic function that updates a record in specified table
sourceraw docstring

with-crud-routescljmacro

(with-crud-routes {db-namespace :database-ns
                   update-fn-name :update-fn
                   delete-fn-name :delete-fn
                   :as opts
                   :or {middleware []}
                   singular :singular
                   find-fn-name :find-fn
                   middleware :middleware
                   find-one-fn-name :find-by-id-fn
                   create-fn-name :create-fn
                   plural :plural}
                  &
                  other-routes)
source

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

× close