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.
(binary-string byte-array)
Takes a byte array, returns a UTF-encoded string.
Takes a byte array, returns a UTF-encoded string.
(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.
(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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close