Integrate new protocol crate to connection

This commit is contained in:
Ryan Leckey
2019-06-22 21:44:13 -07:00
parent 22f71df7c7
commit 8a4c5ea2fe
17 changed files with 215 additions and 125 deletions

View File

@@ -1,17 +1,15 @@
#![feature(async_await)]
//use sqlx::{pg::Connection, ConnectOptions};
use sqlx::{pg::Connection, ConnectOptions};
#[runtime::main]
async fn main() -> Result<(), failure::Error> {
env_logger::try_init()?;
// let mut conn =
// Connection::establish(ConnectOptions::new().user("postgres").password("password")).await?;
//
// conn.execute("CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";").await?;
//
// conn.close().await?;
let conn =
Connection::establish(ConnectOptions::new().user("postgres").password("password")).await?;
conn.close().await?;
Ok(())
}