Skip to main content

Module rename

Module rename 

Source

Structs§

IndexItemRewriter
Rewrite the expression in index item after there’s a schema change on the primary table.
QueryRewriter 🔒
QueryRewriter is a visitor that updates all references of relation named from to to in the given query, which is the part of create statement of relation.

Functions§

alter_relation_rename
alter_relation_rename renames a relation to a new name in its Create statement, and returns the updated definition raw sql. Note that the definition must be a Create statement and the new_name must be a valid identifier, it should be validated before calling this function. To update all relations that depend on the renamed one, use alter_relation_rename_refs.
alter_relation_rename_refs
alter_relation_rename_refs updates all references of renamed-relation in the definition of target relation’s Create statement.
parse_definition 🔒
A stored definition can come from an older version, so it may not parse anymore. The error leaves out the definition and the parser’s message, which quotes it, because the connector options in a definition can have secrets.
replace_table_name 🔒
Replace the last ident in the table_name with the given name, the object name is ensured to be non-empty. e.g. schema.table or database.schema.table.