From b018fc432c2f43ed49883f71dce375d72e47c03e Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 18 Nov 2023 20:56:58 -0500 Subject: [PATCH] Add deletion to create_db --- common/db/src/create_db.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/db/src/create_db.rs b/common/db/src/create_db.rs index 22162088..04157b13 100644 --- a/common/db/src/create_db.rs +++ b/common/db/src/create_db.rs @@ -62,6 +62,10 @@ macro_rules! create_db { bincode::deserialize(data.as_ref()).unwrap() }) } + #[allow(dead_code)] + pub fn del(txn: &mut impl DbTxn $(, $arg: $arg_type)*) { + txn.del(&$field_name::key($($arg),*)) + } } )* };