diff --git a/lib/src/sql/permission.rs b/lib/src/sql/permission.rs index 94d6a867..bf5b893d 100644 --- a/lib/src/sql/permission.rs +++ b/lib/src/sql/permission.rs @@ -143,7 +143,7 @@ pub enum Permission { impl Default for Permission { fn default() -> Self { - Permission::None + Permission::Full } } diff --git a/lib/src/sql/statements/define.rs b/lib/src/sql/statements/define.rs index 2e24899d..3f1f6483 100644 --- a/lib/src/sql/statements/define.rs +++ b/lib/src/sql/statements/define.rs @@ -622,7 +622,9 @@ impl fmt::Display for DefineTableStatement { if let Some(ref v) = self.view { write!(f, " {}", v)? } - write!(f, " {}", self.permissions)?; + if !self.permissions.is_full() { + write!(f, " {}", self.permissions)?; + } Ok(()) } } @@ -840,7 +842,9 @@ impl fmt::Display for DefineFieldStatement { if let Some(ref v) = self.assert { write!(f, " ASSERT {}", v)? } - write!(f, " {}", self.permissions)?; + if !self.permissions.is_full() { + write!(f, " {}", self.permissions)?; + } Ok(()) } }