pub struct Table {Show 14 fields
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,
pub access_method: Option<Identifier>,
pub tablespace: Option<Identifier>,
}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.
access_method: Option<Identifier>Table access method (CREATE TABLE … USING <am>). None = inherit the
cluster default (heap). Canon normalizes Some("heap") → None.
tablespace: Option<Identifier>Tablespace placement (TABLESPACE <name>). None = the database default (pg_default). Applies to regular tables, partitioned parents (default for future partitions), and partition children (overrides parent default).
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>,
Source§impl Equiv for Table
impl Equiv for Table
Source§fn differences(&self, other: &Self) -> Vec<Difference>
fn differences(&self, other: &Self) -> Vec<Difference>
self and other. Empty list = equivalent.Source§fn canonical_eq(&self, other: &Self) -> bool
fn canonical_eq(&self, other: &Self) -> bool
true iff self.differences(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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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