Liking cljdoc? Tell your friends :D

pgmalli.impl.shape

Reading schema data as shapes: the map of a row schema, its column entries and their properties, the names derived from a row's, and the rewrites other namespaces read it by.

Reading schema data as shapes: the map of a row schema, its column entries and their
properties, the names derived from a row's, and the rewrites other namespaces read it by.
raw docstring

column-entriesclj

(column-entries schema)

[[column props schema] ...] of a row or insert schema as data.

[[column props schema] ...] of a row or insert schema as data.
sourceraw docstring

column-propsclj

(column-props s)

Properties of a column schema, looking through [:maybe ...].

Properties of a column schema, looking through [:maybe ...].
sourceraw docstring

derived-nameclj

(derived-name row-name suffix)

The name of a schema derived from a row's: :pg.<schema>/<table> -> :pg.<schema>.<table>/<suffix> ("insert", "update"), string keys alike.

The name of a schema derived from a row's: :pg.<schema>/<table> -> :pg.<schema>.<table>/<suffix>
("insert", "update"), string keys alike.
sourceraw docstring

dispatch-keyclj

(dispatch-key props)

The column a :multi's properties dispatch on: :dispatch, or :pg/dispatch when the registry gave a string key a function.

The column a :multi's properties dispatch on: :dispatch, or :pg/dispatch when the registry
gave a string key a function.
sourceraw docstring

entriesclj

(entries schema)

The children of a schema vector: everything after the tag, and after the property map when the second element is one.

The children of a schema vector: everything after the tag, and after the property map when
the second element is one.
sourceraw docstring

entry-partsclj

(entry-parts [k p s])

[key props schema] of a map entry, props defaulted to {}.

[key props schema] of a map entry, props defaulted to {}.
sourceraw docstring

generated-name?clj

(generated-name? x)

Whether x is a name pgmalli generates: :pg.public/users, "pg.public/Order Items".

Whether x is a name pgmalli generates: :pg.public/users, "pg.public/Order Items".
sourceraw docstring

ident-keyclj

(ident-key s)

Column names as row keys: keywords for plain identifiers, strings otherwise.

Column names as row keys: keywords for plain identifiers, strings otherwise.
sourceraw docstring

maybe?clj

(maybe? s)

Whether a column schema takes NULL: [:maybe ...].

Whether a column schema takes NULL: [:maybe ...].
sourceraw docstring

merge-propsclj

(merge-props s p)

Schema data with properties merged in (plainly; render's with-props narrows bounds).

Schema data with properties merged in (plainly; render's with-props narrows bounds).
sourceraw docstring

non-nullclj

(non-null schema)

A column schema without its [:maybe ...]: what a value must be when it is not NULL.

A column schema without its [:maybe ...]: what a value must be when it is not NULL.
sourceraw docstring

not-a-row!clj

(not-a-row! registry name what)

The error for a schema that is no table's or view's row: an insert or update schema names its row, anything else the rows the registry holds.

The error for a schema that is no table's or view's row: an insert or update schema names
its row, anything else the rows the registry holds.
sourceraw docstring

plain?clj

(plain? s)

Whether an identifier needs no quoting, so it can be a keyword.

Whether an identifier needs no quoting, so it can be a keyword.
sourceraw docstring

read-asclj

(read-as read schema)

A column schema under :read, {pg-type schema}: the schema a type is read as when a driver extension (next.jdbc's ReadableColumn) reads it otherwise, NULL still allowed where it was. nil when the column's :pg/type is not among them.

A column schema under :read, {pg-type schema}: the schema a type is read as when a driver
extension (next.jdbc's ReadableColumn) reads it otherwise, NULL still allowed where it was.
nil when the column's :pg/type is not among them.
sourceraw docstring

read-row?clj

(read-row? s)

Whether a schema is a row a query returns: a table's or a view's, not an insert or update schema (closed).

Whether a schema is a row a query returns: a table's or a view's, not an insert or update
schema (closed).
sourceraw docstring

read-timeclj

(read-time time schema)

Schema data with the time types a driver returns under :time: :instant when timestamps arrive as Instants (dates stay java.sql.Date, hence inst?), :local when timestamptz arrives as LocalDateTime, :inst when the schema is read without malli.experimental.time.

Schema data with the time types a driver returns under :time: :instant when timestamps
arrive as Instants (dates stay java.sql.Date, hence inst?), :local when timestamptz arrives
as LocalDateTime, :inst when the schema is read without malli.experimental.time.
sourceraw docstring

row-mapclj

(row-map schema)

The [:map ...] of a row schema, looking through the [:and ...] a table with CHECKs is.

The [:map ...] of a row schema, looking through the [:and ...] a table with CHECKs is.
sourceraw docstring

row-propsclj

(row-props s)

The properties of a row (or insert, update) schema's map: :pg/table or :pg/view, keys...

The properties of a row (or insert, update) schema's map: :pg/table or :pg/view, keys...
sourceraw docstring

row-schema?clj

(row-schema? s)

Row schemas carry :pg/table; their inserts do too, but closed.

Row schemas carry :pg/table; their inserts do too, but closed.
sourceraw docstring

schema-and-nameclj

(schema-and-name k)

[schema name] of a registry key: :pg.ins/mood and "pg.a.b/m" are ["ins" "mood"] and ["a.b" "m"].

[schema name] of a registry key: :pg.ins/mood and "pg.a.b/m" are ["ins" "mood"] and ["a.b" "m"].
sourceraw docstring

schema-keyclj

(schema-key schema-name s)

A table, view or type of a schema as a registry key: :pg.<schema>/<name>, a string key when either name is not a plain identifier.

A table, view or type of a schema as a registry key: :pg.<schema>/<name>, a string key when
either name is not a plain identifier.
sourceraw docstring

schema-ofclj

(schema-of registry name)

The schema a registry holds under a name; a name it does not hold is an error naming the ones it does.

The schema a registry holds under a name; a name it does not hold is an error naming the
ones it does.
sourceraw docstring

schemas-ofclj

(schemas-of registry)

The name -> schema map of a registry: a map as it is, a malli Registry (a composite one, say) through its schemas. Anything else is an error: a generated data map, a map whose values are not schemas.

The name -> schema map of a registry: a map as it is, a malli Registry (a composite one, say)
through its schemas. Anything else is an error: a generated data map, a map whose values are
not schemas.
sourceraw docstring

table-keyclj

(table-key table)

"public.users" -> :pg.public/users: schema-key over a qualified name.

"public.users" -> :pg.public/users: schema-key over a qualified name.
sourceraw docstring

type-nameclj

(type-name p)

The type of a column schema without its typmod or array brackets: "bit(8)[]" -> "bit".

The type of a column schema without its typmod or array brackets: "bit(8)[]" -> "bit".
sourceraw docstring

without-genclj

(without-gen schema)

Schema data without what the registry added when it was loaded: generation hints, the function a string :dispatch became.

Schema data without what the registry added when it was loaded: generation hints, the
function a string :dispatch became.
sourceraw docstring

written-by-database?clj

(written-by-database? column-props)

Whether the database alone writes a column (a generated one, an identity ALWAYS one): no INSERT or UPDATE carries it.

Whether the database alone writes a column (a generated one, an identity ALWAYS one): no
INSERT or UPDATE carries it.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close