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['DeleteI']
A literal string will be used as is.
1linkconst queryBuilder = new QueryBuilder()
2link .delete('a, b'); /* --> literal string to use */
3link
4linkconsole.log(queryBuilder.getStatement()); // DELETE a, b
5linkconsole.log(queryBuilder.getBindParam().get()); // {}
This has the benefit of being able to use detach
delete.
1linkconst queryBuilder = new QueryBuilder().delete({
2link /* --> literal string to use */
3link literal: 'a, b',
4link /* --> (optional) whether this delete will be "detach" */
5link detach: true,
6link});
7link
8linkconsole.log(queryBuilder.getStatement()); // DETACH DELETE a, b
9linkconsole.log(queryBuilder.getBindParam().get()); // {}
1linkconst queryBuilder = new QueryBuilder().delete({
2link /* --> the identifiers to be deleted */
3link identifiers: ['a', 'b'],
4link /* --> (optional) whether this delete will be "detach" */
5link detach: false,
6link});
7link
8linkconsole.log(queryBuilder.getStatement()); // DELETE a, b
9linkconsole.log(queryBuilder.getBindParam().get()); // {}