Struct backend::db::burrow::Entity [−][src]
pub struct Entity;
Trait Implementations
Method to get the name for the schema, defaults to Option::None if not set
Get the name of the table
fn module_name(&self) -> &str
fn module_name(&self) -> &str
Get the name of the module from the invoking self.table_name()
fn table_ref(&self) -> TableRef
fn table_ref(&self) -> TableRef
Get the [TableRef] from invoking the self.schema_name()
type PrimaryKey = PrimaryKey
fn 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
fn 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
fn 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
fn 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
fn 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
fn 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
fn 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
fn update_many() -> UpdateMany<Self>
fn update_many() -> UpdateMany<Self>
Update many models in database Read more
fn 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
fn delete_many() -> DeleteMany<Self>
fn delete_many() -> DeleteMany<Self>
Delete many models from database Read more
Auto Trait Implementations
impl RefUnwindSafe for Entity
impl UnwindSafe for Entity
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn clone_any_send(&self) -> Box<dyn CloneAny + Send + 'static, Global> where
T: Send,
pub fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync + 'static, Global> where
T: Sync,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
pub fn into_column_ref(self) -> ColumnRef
pub fn into_identity(self) -> Identity
pub fn into_identity(self) -> Identity
Method to perform the conversion
pub fn into_index_column(self) -> IndexColumn
pub fn into_table_ref(self) -> TableRef
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more