Postgres module

sql_type_of_text

procedureextensionexperimentalsince 0.27.0Source

The Jai type text of a field as the Postgres type that would hold it, or an empty string for a type that has no mapping. refs resolves the names of enums.

sql_type_of_text :: (text: string, refs: [] Enum_Ref) -> string

The Jai type text of a field as the Postgres type that would hold it, or an empty string for a type that has no mapping. refs resolves the names of enums.

Parameters

text: string
the field's type as written in Jai.
refs: [] Enum_Ref
the schema file's enums and the Postgres enums they stand for.

Returns

string

See also