Try to parse a tenant DDL statement from the upper-cased token slice. Returns `None` if the statement is not a recognized tenant DDL form. Returns `Some(Err(...))` on a syntax error in an otherwise-recognized form.
(
upper: &str,
parts: &[&str],
original: &str,
)
| 19 | /// Returns `None` if the statement is not a recognized tenant DDL form. |
| 20 | /// Returns `Some(Err(...))` on a syntax error in an otherwise-recognized form. |
| 21 | pub(super) fn try_parse( |
| 22 | upper: &str, |
| 23 | parts: &[&str], |
| 24 | original: &str, |
| 25 | ) -> Option<Result<NodedbStatement, SqlError>> { |
| 26 | match parts.first().map(|s| s.to_uppercase()).as_deref() { |
| 27 | Some("ALTER") => try_parse_alter_tenant(upper, parts, original), |
| 28 | Some("SHOW") => try_parse_show_tenant(parts), |
| 29 | _ => None, |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | // ── ALTER TENANT ────────────────────────────────────────────────────────────── |
| 34 |
no test coverage detected