Skip to content

Commit

Permalink
add some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yezizp2012 committed Oct 29, 2024
1 parent f5dda74 commit 561a2f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion e2e_test/ddl/alter_swap_rename.slt
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ statement ok
DROP TABLE t1 CASCADE;

statement ok
DROP TABLE t2 CASCADE;
DROP TABLE t2 CASCADE;
4 changes: 4 additions & 0 deletions src/meta/src/controller/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,8 @@ pub fn extract_external_table_name_from_definition(table_definition: &str) -> Op
}
}

/// `rename_relation` renames the target relation and its definition,
/// it commits the changes to the transaction and returns the updated relations and the old name.
pub async fn rename_relation(
txn: &DatabaseTransaction,
object_type: ObjectType,
Expand Down Expand Up @@ -1257,6 +1259,8 @@ pub async fn rename_relation(
Ok((to_update_relations, old_name))
}

/// `rename_relation_refer` updates the definition of relations that refer to the target one,
/// it commits the changes to the transaction and returns all the updated relations.
pub async fn rename_relation_refer(
txn: &DatabaseTransaction,
object_type: ObjectType,
Expand Down

0 comments on commit 561a2f4

Please sign in to comment.