(
scx: &StatementContext,
if_exists: bool,
name: &Ident,
cascade: bool,
)
| 5553 | } |
| 5554 | |
| 5555 | fn plan_drop_cluster( |
| 5556 | scx: &StatementContext, |
| 5557 | if_exists: bool, |
| 5558 | name: &Ident, |
| 5559 | cascade: bool, |
| 5560 | ) -> Result<Option<ClusterId>, PlanError> { |
| 5561 | Ok(match resolve_cluster(scx, name, if_exists)? { |
| 5562 | Some(cluster) => { |
| 5563 | if !cascade && !cluster.bound_objects().is_empty() { |
| 5564 | return Err(PlanError::DependentObjectsStillExist { |
| 5565 | object_type: "cluster".to_string(), |
| 5566 | object_name: cluster.name().to_string(), |
| 5567 | dependents: Vec::new(), |
| 5568 | }); |
| 5569 | } |
| 5570 | Some(cluster.id()) |
| 5571 | } |
| 5572 | None => None, |
| 5573 | }) |
| 5574 | } |
| 5575 | |
| 5576 | fn plan_drop_network_policy( |
| 5577 | scx: &StatementContext, |
no test coverage detected