Under the hood welds uses:
Compatibility:
0.5.* line of welds is compiled with sqlx 0.90.4.* line of welds is compiled with sqlx 0.8#[derive(Debug, WeldsModel)]
#[welds(schema= "inventory", table = "products")]
#[welds(BelongsTo(seller, super::people::People, "seller_id"))]
pub struct Product {
#[welds(rename = "product_id")]
#[welds(primary_key)]
pub id: i32,
pub name: String,
pub seller_id: Option<i32>,
pub description: Option<String>,
pub price: Option<f32>,
}
let url = "postgres://postgres:password@localhost:5432";
let client = welds::connections::connect(url).await.unwrap();
let products = Product::where_col(|p| p.price.equal(3.50)).run(&client).await?;
let client = welds::connections::connect(url).await.unwrap();
let sellers = Product::where_col(|product| product.price.equal(3.50))
.map_query(|product| product.seller )
.where_col(|seller| seller.name.ilike("%Nessie%") )
.run(&client).await?;
let client = welds::connections::connect(url).await.unwrap();
let mut cookies = Product::new();
cookies.name = "cookies".to_owned();
// Creates the product cookie
cookies.save(&client).await?;
cookies.description = "Yum".to_owned();
// Updates the Cookies
cookies.save(&client).await?;
Both Tiberius and sqlx support types from external crates such at chrono and serde_json. These types need to be enabled in the underlying crate to use.
In order to use types that are external the appropriate feature needs to be enabled in these underlying frameworks.
We have chosen to leave this up to you as the developer so you have full control over your underlying SQLX/Tiberius setup.
In order to get these types to work you will need to:
cargo add chronocargo add sqlx --features=chronocargo add welds-connections --features=mssql,mssql-chronowelds-connections features needed for mssql (tiberius):
If you are looking for documentation on how to use welds, A good place to start is The Welds Book.
For more good examples check out the examples repo.
| Sqlx | Diesel | Diesel-async | SeaORM | Welds | |
|---|---|---|---|---|---|
| Architecture | |||||
| Async | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| Avoids maintaining separate schemas for every model | ✔️ | ❌ | ❌ | ❌ | ✔️ |
| Provides a rich DSL for building queries | ❌ | ✔️ | ✔️ | ✔️ | ✔️ |
| Features | |||||
| Wrap multiple queries in transactions | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Support custom types | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Group by / aggregate functions DSL | ❌ | ✔️ | ✔️ | ✔️ | ✔️ |
| Model callbacks / hooks | ❌ | ❌ | ❌ | ✔️ | ✔️ |
| Fetch associated objects ("includes" feature) | ❌ | ❌ | ❌ | Partial | ✔️ |
| Supported databases | |||||
| Postgres | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Mysql | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Sqlite | ✔️ | ✔️ | ❌ | ✔️ | ✔️ |
| Mssql | ❌ | ❌ | ❌ | ❌ | ✔️ |
5,107 followers · starred Dec 2025
1,842 followers · starred May 2024
128 followers · starred May 2023
175 followers · starred Jul 2025
Under the hood welds uses:
Compatibility:
0.5.* line of welds is compiled with sqlx 0.90.4.* line of welds is compiled with sqlx 0.8#[derive(Debug, WeldsModel)]
#[welds(schema= "inventory", table = "products")]
#[welds(BelongsTo(seller, super::people::People, "seller_id"))]
pub struct Product {
#[welds(rename = "product_id")]
#[welds(primary_key)]
pub id: i32,
pub name: String,
pub seller_id: Option<i32>,
pub description: Option<String>,
pub price: Option<f32>,
}
let url = "postgres://postgres:password@localhost:5432";
let client = welds::connections::connect(url).await.unwrap();
let products = Product::where_col(|p| p.price.equal(3.50)).run(&client).await?;
let client = welds::connections::connect(url).await.unwrap();
let sellers = Product::where_col(|product| product.price.equal(3.50))
.map_query(|product| product.seller )
.where_col(|seller| seller.name.ilike("%Nessie%") )
.run(&client).await?;
let client = welds::connections::connect(url).await.unwrap();
let mut cookies = Product::new();
cookies.name = "cookies".to_owned();
// Creates the product cookie
cookies.save(&client).await?;
cookies.description = "Yum".to_owned();
// Updates the Cookies
cookies.save(&client).await?;
Both Tiberius and sqlx support types from external crates such at chrono and serde_json. These types need to be enabled in the underlying crate to use.
In order to use types that are external the appropriate feature needs to be enabled in these underlying frameworks.
We have chosen to leave this up to you as the developer so you have full control over your underlying SQLX/Tiberius setup.
In order to get these types to work you will need to:
cargo add chronocargo add sqlx --features=chronocargo add welds-connections --features=mssql,mssql-chronowelds-connections features needed for mssql (tiberius):
If you are looking for documentation on how to use welds, A good place to start is The Welds Book.
For more good examples check out the examples repo.
| Sqlx | Diesel | Diesel-async | SeaORM | Welds | |
|---|---|---|---|---|---|
| Architecture | |||||
| Async | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| Avoids maintaining separate schemas for every model | ✔️ | ❌ | ❌ | ❌ | ✔️ |
| Provides a rich DSL for building queries | ❌ | ✔️ | ✔️ | ✔️ | ✔️ |
| Features | |||||
| Wrap multiple queries in transactions | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Support custom types | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Group by / aggregate functions DSL | ❌ | ✔️ | ✔️ | ✔️ | ✔️ |
| Model callbacks / hooks | ❌ | ❌ | ❌ | ✔️ | ✔️ |
| Fetch associated objects ("includes" feature) | ❌ | ❌ | ❌ | Partial | ✔️ |
| Supported databases | |||||
| Postgres | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Mysql | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| Sqlite | ✔️ | ✔️ | ❌ | ✔️ | ✔️ |
| Mssql | ❌ | ❌ | ❌ | ❌ | ✔️ |
5,107 followers · starred Dec 2025
1,842 followers · starred May 2024
128 followers · starred May 2023
175 followers · starred Jul 2025