pub struct InsertManyBuilder<T: Domain, C: Creatable> { /* private fields */ }Implementations§
Source§impl<T: Domain, C: Creatable> InsertManyBuilder<T, C>
impl<T: Domain, C: Creatable> InsertManyBuilder<T, C>
pub fn new(data: Vec<C>) -> Self
Sourcepub async fn returning_pk<'e, 'c: 'e, E: 'e + Executor<'c, Database = Postgres>>(
self,
executor: E,
) -> Result<Vec<T::PrimaryKey>, Error>
pub async fn returning_pk<'e, 'c: 'e, E: 'e + Executor<'c, Database = Postgres>>( self, executor: E, ) -> Result<Vec<T::PrimaryKey>, Error>
执行 INSERT 并返回主键列表
生成: INSERT INTO table (cols) VALUES (v1), (v2), ... RETURNING "pk_field"
Auto Trait Implementations§
impl<T, C> Freeze for InsertManyBuilder<T, C>
impl<T, C> RefUnwindSafe for InsertManyBuilder<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for InsertManyBuilder<T, C>
impl<T, C> Sync for InsertManyBuilder<T, C>
impl<T, C> Unpin for InsertManyBuilder<T, C>where
C: Unpin,
impl<T, C> UnwindSafe for InsertManyBuilder<T, C>where
T: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more