sentinel_driver/connection/
copy_impl.rs1use super::{copy, Connection, Result};
2
3impl Connection {
4 pub async fn copy_in(&mut self, sql: &str) -> Result<copy::CopyIn<'_>> {
6 let (format, col_count) = copy::start_copy_in(&mut self.conn, sql).await?;
7 Ok(copy::CopyIn::new(&mut self.conn, format, col_count))
8 }
9
10 pub async fn copy_out(&mut self, sql: &str) -> Result<copy::CopyOut<'_>> {
12 let format = copy::start_copy_out(&mut self.conn, sql).await?;
13 Ok(copy::CopyOut::new(&mut self.conn, format))
14 }
15}