pub enum ParsedStatement {
Show 22 variants
Select(ParsedSelect),
Union(ParsedUnion),
CreateTable(ParsedCreateTable),
DropTable {
name: String,
if_exists: bool,
},
AlterTable(ParsedAlterTable),
CreateIndex(ParsedCreateIndex),
Insert(ParsedInsert),
Update(ParsedUpdate),
Delete(ParsedDelete),
CreateMask(ParsedCreateMask),
DropMask(String),
CreateMaskingPolicy(ParsedCreateMaskingPolicy),
DropMaskingPolicy(String),
AttachMaskingPolicy(ParsedAttachMaskingPolicy),
DetachMaskingPolicy(ParsedDetachMaskingPolicy),
SetClassification(ParsedSetClassification),
ShowClassifications(String),
ShowTables,
ShowColumns(String),
CreateRole(String),
Grant(ParsedGrant),
CreateUser(ParsedCreateUser),
}Expand description
Top-level parsed SQL statement.
Variants§
Select(ParsedSelect)
SELECT query
Union(ParsedUnion)
UNION / UNION ALL of two or more SELECT queries
CreateTable(ParsedCreateTable)
CREATE TABLE DDL
DropTable
DROP TABLE DDL.
if_exists = true corresponds to DROP TABLE IF EXISTS … —
the executor returns Ok (rows_affected = 0) when the named
table doesn’t exist, instead of TableNotFound. Idempotent
drops were a v0.7.0 ROADMAP item until v0.6.2 picked up the
fix while clearing test-infrastructure flake.
AlterTable(ParsedAlterTable)
ALTER TABLE DDL
CreateIndex(ParsedCreateIndex)
CREATE INDEX DDL
Insert(ParsedInsert)
INSERT DML
Update(ParsedUpdate)
UPDATE DML
Delete(ParsedDelete)
DELETE DML
CreateMask(ParsedCreateMask)
CREATE MASK DDL (legacy v0.4.x per-column form)
DropMask(String)
DROP MASK DDL (legacy v0.4.x per-column form)
CreateMaskingPolicy(ParsedCreateMaskingPolicy)
CREATE MASKING POLICY DDL (v0.6.0 tenant-scoped catalogue form)
DropMaskingPolicy(String)
DROP MASKING POLICY DDL — carries the policy name
AttachMaskingPolicy(ParsedAttachMaskingPolicy)
ALTER TABLE … ALTER COLUMN … SET MASKING POLICY <name>
DetachMaskingPolicy(ParsedDetachMaskingPolicy)
ALTER TABLE … ALTER COLUMN … DROP MASKING POLICY
SetClassification(ParsedSetClassification)
ALTER TABLE … MODIFY COLUMN … SET CLASSIFICATION
ShowClassifications(String)
SHOW CLASSIFICATIONS FOR <table>
ShowTables
SHOW TABLES
ShowColumns(String)
SHOW COLUMNS FROM <table>
CreateRole(String)
CREATE ROLE <name>
Grant(ParsedGrant)
GRANT privileges ON table TO role
CreateUser(ParsedCreateUser)
CREATE USER <name> WITH ROLE <role>
Trait Implementations§
Source§impl Clone for ParsedStatement
impl Clone for ParsedStatement
Source§fn clone(&self) -> ParsedStatement
fn clone(&self) -> ParsedStatement
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more