Generic typed PostgreSQL RPC generation helpers.
This namespace owns target-independent mutation classification, aggregate topic inference and canonical xt.db notification forms. Applications remain responsible only for selecting source namespaces and supplying wrapper authentication/configuration.
Generic typed PostgreSQL RPC generation helpers. This namespace owns target-independent mutation classification, aggregate topic inference and canonical xt.db notification forms. Applications remain responsible only for selecting source namespaces and supplying wrapper authentication/configuration.
(infer-aggregate {:keys [function-name source-tables output-shape notify]})Infers the owning entity aggregate from a command name, falling back to returned/source tables. Explicit metadata is used only as an override for ambiguous commands.
Infers the owning entity aggregate from a command name, falling back to returned/source tables. Explicit metadata is used only as an override for ambiguous commands.
(infer-topic-id {:keys [aggregate function-name inputs output-shape notify]})Infers the aggregate id expression strategy. Existing aggregate ids win; create-style commands may derive the id from the returned aggregate row. The User session id and explicit ambiguity overrides are represented distinctly so wrapper generators can substitute their auth expression.
Infers the aggregate id expression strategy. Existing aggregate ids win; create-style commands may derive the id from the returned aggregate row. The User session id and explicit ambiguity overrides are represented distinctly so wrapper generators can substitute their auth expression.
(inferred-shape-rows shape source-tables)Recovers table paths for symbolic composite fields when the typed analyser knows the mutation's source tables but cannot carry a called function's row shape through the enclosing JSON object.
Recovers table paths for symbolic composite fields when the typed analyser knows the mutation's source tables but cannot carry a called function's row shape through the enclosing JSON object.
(notification-payload {:keys [event rows]} result-sym)Builds a canonical db/sync or db/remove request from a notification plan.
Builds a canonical db/sync or db/remove request from a notification plan.
(notification-plan {:keys [function-name inputs report output-shape notify]
:as function})Builds a canonical private entity-topic notification plan for a mutating typed function, or nil for non-entity/non-mutating functions. Entity mutations with an unusable typed result or topic id fail generation with a diagnostic instead of silently omitting synchronisation.
Builds a canonical private entity-topic notification plan for a mutating typed function, or nil for non-entity/non-mutating functions. Entity mutations with an unusable typed result or topic id fail generation with a diagnostic instead of silently omitting synchronisation.
(realtime-send-form plan {:keys [auth-form result-sym arg-form] :as forms})Builds the canonical private realtime-send-request wrapper form.
Builds the canonical private realtime-send-request wrapper form.
(result-path-form root path text?)Builds the supported PostgreSQL DSL form for reading JSON result paths.
Builds the supported PostgreSQL DSL form for reading JSON result paths.
(shape-rows shape)(shape-rows shape path)Returns [table path cardinality] entries for every table row represented by a typed output shape. A blank path denotes the complete RPC result.
Returns [table path cardinality] entries for every table row represented by a typed output shape. A blank path denotes the complete RPC result.
(snake-name x)(topic-id-form {:keys [kind name path]} {:keys [auth-form result-sym arg-form]})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 |