pub struct ColumnGrants {
pub grantee: GranteeType,
pub relation: DbObjectId,
pub with_grant_option: bool,
pub privilege_columns: BTreeMap<String, BTreeSet<String>>,
pub depends_on: Vec<DbObjectId>,
pub rep_id: String,
}Expand description
Column-level grants for a single (grantee, relation, grant-option) tuple,
grouped by privilege so they render as one statement.
Grant identity stays per-column everywhere else in the model (catalog fetch,
Grant::id(), dependency tracking); this is purely an output-shaping
representation built right before ordering.
Fields§
§grantee: GranteeType§relation: DbObjectIdThe owning relation (Table or View). Column grants reference the bare relation in SQL, with the columns attached to each privilege.
with_grant_option: bool§privilege_columns: BTreeMap<String, BTreeSet<String>>Privilege -> the columns it applies to, e.g.
{"SELECT": {"a", "b"}, "UPDATE": {"a"}}. Sorted map/sets keep the
rendered privilege and column order stable across runs.
depends_on: Vec<DbObjectId>What this grant orders after — always the owning relation.
rep_id: StringThe id of one constituent per-column grant, used as this operation’s
identity for dependency ordering. For GrantColumns it names a grant
present in the new catalog; for RevokeColumns, one present in the old
catalog — so ordering resolves the relation edge in the correct
direction (create: relation -> grant; drop: revoke -> relation).
Implementations§
Source§impl ColumnGrants
impl ColumnGrants
Sourcepub fn relation_schema_and_name(&self) -> (String, String)
pub fn relation_schema_and_name(&self) -> (String, String)
The (schema, name) of the owning relation. The relation is always a
table or view (the only relations with grantable columns).
Trait Implementations§
Source§impl Clone for ColumnGrants
impl Clone for ColumnGrants
Auto Trait Implementations§
impl Freeze for ColumnGrants
impl RefUnwindSafe for ColumnGrants
impl Send for ColumnGrants
impl Sync for ColumnGrants
impl Unpin for ColumnGrants
impl UnsafeUnpin for ColumnGrants
impl UnwindSafe for ColumnGrants
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more