Macro libsql_client::params
source · macro_rules! params { () => { ... }; ($($param:expr),+ $(,)?) => { ... }; }
Expand description
A macro for passing parameters to statements without having to manually define their types.
Example
let db = libsql_client::new_client()?;
db.execute(
Statement::with_params("INSERT INTO cart(product_id, product_name, quantity, price) VALUES (?, ?, ?, ?)",
params!(64, "socks", 2, 4.5)),
).await?;