Struct rusted_cypher::cypher::CypherQuery [] [src]

pub struct CypherQuery<'a> {
    // some fields omitted
}

Represents a cypher query

A cypher query is composed by statements, each one containing the query itself and its parameters.

The query parameters must implement Serialize so they can be serialized into JSON in order to be sent to the server

Methods

impl<'a> CypherQuery<'a>

fn with_statement<T: Into<Statement>>(self, statement: T) -> Self

Adds statements in builder style

fn add_statement<T: Into<Statement>>(&mut self, statement: T)

fn statements(&self) -> &Vec<Statement>

fn set_statements(&mut self, statements: Vec<Statement>)

fn send(self) -> Result<Vec<CypherResult>, GraphError>

Sends the query to the server

The statements contained in the query are sent to the server and the results are parsed into a Vec<CypherResult> in order to match the response of the neo4j api.