Structs§
QueryRewriter
is a visitor that updates all references of relation namedfrom
toto
in the given query, which is the part of create statement ofrelation
.
Functions§
alter_relation_rename
renames a relation to a new name in itsCreate
statement, and returns the updated definition raw sql. Note that thedefinition
must be aCreate
statement and thenew_name
must be a valid identifier, it should be validated before calling this function. To update all relations that depend on the renamed one, usealter_relation_rename_refs
.alter_relation_rename_refs
updates all references of renamed-relation in the definition of target relation’sCreate
statement.- 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
ordatabase.schema.table
.