mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-06 07:12:23 +00:00
add multi_get_or_create_shorteventids()
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
b4080de749
commit
678d87ced1
3 files changed
+38
No files matched your search
@@ -7,6 +7,8 @@ use crate::Result;
|
||||
pub trait Data: Send + Sync {
|
||||
fn get_or_create_shorteventid(&self, event_id: &EventId) -> Result<u64>;
|
||||
|
||||
fn multi_get_or_create_shorteventid(&self, event_id: &[&EventId]) -> Result<Vec<u64>>;
|
||||
|
||||
fn get_shortstatekey(&self, event_type: &StateEventType, state_key: &str) -> Result<Option<u64>>;
|
||||
|
||||
fn get_or_create_shortstatekey(&self, event_type: &StateEventType, state_key: &str) -> Result<u64>;
|
||||
|
||||
@@ -15,6 +15,10 @@ impl Service {
|
||||
self.db.get_or_create_shorteventid(event_id)
|
||||
}
|
||||
|
||||
pub fn multi_get_or_create_shorteventid(&self, event_ids: &[&EventId]) -> Result<Vec<u64>> {
|
||||
self.db.multi_get_or_create_shorteventid(event_ids)
|
||||
}
|
||||
|
||||
pub fn get_shortstatekey(&self, event_type: &StateEventType, state_key: &str) -> Result<Option<u64>> {
|
||||
self.db.get_shortstatekey(event_type, state_key)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user