Chinese Documentation : Working with data

Once you have defined a model, then you can use create, read, update, and delete (CRUD) operations to add data to the model, manipulate the data, and query it.  All LoopBack models that are connected to persistent data stores (such as a database) automatically have the CRUD operations of the PersistedModel class.

操作RESTLoopBack model method
(Node API)*
对应的SQL操作
Create

PUT /modelName

POST /modelName

create()*INSERT
Read (Retrieve)GET /modelName?filter=...find()*SELECT
Update (Modify)

POST /modelName 

PUT /modelName

updateAll()*UPDATE
Delete (Destroy)DELETE /modelName/modelIDdestroyAll()*DELETE

*Methods listed are just prominent examples; other methods may provide similar functionality; for example, in addition to find(), there are also findById()findOne(), and findOrCreate()

See the following articles for more information:

Icon

Methods of models in the AngularJS client have a different signature than those of the Node API. For more information, see AngularJS SDK API.