b0b377af0c
Rework the code building model constructors to leverage `Function` class and dynamically emit a constructor function named after the model. Before this change, all model classes were called "ModelConstructor", which made debugging difficult. After this change, a model class for model "User" is called "User. Because not all valid model names are also valid JavaScript identifiers, we implement a simple sanitization technique (replacing characters like "-", "." and ":" with underscore "_") and fall back to legacy "ModelConstructor" if the model name is still not a valid JS identifier. |
||
---|---|---|
.github | ||
docs | ||
examples | ||
intl | ||
lib | ||
support | ||
test | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.gitmodules | ||
.npmignore | ||
.nycrc | ||
.travis.yml | ||
CHANGES.md | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
LICENSE | ||
NOTICE | ||
README.md | ||
docs.json | ||
index.js | ||
package.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.