Skip to main content

validate_restrict_drop_and_collect_owned_objects

Function validate_restrict_drop_and_collect_owned_objects 

Source
pub async fn validate_restrict_drop_and_collect_owned_objects<C>(
    object_type: ObjectType,
    object_id: ObjectId,
    db: &C,
) -> MetaResult<Vec<PartialObject>>
where C: ConnectionTrait,
Expand description

Validates a RESTRICT drop and returns referring objects that should be dropped together.

Objects related through belong_to_oid are catalog-owned by the target. Indexes are also logically owned by their primary table for dropping, although they remain schema-owned catalog objects. These objects are dropped together with the target; all other referrers prevent the drop.