Trait rocket_db_pools::diesel::prelude::ExecuteCopyFromDsl

source ·
pub trait ExecuteCopyFromDsl<C>
where C: Connection<Backend = Pg>,
{ type Error: Error; // Required method fn execute(self, conn: &mut C) -> Result<usize, Self::Error>; }
Expand description

A custom execute function tailored for COPY FROM statements

This trait can be used to execute COPY FROM queries constructed via [copy_from]

Required Associated Types§

source

type Error: Error

The error type returned by the execute function

Required Methods§

source

fn execute(self, conn: &mut C) -> Result<usize, Self::Error>

See the trait documentation for details

Implementors§

source§

impl<T, A> ExecuteCopyFromDsl<PgConnection> for CopyFromQuery<T, A>
where A: CopyFromExpression<T>,

source§

type Error = <A as CopyFromExpression<T>>::Error

source§

impl<T, A, C> ExecuteCopyFromDsl<PooledConnection<ConnectionManager<C>>> for CopyFromQuery<T, A>
where A: CopyFromExpression<T>, C: R2D2Connection<Backend = Pg> + 'static, CopyFromQuery<T, A>: ExecuteCopyFromDsl<C>,