clj-r2dbc.dialect.postgresql

Optional PostgreSQL-specific interceptor stages.

Addresses two PostgreSQL type-mapping gaps: ARRAY columns (returned as Java
arrays) and JSON/JSONB columns (returned as io.r2dbc.postgresql.codec.Json).
Add pg-array-interceptor, pg-json-interceptor, or both to :interceptors as
needed.

pg-array-interceptor

added in 0.1

Interceptor that converts PostgreSQL array column values to persistent vectors.

Binary byte[] values are preserved as-is.

pg-json-interceptor

added in 0.1

(pg-json-interceptor {:keys [json->clj]})
Return an interceptor that coerces PostgreSQL JSON/JSONB column values.

Args:
  opts       - options map.
    :json->clj - required; 1-arity fn [json-string] -> Clojure value.

Returns an interceptor map with :name and :leave keys.