feathers-sequelize
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "feathers-sequelize", | ||
"description": "A service adapter for Sequelize an SQL ORM", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"homepage": "https://github.com/feathersjs/feathers-sequelize", | ||
@@ -9,3 +9,11 @@ "main": "lib/", | ||
"feathers", | ||
"feathers-plugin" | ||
"feathers-plugin", | ||
"sequel", | ||
"sequelize", | ||
"mysql", | ||
"sqlite", | ||
"mariadb", | ||
"postgres", | ||
"pg", | ||
"mssql" | ||
], | ||
@@ -12,0 +20,0 @@ "licenses": [ |
@@ -86,2 +86,28 @@ # feathers-sequelize | ||
## Options | ||
Creating a new Sequelize service currently offers the following options: | ||
- `Model` (**required**) - The Sequelize model definition | ||
- `id` (default: `id`) [optional] - The name of the id property | ||
- `paginate` [optional] - A pagination object containing a `default` and `max` page size (see below) | ||
## Pagination | ||
When initializing the service you can set the following pagination options in the `paginate` object: | ||
- `default` - Sets the default number of items | ||
- `max` - Sets the maximum allowed number of items per page (even if the `$limit` query parameter is set higher) | ||
When `paginate.default` is set, `find` will return an object (instead of the normal array) in the following form: | ||
``` | ||
{ | ||
"total": "<total number of records>", | ||
"limit": "<max number of items per page>", | ||
"skip": "<number of skipped items (offset)>", | ||
"data": [/* data */] | ||
} | ||
``` | ||
## Extending | ||
@@ -175,28 +201,2 @@ | ||
## Options | ||
Creating a new Sequelize service currently offers the following options: | ||
- `Model` - The Sequelize model definition | ||
- `id` (default: `id`) - The name of the id property | ||
- `paginate` [optional] - A pagination object containing a `default` and `max` page size (see below) | ||
## Pagination | ||
When initializing the service you can set the following pagination options in the `paginate` object: | ||
- `default` - Sets the default number of items | ||
- `max` - Sets the maximum allowed number of items per page (even if the `$limit` query parameter is set higher) | ||
When `paginate.default` is set, `find` will return an object (instead of the normal array) in the following form: | ||
``` | ||
{ | ||
"total": "<total number of records>", | ||
"limit": "<max number of items per page>", | ||
"skip": "<number of skipped items (offset)>", | ||
"data": [/* data */] | ||
} | ||
``` | ||
## Query Parameters | ||
@@ -203,0 +203,0 @@ |
24831
11