Struct sea_orm_migration::seaql_migrations::Entity
source · pub struct Entity;
Trait Implementations
sourceimpl EntityName for Entity
impl EntityName for Entity
sourcefn schema_name(&self) -> Option<&str>
fn schema_name(&self) -> Option<&str>
Method to get the name for the schema, defaults to Option::None if not set
sourcefn table_name(&self) -> &str
fn table_name(&self) -> &str
Get the name of the table
sourcefn module_name(&self) -> &str
fn module_name(&self) -> &str
Get the name of the module from the invoking
self.table_name()
sourceimpl EntityTrait for Entity
impl EntityTrait for Entity
type Model = Model
type Column = Column
type PrimaryKey = PrimaryKey
type Relation = Relation
sourcefn belongs_to<R>(related: R) -> RelationBuilder<Self, R>where
R: EntityTrait,
fn belongs_to<R>(related: R) -> RelationBuilder<Self, R>where
R: EntityTrait,
Check if the relation belongs to an Entity
sourcefn has_one<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
fn has_one<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
Check if the entity has at least one relation
sourcefn has_many<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
fn has_many<R>(_: R) -> RelationBuilder<Self, R>where
R: EntityTrait + Related<Self>,
Check if the Entity has many relations
sourcefn find_by_id(
values: <Self::PrimaryKey as PrimaryKeyTrait>::ValueType
) -> Select<Self>
fn find_by_id(
values: <Self::PrimaryKey as PrimaryKeyTrait>::ValueType
) -> Select<Self>
Find a model by primary key Read more
sourcefn insert<A>(model: A) -> Insert<A>where
A: ActiveModelTrait<Entity = Self>,
fn insert<A>(model: A) -> Insert<A>where
A: ActiveModelTrait<Entity = Self>,
Insert an model into database Read more
sourcefn insert_many<A, I>(models: I) -> Insert<A>where
A: ActiveModelTrait<Entity = Self>,
I: IntoIterator<Item = A>,
fn insert_many<A, I>(models: I) -> Insert<A>where
A: ActiveModelTrait<Entity = Self>,
I: IntoIterator<Item = A>,
Insert many models into database Read more
sourcefn update<A>(model: A) -> UpdateOne<A>where
A: ActiveModelTrait<Entity = Self>,
fn update<A>(model: A) -> UpdateOne<A>where
A: ActiveModelTrait<Entity = Self>,
Update an model in database Read more
sourcefn update_many() -> UpdateMany<Self>
fn update_many() -> UpdateMany<Self>
Update many models in database Read more
sourcefn delete<A>(model: A) -> DeleteOne<A>where
A: ActiveModelTrait<Entity = Self>,
fn delete<A>(model: A) -> DeleteOne<A>where
A: ActiveModelTrait<Entity = Self>,
Delete an model from database Read more
sourcefn delete_many() -> DeleteMany<Self>
fn delete_many() -> DeleteMany<Self>
Delete many models from database Read more
sourcefn delete_by_id(
values: <Self::PrimaryKey as PrimaryKeyTrait>::ValueType
) -> DeleteMany<Self>
fn delete_by_id(
values: <Self::PrimaryKey as PrimaryKeyTrait>::ValueType
) -> DeleteMany<Self>
Delete a model based on primary key Read more
sourceimpl From<<Entity as EntityTrait>::Model> for ActiveModel
impl From<<Entity as EntityTrait>::Model> for ActiveModel
sourcefn from(m: <Entity as EntityTrait>::Model) -> Self
fn from(m: <Entity as EntityTrait>::Model) -> Self
Converts to this type from the input type.
sourceimpl IdenStatic for Entity
impl IdenStatic for Entity
sourceimpl TryIntoModel<<Entity as EntityTrait>::Model> for ActiveModel
impl TryIntoModel<<Entity as EntityTrait>::Model> for ActiveModel
sourcefn try_into_model(self) -> Result<<Entity as EntityTrait>::Model, DbErr>
fn try_into_model(self) -> Result<<Entity as EntityTrait>::Model, DbErr>
Method to call to perform the conversion
impl Copy for Entity
Auto Trait Implementations
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoColumnRef for Twhere
T: 'static + IntoIden,
impl<T> IntoColumnRef for Twhere
T: 'static + IntoIden,
fn into_column_ref(self) -> ColumnRef
sourceimpl<T> IntoIdentity for Twhere
T: IdenStatic,
impl<T> IntoIdentity for Twhere
T: IdenStatic,
sourcefn into_identity(self) -> Identity
fn into_identity(self) -> Identity
Method to perform the conversion