Skip to content

Commit 4eda9ce

Browse files
committed
PostgresCopyInStatement -> CopyInStatement
1 parent 7248912 commit 4eda9ce

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/lib.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ impl InnerConnection {
580580
}
581581

582582
fn prepare_copy_in<'a>(&mut self, table: &str, rows: &[&str], conn: &'a Connection)
583-
-> Result<PostgresCopyInStatement<'a>> {
583+
-> Result<CopyInStatement<'a>> {
584584
let mut query = MemWriter::new();
585585
let _ = write!(query, "SELECT ");
586586
let _ = util::comma_join(&mut query, rows.iter().map(|&e| e));
@@ -598,7 +598,7 @@ impl InnerConnection {
598598
let query = String::from_utf8(query.unwrap()).unwrap();
599599
let (stmt_name, _, _) = try!(self.raw_prepare(query[]));
600600

601-
Ok(PostgresCopyInStatement {
601+
Ok(CopyInStatement {
602602
conn: conn,
603603
name: stmt_name,
604604
column_types: column_types,
@@ -832,7 +832,7 @@ impl Connection {
832832
/// # Ok(()) };
833833
/// ```
834834
pub fn prepare_copy_in<'a>(&'a self, table: &str, rows: &[&str])
835-
-> Result<PostgresCopyInStatement<'a>> {
835+
-> Result<CopyInStatement<'a>> {
836836
let mut conn = self.conn.borrow_mut();
837837
if conn.trans_depth != 0 {
838838
return Err(PgWrongTransaction);
@@ -1024,7 +1024,7 @@ impl<'conn> Transaction<'conn> {
10241024

10251025
/// Like `Connection::prepare_copy_in`.
10261026
pub fn prepare_copy_in<'a>(&'a self, table: &str, cols: &[&str])
1027-
-> Result<PostgresCopyInStatement<'a>> {
1027+
-> Result<CopyInStatement<'a>> {
10281028
let mut conn = self.conn.conn.borrow_mut();
10291029
if conn.trans_depth != self.depth {
10301030
return Err(PgWrongTransaction);
@@ -1552,23 +1552,23 @@ impl<'trans, 'stmt> Iterator<Result<PostgresRow<'stmt>>>
15521552
}
15531553

15541554
/// A prepared COPY FROM STDIN statement
1555-
pub struct PostgresCopyInStatement<'a> {
1555+
pub struct CopyInStatement<'a> {
15561556
conn: &'a Connection,
15571557
name: String,
15581558
column_types: Vec<PostgresType>,
15591559
finished: bool,
15601560
}
15611561

15621562
#[unsafe_destructor]
1563-
impl<'a> Drop for PostgresCopyInStatement<'a> {
1563+
impl<'a> Drop for CopyInStatement<'a> {
15641564
fn drop(&mut self) {
15651565
if !self.finished {
15661566
let _ = self.finish_inner();
15671567
}
15681568
}
15691569
}
15701570

1571-
impl<'a> PostgresCopyInStatement<'a> {
1571+
impl<'a> CopyInStatement<'a> {
15721572
fn finish_inner(&mut self) -> Result<()> {
15731573
let mut conn = self.conn.conn.borrow_mut();
15741574
check_desync!(conn);
@@ -1701,7 +1701,7 @@ impl<'a> PostgresCopyInStatement<'a> {
17011701
/// Consumes the statement, clearing it from the Postgres session.
17021702
///
17031703
/// Functionally identical to the `Drop` implementation of the
1704-
/// `PostgresCopyInStatement` except that it returns any error to the
1704+
/// `CopyInStatement` except that it returns any error to the
17051705
/// caller.
17061706
pub fn finish(mut self) -> Result<()> {
17071707
self.finished = true;
@@ -1721,7 +1721,7 @@ pub trait GenericConnection {
17211721

17221722
/// Like `Connection::prepare_copy_in`.
17231723
fn prepare_copy_in<'a>(&'a self, table: &str, columns: &[&str])
1724-
-> Result<PostgresCopyInStatement<'a>>;
1724+
-> Result<CopyInStatement<'a>>;
17251725

17261726
/// Like `Connection::transaction`.
17271727
fn transaction<'a>(&'a self) -> Result<Transaction<'a>>;
@@ -1740,7 +1740,7 @@ impl GenericConnection for Connection {
17401740
}
17411741

17421742
fn prepare_copy_in<'a>(&'a self, table: &str, columns: &[&str])
1743-
-> Result<PostgresCopyInStatement<'a>> {
1743+
-> Result<CopyInStatement<'a>> {
17441744
self.prepare_copy_in(table, columns)
17451745
}
17461746

@@ -1759,7 +1759,7 @@ impl<'a> GenericConnection for Transaction<'a> {
17591759
}
17601760

17611761
fn prepare_copy_in<'a>(&'a self, table: &str, columns: &[&str])
1762-
-> Result<PostgresCopyInStatement<'a>> {
1762+
-> Result<CopyInStatement<'a>> {
17631763
self.prepare_copy_in(table, columns)
17641764
}
17651765

0 commit comments

Comments
 (0)