548379ca2a
Callback's first argument is an optional Error now. Was: required `any`. PersistedModel methods return `PersistedModel` now. Before this change, methods were returning `PersistedData` (`PersistedModel | AnyObject`). The problem with `AnyObject` is that it does not contain any `PersistedModel` instance data and cannot be assigned to functions expecting `Partial<PersistedModel>`. As a result, consumers of this API were forced to either cast the result to `PersistedModel` (which feels wrong) or deal with the `AnyObject` case (which never happen at runtime). Fix definition of `ModelData<T>` to `T | Partial<T>`. Before this change, `ModelData` allowed any values not related to the actual model at all, for example arrays. |
||
---|---|---|
.github | ||
docs | ||
examples | ||
intl | ||
lib | ||
support | ||
test | ||
types | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.gitmodules | ||
.npmignore | ||
.npmrc | ||
.nycrc | ||
.prettierignore | ||
.prettierrc | ||
.travis.yml | ||
CHANGES.md | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
LICENSE | ||
NOTICE | ||
README.md | ||
docs.json | ||
index.d.ts | ||
index.js | ||
package.json | ||
tsconfig.json |
README.md
loopback-datasource-juggler
An ORM/ODM that provides a common set of interfaces for interacting with databases, REST APIs, and other types of data sources. It was originally forked from JugglingDB.
Supported versions
Current | Long Term Support |
---|---|
3.x | 2.x |
Learn more about our LTS plan in the LoopBack documentation.
Usage
Install Juggler:
npm install loopback-datasource-juggler
Then install a connector:
npm install loopback-connector-mongodb // in this case, the mongodb connector
Documentation
See the LoopBack documentation.
For information on data source connectors, see Connecting models to data sources.