Liking cljdoc? Tell your friends :D

magnet.sql-utils


coll->jdbc-arrayclj

(coll->jdbc-array coll type-name)
source

coll->pg-jsonbclj

(coll->pg-jsonb c)

Convert coll c into a Postgresql jsonb compatible object.

Convert coll `c` into a Postgresql jsonb compatible object.
sourceraw docstring

instant->sql-timestampclj

(instant->sql-timestamp instant)

Convert clojure.java-time/Instant instant into a SQL Timestamp

Convert clojure.java-time/Instant `instant` into a SQL Timestamp
sourceraw docstring

json->pg-jsonbclj

(json->pg-jsonb json)

Convert json string into a Postgresql jsonb compatible object. In order to persist JSON into Postgresql we need to wrap the json into a PGObject and set the "jsonb" type on it. See https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/util/PGobject.html

Convert `json` string into a Postgresql jsonb compatible object.
In order to persist JSON into Postgresql we need to wrap the json
into a PGObject and set the "jsonb" type on it. See
https://jdbc.postgresql.org/documentation/publicapi/org/postgresql/util/PGobject.html
sourceraw docstring

keyword->pg-enumclj

(keyword->pg-enum kw enum-type)

Convert keyword kw into a Postgresql enum-type enum compatible object. enum-type is a string holding the name of the Postgresql enum type.

Convert keyword `kw` into a Postgresql `enum-type` enum compatible object.
`enum-type` is a string holding the name of the Postgresql enum type.
sourceraw docstring

map->pg-jsonbclj

(map->pg-jsonb m)

Convert map m into a Postgresql jsonb compatible object.

Convert map `m` into a Postgresql jsonb compatible object.
sourceraw docstring

pg-enum->keywordclj

(pg-enum->keyword pg-enum enum-type)

Convert pg-enum from enum-type compatible value into a keyword. enum-type is a string holding the name of the Postgresql enum type. pg-enum must be either a PGobject of enum-type type or a string[1]. Otherwise, it asserts.

[1] This is because some versions of Postgresql or Postgresql client driver return enums as PGobjects and other as plain strings

Convert `pg-enum` from `enum-type` compatible value into a keyword.
`enum-type` is a string holding the name of the Postgresql enum
type. `pg-enum` must be either a PGobject of `enum-type` type or a
string[1]. Otherwise, it asserts.

[1] This is because some versions of Postgresql or Postgresql
    client driver return enums as PGobjects and other as plain
    strings
sourceraw docstring

pg-json->collclj

(pg-json->coll pg-json)

Convert PostgreSQL Object pg-object into a Clojure collection.

Convert PostgreSQL Object `pg-object` into a Clojure collection.
sourceraw docstring

sql-delete!clj

(sql-delete! db-spec logger table where-clause)

FIXME: document this function

FIXME: document this function
sourceraw docstring

sql-execute!clj

(sql-execute! db-spec logger sql-statement)

FIXME: document this function

FIXME: document this function
sourceraw docstring

sql-insert!clj

(sql-insert! db-spec logger table cols values)

FIXME: document this function

FIXME: document this function
sourceraw docstring

sql-insert-multi!clj

(sql-insert-multi! db-spec logger table cols values)

FIXME: document this function

FIXME: document this function
sourceraw docstring

sql-queryclj

(sql-query db-spec logger sql-statement)

FIXME: document this function

FIXME: document this function
sourceraw docstring

sql-update!clj

(sql-update! db-spec logger table set-map where-clause)

FIXME: document this function

FIXME: document this function
sourceraw docstring

sql-update-or-insert!clj

(sql-update-or-insert! db-spec logger table set-map where-clause)

FIXME: document this function

FIXME: document this function
sourceraw docstring

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

× close