rocket_db_pools::diesel::prelude

Trait 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>,