```rust
//#[welds(db(Postgres, Mssql, Mysql, Sqlite))]
pub struct Product {
#[sqlx(rename = "productid")]
#[welds(primarykey)]
pub id: i32,
pub name: String,
pub seller_id: Option
```rust let url = "postgres://postgres:password@localhost:5432"; let pool = welds::connection::connect_postgres(url).await.unwrap();
let products = Product::where_col(|p| p.price.equal(3.50)).run(&pool).await?; ```
```rust let conn = welds::connection::connect_mssql(url).await.unwrap();
let sellers = Product::wherecol(|product| product.price.equal(3.50)) .mapquery(|product| product.seller ) .where_col(|seller| seller.name.ilike("%Nessie%") ) .run(&conn).await?; ```
```rust let conn = welds::connection::connect_sqlite(url).await.unwrap();
let mut cookies = Product::new(); cookies.name = "cookies".toowned(); // Creates the product cookie cookies.save.await(&conn)?; cookies.description = "Yum".toowned(); // Updates the Cookies cookies.save.await(&conn)?; ```
For more good examples check out the examples repo.