pub struct Schema { /* private fields */ }
Expand description
This is a helper struct to convert EntityTrait
into different sea_query
statements.
Implementations§
source§impl Schema
impl Schema
sourcepub fn create_enum_from_active_enum<A>(&self) -> TypeCreateStatementwhere
A: ActiveEnum,
pub fn create_enum_from_active_enum<A>(&self) -> TypeCreateStatementwhere
A: ActiveEnum,
Creates Postgres enums from an ActiveEnum. See TypeCreateStatement for more details
sourcepub fn create_enum_from_entity<E>(&self, entity: E) -> Vec<TypeCreateStatement> ⓘwhere
E: EntityTrait,
pub fn create_enum_from_entity<E>(&self, entity: E) -> Vec<TypeCreateStatement> ⓘwhere
E: EntityTrait,
Creates Postgres enums from an Entity. See TypeCreateStatement for more details
sourcepub fn create_table_from_entity<E>(&self, entity: E) -> TableCreateStatementwhere
E: EntityTrait,
pub fn create_table_from_entity<E>(&self, entity: E) -> TableCreateStatementwhere
E: EntityTrait,
Creates a table from an Entity. See TableCreateStatement for more details.
sourcepub fn create_index_from_entity<E>(&self, entity: E) -> Vec<IndexCreateStatement> ⓘwhere
E: EntityTrait,
pub fn create_index_from_entity<E>(&self, entity: E) -> Vec<IndexCreateStatement> ⓘwhere
E: EntityTrait,
Creates the indexes from an Entity, returning an empty Vec if there are none to create. See IndexCreateStatement for more details