Module transform

Source
Expand description

Provides a publicly available interface to transform our SQL ASTs.

StructsΒ§

CreateSqlIdReplacer πŸ”’
CreateSqlRewriteSchema πŸ”’
CreateSqlRewriter πŸ”’
QueryIdentAgg πŸ”’
Visits a Query, assessing catalog item Idents’ use of a specified Ident.

FunctionsΒ§

ambiguous_err πŸ”’
create_stmt_rename
Changes the name used in an item’s CREATE statement. To complete a rename operation, you must also call create_stmt_rename_refs on all dependent items.
create_stmt_rename_refs
Updates all references of from_name in create_stmt to to_name or errors if request is ambiguous.
create_stmt_rename_schema_refs
Given a Statement rewrites all references of the schema name cur_schema_name to new_schema_name.
create_stmt_replace_ids
Updates all CatalogItemIds from the keys of ids to the values of ids within create_stmt.
rewrite_query πŸ”’
Rewrites query’s references of from to to or errors if too ambiguous.