Struct sea_orm::Inserter [−][src]
pub struct Inserter<A> where
A: ActiveModelTrait, { /* fields omitted */ }Expand description
Defines a structure to perform INSERT operations in an ActiveModel
Implementations
Instantiate a new insert operation
pub fn exec<'a, C>(
self,
db: &'a C
) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + '_ where
C: ConnectionTrait<'a>,
A: 'a,
pub fn exec<'a, C>(
self,
db: &'a C
) -> impl Future<Output = Result<InsertResult<A>, DbErr>> + '_ where
C: ConnectionTrait<'a>,
A: 'a,
Execute an insert operation
pub fn exec_with_returning<'a, C>(
self,
db: &'a C
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + '_ where
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
C: ConnectionTrait<'a>,
A: 'a,
pub fn exec_with_returning<'a, C>(
self,
db: &'a C
) -> impl Future<Output = Result<<A::Entity as EntityTrait>::Model, DbErr>> + '_ where
<A::Entity as EntityTrait>::Model: IntoActiveModel<A>,
C: ConnectionTrait<'a>,
A: 'a,
Execute an insert operation and return the inserted model (use RETURNING syntax if database supported)
Trait Implementations
Auto Trait Implementations
impl<A> !RefUnwindSafe for Inserter<A>
impl<A> !UnwindSafe for Inserter<A>
Blanket Implementations
Mutably borrows from an owned value. Read more
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