Liking cljdoc? Tell your friends :D

fx.repo.pg


->column-nameclj

(->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
sourceraw docstring

->pg-intervalclj

(->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.
sourceraw docstring

->pgobjectclj

(->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`
sourceraw docstring

<-pg-intervalclj

(<-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.
sourceraw docstring

<-pgobjectclj

(<-pgobject v)

Transform PGobject containing json or jsonb value to Clojure data.

Transform PGobject containing `json` or `jsonb` value to Clojure data.
sourceraw docstring

coerce-nested-recordsclj

(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
sourceraw docstring

column-name?clj

source

entity-columnsclj

(entity-columns entity)

Collect columns names as keywords

Collect columns names as keywords
sourceraw docstring

entity-select-queryclj

(entity-select-query entity fields nested)

Build the main entity SQL query as HoneySQL DSL

Build the main entity SQL query as HoneySQL DSL
sourceraw docstring

field-params?clj

source

get-refs-listclj

(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
sourceraw docstring

lift-valueclj

(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
sourceraw docstring

nested-params?clj

source

pg-delete!clj

(pg-delete! database entity {:keys [where] :as params})

Delete record from database

Delete record from database
sourceraw docstring

pg-find!clj

(pg-find! database entity {:keys [fields where nested] :as params})

Get single record from the database

Get single record from the database
sourceraw docstring

pg-find-all!clj

(pg-find-all! database
              entity
              {:keys [fields where order-by limit offset nested] :as params})

Return multiple records from the database

Return multiple records from the database
sourceraw docstring

pg-save!clj

(pg-save! database entity data)

Save record in database

Save record in database
sourceraw docstring

pg-save-all!clj

(pg-save-all! database entity data)

Save records in database

Save records in database
sourceraw docstring

pg-update!clj

(pg-update! database entity data {:keys [where] :as params})

Update record in database

Update record in database
sourceraw docstring

prep-dataclj

(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
sourceraw docstring

prep-data-mapclj

(prep-data-map entity data)
source

prep-join-queryclj

(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
sourceraw docstring

prep-json-queryclj

(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
sourceraw docstring

prep-valueclj

(prep-value field-schema v)
source

simple-val-or-nested-entity?clj

(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
sourceraw docstring

where-clauseclj

(where-clause where-clauses eq-clauses)
source

wrap-coalesceclj

(wrap-coalesce query)

Wrap query with coalesce expression

Wrap query with coalesce expression
sourceraw docstring

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

× close