stillsuit.lacinia.scalars

Implementation functions for stillsuit scalar transformers.

The intent here is to provide transformers for all of datomic’s primitive values, though we ignore some oddball types like :db.type/uri.

keyword-parser

keyword-serializer

(keyword-serializer with-colon?)

parse-as-value

(parse-as-value type-convert)

parse-edn

Parse the incoming string as EDN.

parse-epoch-millisecs

Parser converting number of milliseconds since the UTC epoch (as a string) to a java.util.Date value.

parse-iso8601

Parser which will parse dates in ISO-8601 format, convert them to UTC time, and return a java.util.Date result.

parse-uuid

serialize-epoch-millisecs

Serializer representing a java.util.Date object as a string representing the number of milliseconds since the UTC epoch.

serialize-iso8601

Serializer which will serialize dates as ISO-8601 strings in the UTC timezone.

serialize-pr-str

serialize-str

transformer-map

(transformer-map base-map config)

Given a base resolver map used attach scalar transformers to a lacinia schema, attach the transformers for datomic primitive types.