Overview Defining a Model Instances Creating Nodes and Relationships Merging Nodes and Relationships Updating Nodes and Relationships Deleting Nodes Deleting Relationships Finding Nodes and Relationships Hooks Temporary Databases
A literal string will be used as is.
1linkconst queryBuilder = new QueryBuilder()
2link .return('a, b.p1'); /* --> literal string to use */
3link
4linkconsole.log(queryBuilder.getStatement()); // RETURN a, b.p1
5linkconsole.log(queryBuilder.getBindParam().get()); // {}
The literal strings will be joined with a comma.
1linkconst queryBuilder = new QueryBuilder()
2link .return(['a', 'b.p1']); /* --> literal strings to use */
3link
4linkconsole.log(queryBuilder.getStatement()); // RETURN a, b.p1
5linkconsole.log(queryBuilder.getBindParam().get()); // {}
An array of objects with an identifier/name, and an optional property.
1linkconst queryBuilder = new QueryBuilder().return([
2link {
3link /* --> identifier/name to return */
4link identifier: 'a',
5link /* --> (optional) the property of the identifier to return */
6link property: 'name',
7link }
8link {
9link identifier: 'b'
10link }
11link]);
12link
13linkconsole.log(queryBuilder.getStatement()); // RETURN a.name, b
14linkconsole.log(queryBuilder.getBindParam().get()); // {}