Trait 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>; }
Available on crate feature postgres_backend only.
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>,

Available on crate feature postgres only.
§

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, Self: ExecuteCopyFromDsl<C>,

Available on crate feature r2d2 only.