Page Contents

Home > @loopback/repository > CrudConnector

CrudConnector interface

CRUD operations for connector implementations


export interface CrudConnector extends Connector 


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