Star

Created With
You are viewing the documentation for Neogma v1. This version is in maintenance mode, and you can upgrade to v2 following the migration guide. For the latest features and improvements, see the Neogma v2 documentation.

linkRunning Arbitrary Queries

A QueryRunner instance can be used to run arbitrary/raw queries.

1link/* --> let 'queryRunner' be a QueryRunner instance */

2linkconst result = await queryRunner.run(

3link /* --> arbitrary Cypher */

4link `MATCH (u:Users) WHERE u.id = $id RETURN u`,

5link /* --> (optional) bind parameter for the statement */

6link {

7link id: '1'

8link },

9link /* --> (optional) an existing session or transaction to use */

10link null,

11link);

12link

13link/* --> the result is the QueryResult from the neo4j driver */

14linkconsole.log(result.records.map((v) => v.get('u').properties));

Running Arbitrary Queries

Introduction Getting Started

Modelschevron_right

Sessions and Transactions

Query Builderchevron_right
Query Runnerchevron_right

Bind Parameters

Where Parameters