risingwave_meta::controller::utils

Function rename_relation

source
pub async fn rename_relation(
    txn: &DatabaseTransaction,
    object_type: ObjectType,
    object_id: ObjectId,
    object_name: &str,
) -> MetaResult<(Vec<PbRelation>, String)>
Expand description

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.