Expand description
Helpers shared by all AST โ IR builders.
- Schema-qualified name resolution (with
-- @pgevolve schema=defaulting). - Type-name stringification (so
crate::ir::column_type::ColumnType::parse_from_pg_type_stringcan decide the canonical form). - Default-expression classification (literal vs.
nextvalvs. arbitrary expr).
Functionsยง
- build_
default_ expr - Convert a column-default expression node into a
DefaultExpr. - def_
elem_ string - Extract a string value from a
DefElem.arg. - ident
- Build an unquoted
Identifier, wrappingcrate::ir::IrErrorinto a source-locatedParseError::Ir. - node_
string_ value - Extract the string value of a bare
StringNode. - qname_
from_ string_ list - Resolve a
repeated Nodetype-name list (as produced byCreateEnumStmt,CreateDomainStmt,CompositeTypeStmt, etc.) into aQualifiedName. - render_
type_ name_ to_ string - Render a
pg_query::TypeNameinto a stringColumnType::parse_from_pg_type_stringcan consume. - resolve_
qname - Resolve a
RangeVarinto aQualifiedName, filling indefault_schemawhen the source did not qualify the object. - type_
name_ to_ column_ type - Convert a
TypeNameinto aColumnType, propagating parser errors.