(defcrud singular table pk)
(defcrud singular table pk key-seq)
(defcrud singular table pk key-seq plural)
(find-records-by-criteria table where-clauses conn)
criteria should be a honeysql where clause.
criteria should be a honeysql where clause.
(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
(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
(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
(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)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close