(add-binding ctx var-name type-info & {:keys [shape path]})(add-key shape key type-info)(add-typed typed type-def)Adds a typed declaration to an app-level typed payload.
Adds a typed declaration to an app-level typed payload.
(analysis->typed analysis)Converts parsed analysis into app typed maps.
The optional :variants section is retained separately and also attached to matching TableDefs for class-table-aware shape inference.
Converts parsed analysis into app typed maps. The optional :variants section is retained separately and also attached to matching TableDefs for class-table-aware shape inference.
(attach-variants-to-table table variants)Attaches and validates variants for one qualified TableDef.
Attaches and validates variants for one qualified TableDef.
(attach-variants-to-tables typed)Attaches parsed variant declarations to their qualified TableDefs.
Variant declarations can be parsed before or after their base table because they are retained in a separate typed section. Attaching them after all declarations have been reduced keeps distributed declarations load-order independent while leaving the flat type registry compatible.
Attaches parsed variant declarations to their qualified TableDefs. Variant declarations can be parsed before or after their base table because they are retained in a separate typed section. Attaching them after all declarations have been reduced keeps distributed declarations load-order independent while leaving the flat type registry compatible.
(binding-context? x)(clear-registry!)(emitted-key k)Preserves literal string keys while normalizing keywords/symbols for output.
Preserves literal string keys while normalizing keywords/symbols for output.
(empty-jsonb-shape)(empty-typed)Empty app-level typed payload.
Empty app-level typed payload.
(enum-def? x)(enum? t)(flatten-shape shape)Flattens a JsonbMerge tree into a single map of fields.
Flattens a JsonbMerge tree into a single map of fields.
(fn-def? x)(get-key-type shape key)(get-type key)(get-var-path ctx var-name)(get-var-shape ctx var-name)(has-key? shape key)(inferred-jsonb-shape type shape map-schema)Infers the shape implied by a JSONB alias or a nested map schema.
Plain :jsonb remains unclassified unless its metadata supplies a shape or nested :map schema. The :map and :array aliases retain their historical JSONB emission while carrying their useful semantic shape downstream.
Infers the shape implied by a JSONB alias or a nested map schema. Plain :jsonb remains unclassified unless its metadata supplies a shape or nested :map schema. The :map and :array aliases retain their historical JSONB emission while carrying their useful semantic shape downstream.
(jsonb-array? x)(jsonb-column-type? t)Returns true when a type or primitive TypeRef is emitted as PostgreSQL jsonb.
Returns true when a type or primitive TypeRef is emitted as PostgreSQL jsonb.
(jsonb-merge? x)(jsonb-path? x)(jsonb-shape-marker? shape)Returns true for an explicit JSONB shape marker.
Returns true for an explicit JSONB shape marker.
(jsonb-shape? x)Explicit shapes supported by JSONB column metadata.
Explicit shapes supported by JSONB column metadata.
Column type aliases which are emitted as PostgreSQL jsonb.
Column type aliases which are emitted as PostgreSQL jsonb.
deftype.pg attributes which a variant must not replace.
deftype.pg attributes which a variant must not replace.
Semantic types allowed in a class-table JSONB variant contract.
Semantic types allowed in a class-table JSONB variant contract.
(lookup-binding ctx var-name)(make-column-def name type)(make-column-def name type opts)(make-context)(make-context bindings)(make-context bindings shapes)(make-context bindings shapes paths)(make-enum-def ns name values dbschema)(make-fn-def ns name inputs output body-meta dbschema)(make-jsonb-array element-type)(make-jsonb-inference return-shape intermediate-vars operations-detected)(make-jsonb-merge left right)(make-jsonb-path segments)(make-jsonb-path segments root-var)(make-jsonb-shape fields)(make-jsonb-shape fields source-table)(make-jsonb-shape fields source-table confidence)(make-jsonb-shape fields source-table confidence nullable?)(make-table-def ns name columns primary-key)(make-table-def ns name columns primary-key addons entity-meta dbschema)(make-type-ref kind)(make-type-ref kind ns name)(make-type-ref kind ns name constraints)(make-type-union types)(make-variant-def type class-table field attrs)(make-variant-def type class-table field attrs source)(merge-shapes shape1 shape2)Merges two JSONB shapes. When keys conflict, prefers more specific type. CRITIQUE FIX: This is THE ONE implementation used everywhere. analyze.clj uses this - no local duplication.
Merges two JSONB shapes. When keys conflict, prefers more specific type. CRITIQUE FIX: This is THE ONE implementation used everywhere. analyze.clj uses this - no local duplication.
(merge-typed & typed-maps)Merges app-level typed payloads.
Merges app-level typed payloads.
(normalize-jsonb-variant attrs)Normalizes optional JSONB contract markers for a class-table variant.
Variants describe the semantic payload stored in a JSONB column. Unlike a normal column declaration, a variant may omit :type when :shape, :map, or :items establishes the JSONB contract. In that case :jsonb is used only as the semantic base for validation; it does not change the physical column type.
Normalizes optional JSONB contract markers for a class-table variant. Variants describe the semantic payload stored in a JSONB column. Unlike a normal column declaration, a variant may omit :type when :shape, :map, or :items establishes the JSONB contract. In that case :jsonb is used only as the semantic base for validation; it does not change the physical column type.
(normalize-key k)Converts kebab-case keyword to snake_case string. Single source of truth for all output generation.
Converts kebab-case keyword to snake_case string. Single source of truth for all output generation.
(pop-scope ctx)(primitive? t)(push-scope ctx)(ref? t)(register-type! key type-def)Registers a type definition. Requires a namespaced symbol key.
Registers a type definition. Requires a namespaced symbol key.
(register-variant! variant)Registers a variant and updates an already-registered base TableDef.
Registers a variant and updates an already-registered base TableDef.
(set-var-path ctx var-name path)(set-var-shape ctx var-name shape)(shape-at-path shape segments)Returns the nested JsonbShape at the provided path, if known.
Returns the nested JsonbShape at the provided path, if known.
(table-def? x)(table? t)(type-key type-def)Stable key for a typed definition. Uses a namespaced symbol when possible.
Stable key for a typed definition. Uses a namespaced symbol when possible.
(type-ref? x)(type-union? x)(typescript-key k)Formats a JSON object key for TypeScript property emission.
Formats a JSON object key for TypeScript property emission.
(valid-key? key)Validates that a key is a namespaced symbol (e.g., 'ns/name).
Validates that a key is a namespaced symbol (e.g., 'ns/name).
(validate-jsonb-metadata! opts)Validates JSONB shape metadata on a column or nested map entry.
The function returns the original metadata map so it can be used in parser pipelines. It deliberately accepts plain :jsonb without a marker, preserving the existing open-ended JSONB form.
Validates JSONB shape metadata on a column or nested map entry. The function returns the original metadata map so it can be used in parser pipelines. It deliberately accepts plain :jsonb without a marker, preserving the existing open-ended JSONB form.
(variant-def? x)(variant-key variant)Returns the stable dispatch key for a VariantDef.
Returns the stable dispatch key for a VariantDef.
(variants-for-type type)Returns registered variants for a qualified table type.
Returns registered variants for a qualified table type.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |