Page Contents

Home > @loopback/repository > CrudConnector > deleteAll

CrudConnector.deleteAll() method

Delete matching entities

Signature:

deleteAll(modelClass: Class<Entity>, where?: Where<Entity>, options?: Options): Promise<Count>;

Parameters

Parameter Type Description
modelClass Class<Entity> The model class
where Where<Entity> The matching criteria
options Options Options for the operation

Returns:

Promise<Count>

A promise of number of matching entities deleted