Liking cljdoc? Tell your friends :D

org.purefn.sqlium.transform

Functions that deal with transforming data returned from the service's SQL queries into the structure defined by the data spec.

Functions that deal with transforming data returned from the
service's SQL queries into the structure defined by the data spec.
raw docstring

binary-stringclj

(binary-string byte-array)

Takes a byte array, returns a UTF-encoded string.

Takes a byte array, returns a UTF-encoded string.
raw docstring

field-transformclj

(field-transform table field)

Takes a table spec and field spec, returns a function that takes a record and returns a keyval for the transformed field.

Takes a table spec and field spec, returns a function that takes a record and
returns a keyval for the transformed field.
raw docstring

group-transformclj


group-transform*clj

(group-transform* table-spec)

Main API function. Takes a root table spec, returns a function that takes a record and transforms the data for the group - the root table and its relationships, recursively transforming many relationship data - according to the spec.

Main API function. Takes a root table spec, returns a function that
takes a record and transforms the data for the group - the root
table and its relationships, recursively transforming many
relationship data - according to the spec.
raw docstring

many-relationship-transformclj

(many-relationship-transform many-rel)

Takes a spec for a many relationship, and returns a function that takes a record and transformed data, and returns the transformed data with the many relationship data added according to the relationship spec.

Takes a spec for a many relationship, and returns a function that
takes a record and transformed data, and returns the transformed
data with the many relationship data added according to the
relationship spec.
raw docstring

single-relationship-transformclj

(single-relationship-transform one-rel)

Takes a spec for a single relationship, and returns a function of two args: the record to be transformed for the relationship, and the already-transformed data map, that returns the updated data map with the relationship data added according to the relationship spec.

Takes a spec for a single relationship, and returns a function of
two args: the record to be transformed for the relationship, and
the already-transformed data map, that returns the updated data map
with the relationship data added according to the relationship
spec.
raw docstring

table-fields-transformclj

(table-fields-transform table-spec)

Takes a table spec, returns a function that takes a record and returns a map with the table data formatted according to the table spec.

Takes a table spec, returns a function that takes a record and
returns a map with the table data formatted according to the table
spec.
raw docstring

xform-fnclj

(xform-fn xform)

Takes the xform field from a field spec and returns a transform function. Handles mapping of built-in transforms.

Takes the xform field from a field spec and returns a transform
function. Handles mapping of built-in transforms.
raw docstring

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

× close