surrealpatch/lib/tests/util.rs
Tobie Morgan Hitchcock bfc474e4d8
Refactor transaction, caching, and key-value store interfaces (#4257)
Co-authored-by: Gerard Guillemas Martos <gerard.guillemas@surrealdb.com>
2024-07-17 22:44:05 +00:00

23 lines
455 B
Rust

#[allow(unused_macros)]
macro_rules! assert_empty_val {
($tx:expr, $key:expr) => {{
let r = $tx.get($key).await?;
assert!(r.is_none());
}};
}
#[allow(unused_macros)]
macro_rules! assert_empty_prefix {
($tx:expr, $rng:expr) => {{
let r = $tx.getp($rng).await?;
assert!(r.is_empty());
}};
}
#[allow(unused_macros)]
macro_rules! assert_empty_range {
($tx:expr, $rng:expr) => {{
let r = $tx.getr($rng).await?;
assert!(r.is_empty());
}};
}