From 95707a50fb83eedfb860445dbfccf17907c55f7e Mon Sep 17 00:00:00 2001 From: Agnes Lin Date: Wed, 25 Mar 2020 16:48:48 -0400 Subject: [PATCH] fix --- docs/site/Creating-decorators.md | 82 +----------------------------- docs/site/Working-with-data.md | 86 +++++++++++++++++++++++++++++++- 2 files changed, 86 insertions(+), 82 deletions(-) diff --git a/docs/site/Creating-decorators.md b/docs/site/Creating-decorators.md index 81b42e1a8b7e..233573cf2c23 100644 --- a/docs/site/Creating-decorators.md +++ b/docs/site/Creating-decorators.md @@ -7,83 +7,5 @@ source: loopback-next file: packages/metadata/README.md sidebar: lb4_sidebar permalink: /doc/en/lb4/Creating-decorators.html -summary: -- ---- - -In LoopBack 4, models describe the shape of data, repositories provide behavior -like CRUD operations, and controllers define routes (this is different from -LoopBack 3.x where models implement behavior too). LB4 -[repositories](Repository.md) provide a couple of create, read, update, and -delete (CRUD) operations. Once you have defined these three artifacts, you can -add data to the model, manipulate the data, and query it through these CRUD -operations. The following is an overview of CRUD operations at different levels: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
OperationRESTLoopBack model method
(Node API)*
Corresponding SQL
Operation
Create - PUT /modelName -
POST /modelName -
create() -
createAll() -
INSERT
Read (Retrieve)GET /modelName?filter=...find*() - SELECT
Update (Modify) - POST /modelName -
PUT /modelName -
update*() -
replaceById() -
UPDATE
Delete (Destroy)DELETE /modelName/modelIDdelete*() - DELETE
- -(\*) Methods listed are just prominent examples; other methods may provide -similar functionality; for example: `findById()`, `findOne()`, -and `updateAll()`.  See -[DefaultCrudRepository Methods API documentation](https://loopback.io/doc/en/lb4/apidocs.repository.defaultcrudrepository.html#methods) -for more information. - -See the following articles for more information: - -- [Creating, updating, and deleting data](Creating-updating-and-deleting-data.html) -- [Querying data](Querying-data.html) - - [Fields filter](Fields-filter.html) - - [Include filter](Include-filter.html) - - [Limit filter](Limit-filter.html) - - [Order filter](Order-filter.html) - - [Skip filter](Skip-filter.html) - - [Where filter](Where-filter.html) -- [Using database transactions](Using-database-transactions.html) -- [Realtime server-sent events](Realtime-server-sent-events.html) - -{% include content/angular-methods-caveat.html lang=page.lang %} +summary: A tutorial to use `@loopback/metadata` module to create new decorators +--- \ No newline at end of file diff --git a/docs/site/Working-with-data.md b/docs/site/Working-with-data.md index b43a5846cb2a..f98979893680 100644 --- a/docs/site/Working-with-data.md +++ b/docs/site/Working-with-data.md @@ -1,7 +1,89 @@ --- lang: en -title: Working with data -keywords: LoopBack 4.0 +title: 'Working with data' +keywords: LoopBack 4.0, LoopBack 4 +layout: readme +source: loopback-next +file: packages/metadata/README.md sidebar: lb4_sidebar permalink: /doc/en/lb4/Working-with-data.html +summary: -- --- + +In LoopBack 4, models describe the shape of data, repositories provide behavior +like CRUD operations, and controllers define routes (this is different from +LoopBack 3.x where models implement behavior too). LB4 +[repositories](Repository.md) provide a couple of create, read, update, and +delete (CRUD) operations. Once you have defined these three artifacts, you can +add data to the model, manipulate the data, and query it through these CRUD +operations. The following is an overview of CRUD operations at different levels: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OperationRESTLoopBack model method
(Node API)*
Corresponding SQL
Operation
Create + PUT /modelName +
POST /modelName +
create() +
createAll() +
INSERT
Read (Retrieve)GET /modelName?filter=...find*() + SELECT
Update (Modify) + POST /modelName +
PUT /modelName +
update*() +
replaceById() +
UPDATE
Delete (Destroy)DELETE /modelName/modelIDdelete*() + DELETE
+ +(\*) Methods listed are just prominent examples; other methods may provide +similar functionality; for example: `findById()`, `findOne()`, +and `updateAll()`.  See +[DefaultCrudRepository Methods API documentation](https://loopback.io/doc/en/lb4/apidocs.repository.defaultcrudrepository.html#methods) +for more information. + +See the following articles for more information: + +- [Creating, updating, and deleting data](Creating-updating-and-deleting-data.html) +- [Querying data](Querying-data.html) + - [Fields filter](Fields-filter.html) + - [Include filter](Include-filter.html) + - [Limit filter](Limit-filter.html) + - [Order filter](Order-filter.html) + - [Skip filter](Skip-filter.html) + - [Where filter](Where-filter.html) +- [Using database transactions](Using-database-transactions.html) +- [Realtime server-sent events](Realtime-server-sent-events.html) + +{% include content/angular-methods-caveat.html lang=page.lang %}