pub struct QueryCache { /* private fields */ }Expand description
Thread-safe query cache storage
Implementations§
Source§impl QueryCache
impl QueryCache
Sourcepub fn get_bfs(&self, start: i64, depth: u32) -> Option<Vec<i64>>
pub fn get_bfs(&self, start: i64, depth: u32) -> Option<Vec<i64>>
Get a cached result for a BFS query
Sourcepub fn get_k_hop(
&self,
start: i64,
depth: u32,
direction: BackendDirection,
) -> Option<Vec<i64>>
pub fn get_k_hop( &self, start: i64, depth: u32, direction: BackendDirection, ) -> Option<Vec<i64>>
Get a cached result for a k-hop query
Sourcepub fn put_k_hop(
&self,
start: i64,
depth: u32,
direction: BackendDirection,
result: Vec<i64>,
)
pub fn put_k_hop( &self, start: i64, depth: u32, direction: BackendDirection, result: Vec<i64>, )
Cache a k-hop query result
Sourcepub fn get_k_hop_filtered(
&self,
start: i64,
depth: u32,
direction: BackendDirection,
allowed_edge_types: &[&str],
) -> Option<Vec<i64>>
pub fn get_k_hop_filtered( &self, start: i64, depth: u32, direction: BackendDirection, allowed_edge_types: &[&str], ) -> Option<Vec<i64>>
Get a cached result for a filtered k-hop query
Sourcepub fn put_k_hop_filtered(
&self,
start: i64,
depth: u32,
direction: BackendDirection,
allowed_edge_types: &[&str],
result: Vec<i64>,
)
pub fn put_k_hop_filtered( &self, start: i64, depth: u32, direction: BackendDirection, allowed_edge_types: &[&str], result: Vec<i64>, )
Cache a filtered k-hop query result
Sourcepub fn get_shortest_path(
&self,
start: i64,
end: i64,
) -> Option<Option<Vec<i64>>>
pub fn get_shortest_path( &self, start: i64, end: i64, ) -> Option<Option<Vec<i64>>>
Get a cached result for a shortest path query
Sourcepub fn put_shortest_path(&self, start: i64, end: i64, result: Option<Vec<i64>>)
pub fn put_shortest_path(&self, start: i64, end: i64, result: Option<Vec<i64>>)
Cache a shortest path query result
Sourcepub fn invalidate_all(&self)
pub fn invalidate_all(&self)
Clear all cached queries (MVCC invalidation)
Trait Implementations§
Source§impl Clone for QueryCache
impl Clone for QueryCache
Source§impl Debug for QueryCache
impl Debug for QueryCache
Auto Trait Implementations§
impl Freeze for QueryCache
impl RefUnwindSafe for QueryCache
impl Send for QueryCache
impl Sync for QueryCache
impl Unpin for QueryCache
impl UnwindSafe for QueryCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more