pub struct FalkorAsyncClient { /* private fields */ }Expand description
This is the publicly exposed API of the asynchronous Falkor Client It makes no assumptions in regard to which database the Falkor module is running on, and will select it based on enabled features and url connection
§Thread Safety
This struct is fully thread safe, it can be cloned and passed between threads without constraints, Its API uses only immutable references
Implementations§
Source§impl FalkorAsyncClient
impl FalkorAsyncClient
Sourcepub fn connection_pool_size(&self) -> u8
pub fn connection_pool_size(&self) -> u8
Get the max number of connections in the client’s connection pool
Sourcepub async fn list_graphs(&self) -> FalkorResult<Vec<String>>
pub async fn list_graphs(&self) -> FalkorResult<Vec<String>>
Sourcepub async fn config_get(
&self,
config_key: &str,
) -> FalkorResult<HashMap<String, ConfigValue>>
pub async fn config_get( &self, config_key: &str, ) -> FalkorResult<HashMap<String, ConfigValue>>
Sourcepub async fn config_set<C: Into<ConfigValue>>(
&self,
config_key: &str,
value: C,
) -> FalkorResult<Value>
pub async fn config_set<C: Into<ConfigValue>>( &self, config_key: &str, value: C, ) -> FalkorResult<Value>
Return the current value of a configuration option in the database.
§Arguments
config_Key: AStringrepresentation of a configuration’s key. The config key can also be “*”, which will return ALL the configuration options.value: The new value to set, which is anything that can be converted into aConfigValue, namely string types and i64.
Sourcepub fn select_graph<T: ToString>(&self, graph_name: T) -> AsyncGraph
pub fn select_graph<T: ToString>(&self, graph_name: T) -> AsyncGraph
Opens a graph context for queries and operations
§Arguments
graph_name: A string identifier of the graph to open.
§Returns
a AsyncGraph object, allowing various graph operations.
Sourcepub async fn copy_graph(
&self,
graph_to_clone: &str,
new_graph_name: &str,
) -> FalkorResult<AsyncGraph>
pub async fn copy_graph( &self, graph_to_clone: &str, new_graph_name: &str, ) -> FalkorResult<AsyncGraph>
Copies an entire graph and returns the AsyncGraph for the new copied graph.
§Arguments
graph_to_clone: A string identifier of the graph to copy.new_graph_name: The name to give the new graph.
§Returns
If successful, will return the new AsyncGraph object.
Sourcepub async fn redis_info(
&self,
section: Option<&str>,
) -> FalkorResult<HashMap<String, String>>
pub async fn redis_info( &self, section: Option<&str>, ) -> FalkorResult<HashMap<String, String>>
Retrieves redis information
Auto Trait Implementations§
impl Freeze for FalkorAsyncClient
impl !RefUnwindSafe for FalkorAsyncClient
impl Send for FalkorAsyncClient
impl Sync for FalkorAsyncClient
impl Unpin for FalkorAsyncClient
impl !UnwindSafe for FalkorAsyncClient
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