Struct postgres::CopyInStatement
[−]
[src]
pub struct CopyInStatement<'a> { // some fields omitted }
A prepared COPY FROM STDIN
statement.
Methods
impl<'a> CopyInStatement<'a>
[src]
fn column_types(&self) -> &[Type]
Returns a slice containing the expected column types.
fn execute<I, J>(&self, rows: I) -> Result<u64> where I: Iterator<Item=J>, J: StreamIterator
Executes the prepared statement.
The rows
argument is an Iterator
returning StreamIterator
values,
each one of which provides values for a row of input. This setup is
designed to allow callers to avoid having to maintain the entire row
set in memory.
Returns the number of rows copied.
fn finish(self) -> Result<()>
Consumes the statement, clearing it from the Postgres session.
Functionally identical to the Drop
implementation of the
CopyInStatement
except that it returns any error to the
caller.