Star

Created With

linkDeleting Nodes

linkDeleting Nodes via the Model static

Using the delete static of a Model and providing a Where parameter, nodes of the Model can be deleted

1linkawait Users.delete({

2link /* --> the Nodes to be deleted will be matched using this param */

3link where: {

4link /* --> the node(s) to be deleted need to have the name 'John' AND the id '1' */

5link name: 'John',

6link id: '1'

7link },

8link /* --> (optional) adds the DETACH keyword to the delete statement, also deleting the relationships of the node(s) */

9link detach: true,

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

11link session: null,

12link});

linkDeleting Nodes via the Instance method

Using the delete method of an Instance, the node which corresponds to the Instance will be deleted.

1link/* --> let 'user' be a Users Instance. This node will be deleted */

2linkawait user.delete({

3link /* --> (optional) adds the DETACH keyword to the delete statement, also deleting the relationships of the node */

4link detach: true,

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

6link session: null,

7link});

Deleting NodesDeleting Nodes via the Model staticDeleting Nodes via the Instance method

Introduction Getting Started

Modelschevron_right

Sessions and Transactions

Query Builderchevron_right
Query Runnerchevron_right

Bind Parameters

Where Parameters