Star

Created With

linkDelete

QueryBuilderParameters['DeleteI']

linkDelete by using a literal string

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()); // {}

linkDelete by using a literal object

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()); // {}

linkDelete by using an array of identifiers

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()); // {}

DeleteDelete by using a literal stringDelete by using a literal objectDelete by using an array of identifiers

Introduction Getting Started

Modelschevron_right

Sessions and Transactions

Query Builderchevron_right
Query Runnerchevron_right

Bind Parameters

Where Parameters