Fixing fmt on the files I changed, forgot to check prior to previous commit
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
use crate::{Config, CopyInWriter, CopyOutReader, GenericConnection, RowIter, Statement, ToStatement, Transaction};
|
||||
use crate::{
|
||||
Config, CopyInWriter, CopyOutReader, GenericConnection, RowIter, Statement, ToStatement,
|
||||
Transaction,
|
||||
};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use tokio::runtime::Runtime;
|
||||
use tokio_postgres::tls::{MakeTlsConnect, TlsConnect};
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
use crate::{Statement, Transaction};
|
||||
use tokio_postgres::types::{ToSql};
|
||||
use tokio_postgres::types::ToSql;
|
||||
use tokio_postgres::{Error, Row};
|
||||
|
||||
/// A trait allowing abstraction over connections and transactions
|
||||
pub trait GenericConnection {
|
||||
/// Like `Client::execute`.
|
||||
fn execute(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>;
|
||||
/// Like `Client::execute`.
|
||||
fn execute(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<u64, Error>;
|
||||
|
||||
/// Like `Client::query`.
|
||||
fn query(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>;
|
||||
/// Like `Client::query`.
|
||||
fn query(&mut self, query: &str, params: &[&(dyn ToSql + Sync)]) -> Result<Vec<Row>, Error>;
|
||||
|
||||
/// Like `Client::prepare`.
|
||||
fn prepare(&mut self, query: &str) -> Result<Statement, Error>;
|
||||
/// Like `Client::prepare`.
|
||||
fn prepare(&mut self, query: &str) -> Result<Statement, Error>;
|
||||
|
||||
/// Like `Client::transaction`.
|
||||
fn transaction(&mut self) -> Result<Transaction<'_>, Error>;
|
||||
/// Like `Client::transaction`.
|
||||
fn transaction(&mut self) -> Result<Transaction<'_>, Error>;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
use crate::{CopyInWriter, CopyOutReader, GenericConnection, Portal, RowIter, Rt, Statement, ToStatement};
|
||||
use crate::{
|
||||
CopyInWriter, CopyOutReader, GenericConnection, Portal, RowIter, Rt, Statement, ToStatement,
|
||||
};
|
||||
use tokio::runtime::Runtime;
|
||||
use tokio_postgres::types::{ToSql, Type};
|
||||
use tokio_postgres::{Error, Row, SimpleQueryMessage};
|
||||
|
||||
Reference in New Issue
Block a user