Skip to main content

sqlite_expr

Macro sqlite_expr 

Source
macro_rules! sqlite_expr {
    ($template:expr) => { ... };
    ($template:expr, $($param:tt),*) => { ... };
}
Expand description

Create a SQL expression with AnySqliteType as the value type.

This is the typed variant — parameters carry SQLite type markers (Integer, Text, Real, etc.) which are used for type-aware binding via bind_sqlite_value. Use this when building expressions for ExprDataSource::execute().

Scalar arguments must implement Into<AnySqliteType> — supported types are: i8u32, f32/f64, bool, String, and &str.

let expr = sqlite_expr!("SELECT * FROM product WHERE price > {}", 100i64);
let result = db.execute(&expr).await?;