uqa_sql/ast/
type_privileges.rs1use serde::{Deserialize, Serialize};
10
11use super::{AclRoleSpecification, RoleSpecification, TypeObjectKind};
12
13#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
15pub enum TypePrivilege {
16 Usage,
17 Unsupported(String),
18}
19
20#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
21pub enum TypeRevokeBehavior {
22 Restrict,
23 Cascade,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize)]
28pub struct GrantTypeStmt {
29 pub kind: TypeObjectKind,
30 pub is_grant: bool,
31 pub grant_option: bool,
32 pub grant_option_only: bool,
33 pub privileges: Vec<TypePrivilege>,
34 pub names: Vec<String>,
36 pub grantees: Vec<AclRoleSpecification>,
37 pub grantor: Option<RoleSpecification>,
38 pub revoke_behavior: TypeRevokeBehavior,
39}