pub struct SQLiteDDL {
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
SQLite DDL collection - stores all schema entities
This is the main type for working with DDL entities. It provides typed access to each entity type with collection operations.
Fields§
§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 SQLiteDDL
impl SQLiteDDL
Sourcepub fn from_entities(entities: Vec<SqliteEntity>) -> SQLiteDDL
pub fn from_entities(entities: Vec<SqliteEntity>) -> SQLiteDDL
Create DDL from a list of entities
Sourcepub fn push_entity(&mut self, entity: SqliteEntity)
pub fn push_entity(&mut self, entity: SqliteEntity)
Push any entity type
Sourcepub fn to_entities(&self) -> Vec<SqliteEntity>
pub fn to_entities(&self) -> Vec<SqliteEntity>
Convert to entity array for snapshot serialization
Sourcepub fn table_entities<'a>(&'a self, table_name: &str) -> TableEntities<'a>
pub fn table_entities<'a>(&'a self, table_name: &str) -> TableEntities<'a>
Get all entities for a specific table
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SQLiteDDL
impl RefUnwindSafe for SQLiteDDL
impl Send for SQLiteDDL
impl Sync for SQLiteDDL
impl Unpin for SQLiteDDL
impl UnsafeUnpin for SQLiteDDL
impl UnwindSafe for SQLiteDDL
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