pub use chrono::{NaiveDate, NaiveDateTime, NaiveTime};
pub use postgres::types::ToSql;
pub use postgres::{
tls::{MakeTlsConnect, TlsConnect},
Error, NoTls, Socket,
};
pub use rand;
pub use rand::Rng;
pub use serde_json;
pub use uuid::Uuid;
pub use rand::distributions::Alphanumeric;
pub use serde::{Deserialize, Serialize};
#[macro_use]
pub mod method;
pub struct Client;
impl Client {
pub fn connect<T>(client: &str, tls_mode: T) -> Result<postgres::Client, Error>
where
T: MakeTlsConnect<Socket> + 'static + Send,
T::TlsConnect: Send,
T::Stream: Send,
<T::TlsConnect as TlsConnect<Socket>>::Future: Send,
{
let client = postgres::Client::connect(client, tls_mode);
client
}
}