pub struct PostgresDDL {Show 13 fields
pub schemas: EntityCollection<Schema>,
pub enums: EntityCollection<Enum>,
pub sequences: EntityCollection<Sequence>,
pub roles: EntityCollection<Role>,
pub policies: EntityCollection<Policy>,
pub tables: EntityCollection<Table>,
pub columns: EntityCollection<Column>,
pub indexes: EntityCollection<Index>,
pub fks: EntityCollection<ForeignKey>,
pub pks: EntityCollection<PrimaryKey>,
pub uniques: EntityCollection<UniqueConstraint>,
pub checks: EntityCollection<CheckConstraint>,
pub views: EntityCollection<View>,
}Available on crate feature
std only.Expand description
PostgreSQL DDL collection - stores all schema entities
Fields§
§schemas: EntityCollection<Schema>§enums: EntityCollection<Enum>§sequences: EntityCollection<Sequence>§roles: EntityCollection<Role>§policies: EntityCollection<Policy>§tables: EntityCollection<Table>§columns: EntityCollection<Column>§indexes: EntityCollection<Index>§fks: EntityCollection<ForeignKey>§pks: EntityCollection<PrimaryKey>§uniques: EntityCollection<UniqueConstraint>§checks: EntityCollection<CheckConstraint>§views: EntityCollection<View>Implementations§
Source§impl PostgresDDL
impl PostgresDDL
Sourcepub fn new() -> PostgresDDL
pub fn new() -> PostgresDDL
Create a new empty DDL collection
Sourcepub fn from_entities(entities: Vec<PostgresEntity>) -> PostgresDDL
pub fn from_entities(entities: Vec<PostgresEntity>) -> PostgresDDL
Create DDL from a list of entities
Sourcepub fn push_entity(&mut self, entity: PostgresEntity)
pub fn push_entity(&mut self, entity: PostgresEntity)
Push any entity type
Sourcepub fn to_entities(&self) -> Vec<PostgresEntity>
pub fn to_entities(&self) -> Vec<PostgresEntity>
Convert to entity array for snapshot serialization
Trait Implementations§
Source§impl Clone for PostgresDDL
impl Clone for PostgresDDL
Source§fn clone(&self) -> PostgresDDL
fn clone(&self) -> PostgresDDL
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgresDDL
impl Debug for PostgresDDL
Source§impl Default for PostgresDDL
impl Default for PostgresDDL
Source§fn default() -> PostgresDDL
fn default() -> PostgresDDL
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PostgresDDL
impl RefUnwindSafe for PostgresDDL
impl Send for PostgresDDL
impl Sync for PostgresDDL
impl Unpin for PostgresDDL
impl UnsafeUnpin for PostgresDDL
impl UnwindSafe for PostgresDDL
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