Welds
Welds is an async ORM written in rust using the sqlx framework.
Features
- Async for all.
- Support for multiple SQL databases (Mssql, MySql, Postgres, Sqlite)
- Written for ease of development. Features aren't hidden behind traits. Code should be simple to write, and simple to read.
- sqlx always available when you need to drop down to something lower level
Example Setup
//#[welds(db(Postgres, Mssql, Mysql, Sqlite))]
Example Usage
Basic Select
let conn: PgPool = connect.await.unwrap;
let products = where_col.run.await?;
Basic Filter Across tables
let conn: PgPool = connect.await.unwrap;
let sellers = where_col
.map_query
.where_col
.run.await?;
Create And Update
let conn: PgPool = connect.await.unwrap;
let mut cookies = new;
cookies.name = "cookies".to_owned;
// Creates the product cookie
cookies.save.await?;
cookies.description = "Yum".to_owned;
// Updates the Cookies
cookies.save.await?;
For more good examples check out the examples.