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
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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 T where
T: 'static + IntoIden,
impl<T> IntoColumnRef for T where
T: 'static + IntoIden,
fn into_column_ref(self) -> ColumnRef
sourceimpl<T> IntoIdentity for T where
T: IdenStatic,
impl<T> IntoIdentity for T where
T: IdenStatic,
sourcefn into_identity(self) -> Identity
fn into_identity(self) -> Identity
Method to perform the conversion
impl<I> IntoIndexColumn for I where
I: IntoIden,
impl<I> IntoIndexColumn for I where
I: IntoIden,
fn into_index_column(self) -> IndexColumn
impl<T> IntoTableRef for T where
T: 'static + IntoIden,
impl<T> IntoTableRef for T where
T: 'static + IntoIden,
fn into_table_ref(self) -> TableRef
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more