pgdb-lib-rs

Crates.iopgdb-lib-rs
lib.rspgdb-lib-rs
version0.1.2
sourcesrc
created_at2022-09-29 02:59:32.880502
updated_at2022-10-01 19:23:57.651734
descriptionA simple database wrapper for
homepage
repository
max_upload_size
id676328
size3,653
Shanmukh Sista (shanmukhsista)

documentation

README

Readme

*** Not Ready for PUBLIC USE. Suggestions/Reviews are welcome! ***

This is a simple Rust Wrapper over SQLX and Postgres.

To connect to Postgres, use the following

DATABASE_URL=postgres://postgres:postgres@localhost:5432/fenvoxdb?currentSchema=app
async fn main(){
    let db = Database::new().await.expect("Database connection Failed");
    let row: (i64,) = sqlx::query_as("SELECT $1")
        .bind(150_i64)
        .fetch_one(db.get_pool()).await.expect("error occured ");
}
Commit count: 0

cargo fmt