(
scx: &StatementContext,
variable: SetRoleVar,
)
| 4491 | } |
| 4492 | |
| 4493 | fn plan_role_variable( |
| 4494 | scx: &StatementContext, |
| 4495 | variable: SetRoleVar, |
| 4496 | ) -> Result<PlannedRoleVariable, PlanError> { |
| 4497 | let plan = match variable { |
| 4498 | SetRoleVar::Set { name, value } => { |
| 4499 | let name = name.to_string(); |
| 4500 | let value = scl::plan_set_variable_to(value)?; |
| 4501 | // Gate feature-flagged isolation levels, matching the `SET` and |
| 4502 | // connection-option paths in `SessionVars::set`. |
| 4503 | if let VariableValue::Values(values) = &value { |
| 4504 | vars::check_transaction_isolation_feature_flag( |
| 4505 | &name, |
| 4506 | VarInput::SqlSet(values), |
| 4507 | scx.catalog.system_vars(), |
| 4508 | )?; |
| 4509 | } |
| 4510 | PlannedRoleVariable::Set { name, value } |
| 4511 | } |
| 4512 | SetRoleVar::Reset { name } => PlannedRoleVariable::Reset { |
| 4513 | name: name.to_string(), |
| 4514 | }, |
| 4515 | }; |
| 4516 | Ok(plan) |
| 4517 | } |
| 4518 | |
| 4519 | pub fn describe_create_role( |
| 4520 | _: &StatementContext, |
no test coverage detected