We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 011d531 commit 4863433Copy full SHA for 4863433
1 file changed
src/lib.rs
@@ -1016,6 +1016,16 @@ impl<'conn> PostgresTransaction<'conn> {
1016
conn.prepare(query, self.conn)
1017
}
1018
1019
+ /// Like `PostgresConnection::prepare_copy_in`.
1020
+ pub fn prepare_copy_in<'a>(&'a self, table: &str, cols: &[&str])
1021
+ -> PostgresResult<PostgresCopyInStatement<'a>> {
1022
+ let mut conn = self.conn.conn.borrow_mut();
1023
+ if conn.trans_depth != self.depth {
1024
+ return Err(PgWrongTransaction);
1025
+ }
1026
+ conn.prepare_copy_in(table, cols, self.conn)
1027
1028
+
1029
/// Like `PostgresConnection::execute`.
1030
pub fn execute(&self, query: &str, params: &[&ToSql]) -> PostgresResult<uint> {
1031
self.prepare(query).and_then(|s| s.execute(params))
0 commit comments