Struct moonramp_entity::program::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
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()
sourceimpl EntityTrait for Entity
impl EntityTrait for Entity
type Model = Model
type Column = Column
type PrimaryKey = PrimaryKey
type Relation = Relation
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
fn 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
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
impl<T> IntoIdentity for T where
T: IdenStatic,
impl<T> IntoIdentity for T where
T: IdenStatic,
fn 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
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
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