Trait rustis::commands::GraphCommands

source ·
pub trait GraphCommands<'a> {
    // Provided methods
    fn graph_config_get<N, V, R>(
        self,
        name: impl SingleArg
    ) -> PreparedCommand<'a, Self, R>
       where Self: Sized,
             N: PrimitiveResponse,
             V: PrimitiveResponse,
             R: KeyValueCollectionResponse<N, V> { ... }
    fn graph_config_set(
        self,
        name: impl SingleArg,
        value: impl SingleArg
    ) -> PreparedCommand<'a, Self, ()>
       where Self: Sized { ... }
    fn graph_delete(
        self,
        graph: impl SingleArg
    ) -> PreparedCommand<'a, Self, String>
       where Self: Sized { ... }
    fn graph_explain<R: PrimitiveResponse + DeserializeOwned, RR: CollectionResponse<R>>(
        self,
        graph: impl SingleArg,
        query: impl SingleArg
    ) -> PreparedCommand<'a, Self, RR>
       where Self: Sized { ... }
    fn graph_list<R: PrimitiveResponse + DeserializeOwned, RR: CollectionResponse<R>>(
        self
    ) -> PreparedCommand<'a, Self, RR>
       where Self: Sized { ... }
    fn graph_profile<R: PrimitiveResponse + DeserializeOwned, RR: CollectionResponse<R>>(
        self,
        graph: impl SingleArg,
        query: impl SingleArg,
        options: GraphQueryOptions
    ) -> PreparedCommand<'a, Self, RR>
       where Self: Sized { ... }
    fn graph_query(
        self,
        graph: impl SingleArg,
        query: impl SingleArg,
        options: GraphQueryOptions
    ) -> PreparedCommand<'a, Self, GraphResultSet>
       where Self: Sized { ... }
    fn graph_ro_query(
        self,
        graph: impl SingleArg,
        query: impl SingleArg,
        options: GraphQueryOptions
    ) -> PreparedCommand<'a, Self, GraphResultSet>
       where Self: Sized { ... }
    fn graph_slowlog<R: CollectionResponse<GraphSlowlogResult>>(
        self,
        graph: impl SingleArg
    ) -> PreparedCommand<'a, Self, R>
       where Self: Sized { ... }
}
Available on crate feature redis-graph only.
Expand description

A group of Redis commands related to RedisGraph

§See Also

RedisGraph Commands

Provided Methods§

source

fn graph_config_get<N, V, R>( self, name: impl SingleArg ) -> PreparedCommand<'a, Self, R>

Retrieves the current value of a RedisGraph configuration parameter.

§Arguments
  • name - name of the configuration parameter, or ‘*’ for all.
§Return

Key/value collection holding names & values of the requested configs

§See Also
source

fn graph_config_set( self, name: impl SingleArg, value: impl SingleArg ) -> PreparedCommand<'a, Self, ()>
where Self: Sized,

Set the value of a RedisGraph configuration parameter.

§Arguments
  • name - name of the configuration option.
  • value - value of the configuration option.
§See Also
§Note

As detailed in the link above, not all RedisGraph configuration parameters can be set at run-time.

source

fn graph_delete( self, graph: impl SingleArg ) -> PreparedCommand<'a, Self, String>
where Self: Sized,

Completely removes the graph and all of its entities.

§Arguments
  • graph - name of the graph to delete.
§See Also
source

fn graph_explain<R: PrimitiveResponse + DeserializeOwned, RR: CollectionResponse<R>>( self, graph: impl SingleArg, query: impl SingleArg ) -> PreparedCommand<'a, Self, RR>
where Self: Sized,

Constructs a query execution plan but does not run it.

Inspect this execution plan to better understand how your query will get executed.

§Arguments
  • graph - graph name.
  • query - query to explain.
§Return

String representation of a query execution plan

§See Also
source

fn graph_list<R: PrimitiveResponse + DeserializeOwned, RR: CollectionResponse<R>>( self ) -> PreparedCommand<'a, Self, RR>
where Self: Sized,

Lists all graph keys in the keyspace.

§Return

String collection of graph names

§See Also
source

fn graph_profile<R: PrimitiveResponse + DeserializeOwned, RR: CollectionResponse<R>>( self, graph: impl SingleArg, query: impl SingleArg, options: GraphQueryOptions ) -> PreparedCommand<'a, Self, RR>
where Self: Sized,

Executes a query and produces an execution plan augmented with metrics for each operation’s execution.

§Arguments
§Return

String representation of a query execution plan, with details on results produced by and time spent in each operation.

§See Also
source

fn graph_query( self, graph: impl SingleArg, query: impl SingleArg, options: GraphQueryOptions ) -> PreparedCommand<'a, Self, GraphResultSet>
where Self: Sized,

Executes the given query against a specified graph.

§Arguments
§Return

returns a result set

§See Also
source

fn graph_ro_query( self, graph: impl SingleArg, query: impl SingleArg, options: GraphQueryOptions ) -> PreparedCommand<'a, Self, GraphResultSet>
where Self: Sized,

Executes a given read only query against a specified graph

§Arguments
§Return

returns a result set

§See Also
source

fn graph_slowlog<R: CollectionResponse<GraphSlowlogResult>>( self, graph: impl SingleArg ) -> PreparedCommand<'a, Self, R>
where Self: Sized,

Returns a list containing up to 10 of the slowest queries issued against the given graph ID.

§Arguments
  • graph - graph name.
§Return

A collection of GraphSlowlogResult

§See Also

Implementors§

source§

impl<'a> GraphCommands<'a> for &'a Client

source§

impl<'a> GraphCommands<'a> for &'a mut Transaction

source§

impl<'a, 'b> GraphCommands<'a> for &'a mut Pipeline<'b>