LCOV - code coverage report
Current view: top level - libs/compute_api/src - privilege.rs (source / functions) Coverage Total Hit
Test: 7179b4db0d82ca8088cc95c44c4be4232078509c.info Lines: 0.0 % 16 0
Test Date: 2024-11-21 16:46:58 Functions: 0.0 % 12 0

            Line data    Source code
       1            0 : #[derive(Debug, Clone, serde::Deserialize, serde::Serialize)]
       2              : #[serde(rename_all = "UPPERCASE")]
       3              : pub enum Privilege {
       4              :     Select,
       5              :     Insert,
       6              :     Update,
       7              :     Delete,
       8              :     Truncate,
       9              :     References,
      10              :     Trigger,
      11              :     Usage,
      12              :     Create,
      13              :     Connect,
      14              :     Temporary,
      15              :     Execute,
      16              : }
      17              : 
      18              : impl Privilege {
      19            0 :     pub fn as_str(&self) -> &'static str {
      20            0 :         match self {
      21            0 :             Privilege::Select => "SELECT",
      22            0 :             Privilege::Insert => "INSERT",
      23            0 :             Privilege::Update => "UPDATE",
      24            0 :             Privilege::Delete => "DELETE",
      25            0 :             Privilege::Truncate => "TRUNCATE",
      26            0 :             Privilege::References => "REFERENCES",
      27            0 :             Privilege::Trigger => "TRIGGER",
      28            0 :             Privilege::Usage => "USAGE",
      29            0 :             Privilege::Create => "CREATE",
      30            0 :             Privilege::Connect => "CONNECT",
      31            0 :             Privilege::Temporary => "TEMPORARY",
      32            0 :             Privilege::Execute => "EXECUTE",
      33              :         }
      34            0 :     }
      35              : }
        

Generated by: LCOV version 2.1-beta