mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-30 12:01:57 +00:00
dump and sub
This commit is contained in:
@@ -220,6 +220,11 @@ impl PatchDb {
|
|||||||
pub async fn dump(&self) -> Dump {
|
pub async fn dump(&self) -> Dump {
|
||||||
self.store.read().await.dump()
|
self.store.read().await.dump()
|
||||||
}
|
}
|
||||||
|
pub async fn dump_and_sub(&self) -> (Dump, Receiver<Arc<Revision>>) {
|
||||||
|
let store = self.store.read().await;
|
||||||
|
let sub = self.subscriber.subscribe();
|
||||||
|
(store.dump(), sub)
|
||||||
|
}
|
||||||
pub async fn exists<S: AsRef<str>, V: SegList>(
|
pub async fn exists<S: AsRef<str>, V: SegList>(
|
||||||
&self,
|
&self,
|
||||||
ptr: &JsonPointer<S, V>,
|
ptr: &JsonPointer<S, V>,
|
||||||
|
|||||||
Reference in New Issue
Block a user