(entries ctx)Returns all typed declarations in a postgres context.
Returns all typed declarations in a postgres context.
(entry ctx sym)Returns a typed declaration from a postgres context.
Returns a typed declaration from a postgres context.
(export-edn ctx)Returns a versioned, plain EDN data structure for a postgres typed context.
Pretty print the result with clojure.pprint/pprint or serialize it with
pr-str. Read serialized text with clojure.edn/read-string before passing
it to import-edn.
Function filters are runtime values and therefore must be supplied again to
APIs such as export-openapi after importing.
Returns a versioned, plain EDN data structure for a postgres typed context. Pretty print the result with `clojure.pprint/pprint` or serialize it with `pr-str`. Read serialized text with `clojure.edn/read-string` before passing it to `import-edn`. Function filters are runtime values and therefore must be supplied again to APIs such as `export-openapi` after importing.
(export-json-schema ctx)Generates JSON Schema from a postgres typed context.
Generates JSON Schema from a postgres typed context.
(export-openapi ctx)(export-openapi ctx fn-filter-or-opts)(export-openapi ctx fn-filter opts)Generates OpenAPI from a postgres typed context.
Generates OpenAPI from a postgres typed context.
(export-typescript ctx)Generates TypeScript definitions from a postgres typed context.
Generates TypeScript definitions from a postgres typed context.
(export-views ctx)(export-views ctx filter-or-opts)Generates the versioned JSON publication for typed postgres views.
The optional argument may be a predicate over [symbol descriptor] view
entries or an options map with :filter, :source-namespaces, and
:preserve-source-order?. By default, all namespaces in the context are
inspected.
Generates the versioned JSON publication for typed postgres views. The optional argument may be a predicate over `[symbol descriptor]` view entries or an options map with `:filter`, `:source-namespaces`, and `:preserve-source-order?`. By default, all namespaces in the context are inspected.
(format-shape shape format)(function-contract ctx fn-ref)(function-contract ctx fn-ref opts)Returns the function report plus formatted input and output schemas.
Returns the function report plus formatted input and output schemas.
(function-def ctx fn-ref)Resolves and enriches a function definition from a postgres context.
Resolves and enriches a function definition from a postgres context.
(function-input ctx fn-ref)(function-input ctx fn-ref arg-sym)Returns all inputs, or a single input by argument symbol.
Returns all inputs, or a single input by argument symbol.
(function-output ctx fn-ref)Returns the declared postgres function output.
Returns the declared postgres function output.
(function-report ctx fn-ref)Returns the postgres inference report for a function in a context.
Returns the postgres inference report for a function in a context.
(import-edn snapshot)Returns a postgres typed context from a snapshot data structure.
Returns a postgres typed context from a snapshot data structure.
(inferred->shape inferred)(input-schema ctx fn-ref arg-sym)(input-schema ctx fn-ref arg-sym format)Formats an inferred postgres JSONB input shape.
Formats an inferred postgres JSONB input shape.
(input-shape ctx fn-ref arg-sym)Infers a JsonbShape for a postgres function input. Returns nil when not inferable.
Infers a JsonbShape for a postgres function input. Returns nil when not inferable.
(load-analysis analysis)Creates a postgres typed context from parsed analysis.
Creates a postgres typed context from parsed analysis.
(load-app app-name)Creates a postgres typed context from an app typed payload.
Creates a postgres typed context from an app typed payload.
(load-file file-path)Creates a postgres typed context from a source file.
Creates a postgres typed context from a source file.
(load-full app-name)(load-full app-name function-filter)Creates a typed context with all declarations from modules belonging to an app.
The application registry remains authoritative for tables. Module enums and functions are parsed again so generated namespaces, including RPC modules, are present even when the app typed payload is stale or incomplete.
Creates a typed context with all declarations from modules belonging to an app. The application registry remains authoritative for tables. Module enums and functions are parsed again so generated namespaces, including RPC modules, are present even when the app typed payload is stale or incomplete.
(load-ns ns-sym)Creates a postgres typed context from a namespace.
Creates a postgres typed context from a namespace.
(load-registry)(load-registry registry)Creates a postgres typed context from a registry map, defaulting to the current registry.
Creates a postgres typed context from a registry map, defaulting to the current registry.
(missing-argument! fn-ref arg-sym)(missing-function! fn-ref)(output-schema ctx fn-ref)(output-schema ctx fn-ref format)Formats an inferred postgres output shape.
Formats an inferred postgres output shape.
(output-shape ctx fn-ref)Infers a JsonbShape for a postgres function output. Returns nil when not inferable.
Infers a JsonbShape for a postgres function output. Returns nil when not inferable.
(registry->typed registry)Builds a typed payload from a flat registry map.
Builds a typed payload from a flat registry map.
(report-json report)(report-json report pretty?)Serializes an infer report to JSON.
Serializes an infer report to JSON.
(typed->registry typed)Flattens an app typed payload into the registry shape expected by inference.
Flattens an app typed payload into the registry shape expected by inference.
(with-context-registry ctx f)Runs f with the context registry visible to existing inference internals.
Runs `f` with the context registry visible to existing inference internals.
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 |