mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-04-09 11:46:19 +00:00
Integrate new protocol crate to connection
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user