(->column-name entity field-name)
Add quoting for table name if field spec include :wrap flag
Add quoting for table name if field spec include :wrap flag
(->pg-interval duration)
Takes a Duration instance and converts it into a PGInterval instance where the interval is created as a number of seconds.
Takes a Duration instance and converts it into a PGInterval instance where the interval is created as a number of seconds.
(->pgobject x)
Transforms Clojure data to a PGobject that contains the data as JSON.
PGObject type defaults to jsonb
but can be changed via metadata key :pgtype
Transforms Clojure data to a PGobject that contains the data as JSON. PGObject type defaults to `jsonb` but can be changed via metadata key `:pgtype`
(<-pg-interval interval)
Takes a PGInterval instance and converts it into a Duration instance. Ignore sub-second units.
Takes a PGInterval instance and converts it into a Duration instance. Ignore sub-second units.
(<-pgobject v)
Transform PGobject containing json
or jsonb
value to Clojure data.
Transform PGobject containing `json` or `jsonb` value to Clojure data.
(coerce-nested-records entity record)
Nested records returned as JSON. This function will use nested entity spec to coerce record fields
Nested records returned as JSON. This function will use nested entity spec to coerce record fields
(entity-columns entity)
Collect columns names as keywords
Collect columns names as keywords
(entity-select-query entity fields nested)
Build the main entity SQL query as HoneySQL DSL
Build the main entity SQL query as HoneySQL DSL
(get-refs-list entity nested)
Returns the list of ref fields. nest param is used to control which fields are required
Returns the list of ref fields. *nest* param is used to control which fields are required
(lift-value x)
Wraps vector or map with :lift operator to store them as json
Wraps vector or map with :lift operator to store them as json
(pg-delete! database entity {:fx.repo/keys [where] :as params})
Delete record from database
Delete record from database
(pg-find! database entity {:fx.repo/keys [fields where nested] :as params})
Get single record from the database
Get single record from the database
(pg-find-all! database
entity
{:fx.repo/keys [fields where order-by limit offset nested]
:as params})
Return multiple records from the database
Return multiple records from the database
(pg-save! database entity data)
Save record in database
Save record in database
(pg-save-all! database entity data)
Save records in database
Save records in database
(pg-update! database entity data {:fx.repo/keys [where] :as params})
Update record in database
Update record in database
(prep-data entity data)
Builds a list of columns names and respective values based on the field schema
Builds a list of columns names and respective values based on the field schema
(prep-join-query {:keys [entity ref table-name ref-key ref-name nested]})
Returns a SQL query vector to join rows from the referenced table
Returns a SQL query vector to join rows from the referenced table
(prep-json-query {:keys [ref table-name ref-name join-query]})
Takes the join query for nested tables and wraps it with SQL query to convert nested records into JSON
Takes the join query for nested tables and wraps it with SQL query to convert nested records into JSON
(simple-val-or-nested-entity? field-schema)
Predicate function to check if field spec refers to a simple data type or json field or mandatory dependency entity
Predicate function to check if field spec refers to a simple data type or json field or mandatory dependency entity
(wrap-coalesce query)
Wrap query with coalesce expression
Wrap query with coalesce expression
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close