[][src]Struct redisgraph::graph::Graph

pub struct Graph<'c, 'n> { /* fields omitted */ }

Represents a single graph in the database.

Methods

impl<'c, 'n> Graph<'c, 'n>[src]

pub fn open(conn: &'c mut Connection, name: &'n str) -> RedisGraphResult<Self>[src]

Opens the graph with the given name from the database.

If the graph does not already exist, creates a new graph with the given name.

pub fn query<T: FromTable>(&mut self, query: &str) -> RedisGraphResult<T>[src]

Executes the given query and returns its return values.

Only use this for queries with a RETURN statement.

pub fn query_with_statistics<T: FromTable>(
    &mut self,
    query: &str
) -> RedisGraphResult<(T, Statistics)>
[src]

Same as query, but also returns statistics about the query along with its return values.

pub fn mutate(&mut self, query: &str) -> RedisGraphResult<()>[src]

Executes the given query while not returning any values.

If you want to mutate the graph and retrieve values from it using one query, use query instead.

pub fn mutate_with_statistics(
    &mut self,
    query: &str
) -> RedisGraphResult<Statistics>
[src]

Same as mutate, but returns statistics about the query.

pub fn delete(self) -> RedisGraphResult<()>[src]

Deletes the entire graph from the database.

This action is not easily reversible.

pub fn update_labels(&mut self) -> RedisGraphResult<()>[src]

Updates the internal label names by retrieving them from the database.

There is no real need to call this function manually. This implementation updates the label names automatically when they become outdated.

pub fn update_relationship_types(&mut self) -> RedisGraphResult<()>[src]

Updates the internal relationship type names by retrieving them from the database.

There is no real need to call this function manually. This implementation updates the relationship type names automatically when they become outdated.

pub fn update_property_keys(&mut self) -> RedisGraphResult<()>[src]

Updates the internal property key names by retrieving them from the database.

There is no real need to call this function manually. This implementation updates the property key names automatically when they become outdated.

pub fn name(&self) -> &str[src]

Returns the name of this graph.

pub fn labels(&self) -> &[RedisString][src]

Returns the graph's internal label names.

pub fn relationship_types(&self) -> &[RedisString][src]

Returns the graph's internal relationship type names.

pub fn property_keys(&self) -> &[RedisString][src]

Returns the graph's internal property key names.

Auto Trait Implementations

impl<'c, 'n> RefUnwindSafe for Graph<'c, 'n>

impl<'c, 'n> Send for Graph<'c, 'n>

impl<'c, 'n> Sync for Graph<'c, 'n>

impl<'c, 'n> Unpin for Graph<'c, 'n>

impl<'c, 'n> !UnwindSafe for Graph<'c, 'n>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.