Skip to content

Commit eb9b70b

Browse files
committed
Update Readme
1 parent a65a58c commit eb9b70b

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

README.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ app.use(qs({
9999
*/
100100
```
101101

102-
### 3. Most Usage In Queries
102+
### 3. Supported Query Strings
103103
#### 3.1 Partial Answers
104104
| Query | Description | Result |
105105
| ------ | ------ | ------ |
@@ -163,22 +163,6 @@ app.use(qs({
163163
* The **date_field** parameter in the options is used in cases where you want to use filters with Date. If this value is not specified in the middleware configuration options, its default value will be 'created_at'.
164164
* The configurations that you don't set in middleware options it will be the default settings.
165165

166-
### Query Support
167-
168-
This middleware supports the queries as follow the pattern bellow:
169-
170-
| Operation | Query | Description | Result |
171-
| ------ | ------ | ------ | ------ |
172-
| Partial Responses | `?fields=name,age` | Allows you to retrieve only the information you want. To do this, simply provide the name of the attributes/properties separated by commas, `?fields=name,age` indicates that only the name and age should be listed in the result of the request. | `{ fields: { name: 1, age: 1 } }` |
173-
| Pagination with skip | `?skip=0&limit=100` | Determines how many items to skip and the maximum number that the request should return. | `{ pagination: { skip: 0, limit: 100 } }` |
174-
| Pagination with page | `?page=2&limit=100` | Determines the page number and the maximum number of items the request should return. | { `pagination: { page: 2, limit: 100 } }` |
175-
| Ordenation | `?sort=name,-age` | Allows you to apply sort rules. To do this, simply provide the name of the attributes/properties that will be used to sort the result of the query separated by commas. For ascending _(ascending)_ use before the attribute name the `+` character and for descending _(descending)_ use the `-` character. By default the order is ascending, so the `+` character is optional, just inform the attribute name. | `{ sort: { name: 'asc', age: 'desc' }` }|
176-
| Filters | `?name=elvis&age=83` | It allows limiting the number of resources requested, specifying some attributes and their expected values. To do this, simply use the attribute/property name with an equal sign and the expected value. `?name=elvis` indicates that the request should return the data that has the exact same name as Elvis, `?name=elvis,john` indicates that the name is equal to Elvis or John and `?age=18&age=25` indicates that age is equal to 18 and 25.[²](#notes) | `{ filters: { name : 'elvis', age: 83 } }` |
177-
178-
179-
**NOTES**
180-
* In the last release, is possible filter for sub-level seaches - like `location.city=New York`, advanced filters like `AND`, `<`, `<=`, `>`, `>=`,`OR`,`LIKE` and `Date`.
181-
* The middleware has the following reserved words: `skip`, `page`, `limit`, `start_at`, and `end_at`. Therefore, the use of these words in querystrings outside the context of the middleware may generate a different operation than expected.
182166
## Future Features
183167
- ¹Support for relational databases such as MySQL, PostgreSQL and SQLite.
184168

0 commit comments

Comments
 (0)