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
QueryBuilderParameters['SetI']
A literal string will be used as is.
1linkconst queryBuilder = new QueryBuilder()
2link .set('a.id = 5'); /* --> literal string to use */
3link
4linkconsole.log(queryBuilder.getStatement()); // SET a.id = 5
5linkconsole.log(queryBuilder.getBindParam().get()); // {}
A SET statement can be generated using an object with an identifier and properties.
1linkconst queryBuilder = new QueryBuilder().set({
2link /* --> identifier whose properties will be set */
3link identifier: 'n',
4link /* --> properties to set */
5link properties: {
6link name: 'John',
7link age: 28,
8link },
9link});
10link
11linkconsole.log(queryBuilder.getStatement()); // SET n.name = $name AND n.age = $age
12linkconsole.log(queryBuilder.getBindParam().get()); // { name: 'John', age: 28 }