Module helpers

Module helpers 

Source

Functionsยง

alias_visibility_warning
Emits a warning for unsupported alias usage in a SQL clause.
build_column_schemas_with_constraints
Build column schemas with constraint information from DDL column definitions.
canonical_name_from_object_name
Build a CanonicalName from an ObjectName without string round-trips.
canonical_type_from_data_type
Convert SQL data type to CanonicalType
check_expr_types
Checks an expression for type mismatches and returns any warnings found.
classify_query_type
Classify the type of a query
extract_column_constraints
Extract constraint info from column options (inline PRIMARY KEY, FOREIGN KEY).
extract_simple_name
extract_simple_name_from_object_name
Extract the simple (unqualified) name from an ObjectName.
extract_table_constraints
Extract table-level constraints (composite PRIMARY KEY, FOREIGN KEY, UNIQUE).
find_cte_definition_span
Finds the span of a CTE definition name in SQL text.
find_derived_table_alias_span
Finds the span of a derived table alias in SQL text.
find_identifier_span
Finds the byte offset span of an identifier in SQL text.
generate_column_node_id
Generate a deterministic column node ID
generate_edge_id
Generate a deterministic edge ID
generate_node_id
Generate a deterministic node ID based on type and name
generate_output_node_id
Generate a deterministic output node ID scoped to a statement.
ident_value
Get the unquoted value from an Ident.
infer_expr_type
Best-effort type inference for SQL expressions.
is_quoted_identifier
is_simple_column_ref
Check if an expression is a simple column reference (no transformation)
lateral_alias_warning
Emits a warning for unsupported lateral column alias usage.
line_col_to_offset
Calculates the byte offset for a given line and column in SQL text.
normalize_schema_type
Normalizes a schema type string to a canonical type display string.
parse_canonical_name
split_qualified_identifiers
unquote_identifier