do not quote privileges

This commit is contained in:
Conrad Ludgate
2024-10-17 11:50:12 +01:00
parent 6de90c7ce4
commit eda964f7c4
2 changed files with 21 additions and 2 deletions

View File

@@ -14,3 +14,22 @@ pub enum Privilege {
Temporary,
Execute,
}
impl Privilege {
pub fn as_str(&self) -> &'static str {
match self {
Privilege::Select => "SELECT",
Privilege::Insert => "INSERT",
Privilege::Update => "UPDATE",
Privilege::Delete => "DELETE",
Privilege::Truncate => "TRUNCATE",
Privilege::References => "REFERENCES",
Privilege::Trigger => "TRIGGER",
Privilege::Usage => "USAGE",
Privilege::Create => "CREATE",
Privilege::Connect => "CONNECT",
Privilege::Temporary => "TEMPORARY",
Privilege::Execute => "EXECUTE",
}
}
}