pub struct Table {
pub qname: QualifiedName,
pub columns: Vec<Column>,
pub constraints: Vec<Constraint>,
pub partition_by: Option<PartitionBy>,
pub partition_of: Option<PartitionOf>,
pub comment: Option<String>,
pub owner: Option<Identifier>,
pub grants: Vec<Grant>,
pub rls_enabled: bool,
pub rls_forced: bool,
pub policies: Vec<Policy>,
pub storage: TableStorageOptions,
}Expand description
A Postgres table.
Fields§
§qname: QualifiedNameSchema-qualified table name.
columns: Vec<Column>Columns in their logical order.
constraints: Vec<Constraint>Constraints, paired by qname for diffing.
partition_by: Option<PartitionBy>Some → this table is a partitioned parent (PARTITION BY …).
partition_of: Option<PartitionOf>Some → this table is itself a partition (PARTITION OF … FOR VALUES …).
comment: Option<String>Optional comment.
owner: Option<Identifier>Object owner. None = unmanaged (the differ ignores ownership).
Some(role) = managed: diff emits ALTER TABLE ... OWNER TO role.
grants: Vec<Grant>Grants on this object. Empty = no grants. Canonicalized.
rls_enabled: boolROW LEVEL SECURITY enabled flag. PG default: false.
rls_forced: boolFORCE ROW LEVEL SECURITY flag (applies even to owner). PG default: false.
policies: Vec<Policy>Policies attached to this table. Canonicalized in ir::canon::policies.
storage: TableStorageOptionsStorage parameters (WITH (fillfactor = …, autovacuum_* = …, …)).
Default is the empty/no-overrides state.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Table
impl<'de> Deserialize<'de> for Table
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Diff for Table
impl Diff for Table
Source§fn diff(&self, other: &Self) -> Vec<Difference>
fn diff(&self, other: &Self) -> Vec<Difference>
List the differences between
self and other. Empty list = equivalent.Source§fn canonical_eq(&self, other: &Self) -> bool
fn canonical_eq(&self, other: &Self) -> bool
Convenience:
true iff self.diff(other).is_empty().impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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