Macro rusted_cypher::cypher_stmt [] [src]

macro_rules! cypher_stmt {
    ( $s:expr ) => { ... };
    ( $s:expr, { $( $k:expr => $v:expr ),+ } ) => { ... };
}

Helper macro to simplify the creation of complex statements

Pass in the statement text as the first argument followed by the (optional) parameters, which must be in the format "param" => value and wrapped in {}

Examples

// Without parameters
let statement = cypher_stmt!("MATCH n RETURN n")?;
// With parameters
let statement = cypher_stmt!("MATCH n RETURN n", {
    "param1" => "value1",
    "param2" => 2,
    "param3" => 3.0
})?;