2021-07-26 23:10:12 +02:00
|
|
|
macro_rules! upend_insert_val {
|
|
|
|
($db_connection:expr, $entity:expr, $attribute:expr, $value:expr) => {{
|
2022-02-02 17:13:23 +01:00
|
|
|
$db_connection.insert_entry(Entry {
|
|
|
|
entity: $entity.clone(),
|
|
|
|
attribute: String::from($attribute),
|
|
|
|
value: crate::database::entry::EntryValue::String(String::from($value)),
|
|
|
|
})
|
2021-07-26 23:10:12 +02:00
|
|
|
}};
|
|
|
|
}
|
|
|
|
|
|
|
|
macro_rules! upend_insert_addr {
|
|
|
|
($db_connection:expr, $entity:expr, $attribute:expr, $addr:expr) => {{
|
2022-02-02 17:13:23 +01:00
|
|
|
$db_connection.insert_entry(Entry {
|
|
|
|
entity: $entity.clone(),
|
|
|
|
attribute: String::from($attribute),
|
|
|
|
value: crate::database::entry::EntryValue::Address($addr.clone()),
|
|
|
|
})
|
2021-07-26 23:10:12 +02:00
|
|
|
}};
|
|
|
|
}
|