degen-sql 0.2.17

A postgres database engine for rust that builds on top of tokio-postgres and deadpool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use degen_sql::db::postgres::postgres_db::{Database, DatabaseCredentials};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let credentials = DatabaseCredentials::from_env();

    let conn_url = credentials.build_connection_url();

    let mut database = Database::new(conn_url,8, None) ? ;

    let _migration = database.migrate().await?;

    Ok(())
}