vld-sqlx
SQLx integration for vld: validate values before insert / update and after select, and bind validated column wrappers (VldText, VldInt, VldFloat, VldBool).
Install
[]
= "0.5"
= "0.5"
= { = "0.8", = ["runtime-tokio", "sqlite"] }
Features
| Feature | Default | Effect |
|---|---|---|
sqlx-0_8 |
yes | SQLx 0.8 |
sqlx-0_9 |
SQLx 0.9 (Rust 1.94+) | |
sqlite |
yes | SQLite driver |
postgres / mysql |
Postgres / MySQL drivers |
Enable exactly one of sqlx-0_8 / sqlx-0_9.
Example
use *;
schema!
let user = NewUser ;
?;
// sqlx::query("INSERT ...").bind(&user.name).bind(&user.email).execute(&pool).await?;
Documentation
MSRV: 1.85 (sqlx-0_9: 1.94), see MSRV.md.
License
MIT