refactor: work on search
This commit is contained in:
parent
91ad250177
commit
b0029c49b9
16 changed files with 37 additions and 1007 deletions
|
@ -1,16 +0,0 @@
|
|||
impl service::room::metadata::Data for KeyValueDatabase {
|
||||
fn exists(&self, room_id: &RoomId) -> Result<bool> {
|
||||
let prefix = match self.get_shortroomid(room_id)? {
|
||||
Some(b) => b.to_be_bytes().to_vec(),
|
||||
None => return Ok(false),
|
||||
};
|
||||
|
||||
// Look for PDUs in that room.
|
||||
Ok(self
|
||||
.pduid_pdu
|
||||
.iter_from(&prefix, false)
|
||||
.next()
|
||||
.filter(|(k, _)| k.starts_with(&prefix))
|
||||
.is_some())
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue