Page Contents

Home > @loopback/repository > CrudConnector

CrudConnector interface

CRUD operations for connector implementations


export interface CrudConnector extends Connector 

Extends: Connector


Method Description
count(modelClass, where, options) Count matching entities
create(modelClass, entity, options) Create a new entity
createAll(modelClass, entities, options)? (Optional) Create multiple entities
delete(modelClass, entity, options)? (Optional) Delete an entity
deleteAll(modelClass, where, options) Delete matching entities
deleteById(modelClass, id, options)? (Optional) Delete an entity by id
exists(modelClass, id, options)? (Optional) Check if an entity exists for the id
find(modelClass, filter, options) Find matching entities by the filter
findById(modelClass, id, options)? (Optional) Find an entity by id
replaceById(modelClass, id, data, options)? (Optional) Replace an entity by id
save(modelClass, entity, options)? (Optional) Save an entity
update(modelClass, entity, options)? (Optional) Update an entity
updateAll(modelClass, data, where, options) Update matching entities
updateById(modelClass, id, data, options)? (Optional) Update an entity by id