Liking cljdoc? Tell your friends :D

postgres.typed


entriesclj

(entries ctx)

Returns all typed declarations in a postgres context.

Returns all typed declarations in a postgres context.
raw docstring

entryclj

(entry ctx sym)

Returns a typed declaration from a postgres context.

Returns a typed declaration from a postgres context.
raw docstring

export-ednclj

(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.
raw docstring

export-json-schemaclj

(export-json-schema ctx)

Generates JSON Schema from a postgres typed context.

Generates JSON Schema from a postgres typed context.
raw docstring

export-openapiclj

(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.
raw docstring

export-typescriptclj

(export-typescript ctx)

Generates TypeScript definitions from a postgres typed context.

Generates TypeScript definitions from a postgres typed context.
raw docstring

export-viewsclj

(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.
raw docstring

format-shapeclj

(format-shape shape format)

function-contractclj

(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.
raw docstring

function-defclj

(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.
raw docstring

function-inputclj

(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.
raw docstring

function-outputclj

(function-output ctx fn-ref)

Returns the declared postgres function output.

Returns the declared postgres function output.
raw docstring

function-reportclj

(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.
raw docstring

import-ednclj

(import-edn snapshot)

Returns a postgres typed context from a snapshot data structure.

Returns a postgres typed context from a snapshot data structure.
raw docstring

inferred->shapeclj

(inferred->shape inferred)

input-schemaclj

(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.
raw docstring

input-shapeclj

(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.
raw docstring

load-analysisclj

(load-analysis analysis)

Creates a postgres typed context from parsed analysis.

Creates a postgres typed context from parsed analysis.
raw docstring

load-appclj

(load-app app-name)

Creates a postgres typed context from an app typed payload.

Creates a postgres typed context from an app typed payload.
raw docstring

load-fileclj

(load-file file-path)

Creates a postgres typed context from a source file.

Creates a postgres typed context from a source file.
raw docstring

load-fullclj

(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.
raw docstring

load-nsclj

(load-ns ns-sym)

Creates a postgres typed context from a namespace.

Creates a postgres typed context from a namespace.
raw docstring

load-registryclj

(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.
raw docstring

missing-argument!clj

(missing-argument! fn-ref arg-sym)

missing-function!clj

(missing-function! fn-ref)

output-schemaclj

(output-schema ctx fn-ref)
(output-schema ctx fn-ref format)

Formats an inferred postgres output shape.

Formats an inferred postgres output shape.
raw docstring

output-shapeclj

(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.
raw docstring

registry->typedclj

(registry->typed registry)

Builds a typed payload from a flat registry map.

Builds a typed payload from a flat registry map.
raw docstring

report-jsonclj

(report-json report)
(report-json report pretty?)

Serializes an infer report to JSON.

Serializes an infer report to JSON.
raw docstring

typed->registryclj

(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.
raw docstring

with-context-registryclj

(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.
raw 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