Connect Loopback to various Data Sources
Go to file
Miroslav Bajtoš 548379ca2a
Fix type definitions for PersistedModel API
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.
2018-06-28 13:09:47 +02:00
.github Fix stalebot config to ignore "good first issue" 2018-06-14 15:50:21 +02:00
docs Fix for issue #774 2015-11-24 16:50:41 +05:30
examples Upgrade eslint-config, fix new violations 2017-02-01 12:45:56 +01:00
intl translation return for Q4 drop1 2017-10-09 17:16:00 +08:00
lib Fix Operation Hooks to propagate data changes 2018-06-28 12:22:16 +02:00
support Fix manually 2016-08-22 19:20:12 -04:00
test Fix Operation Hooks to propagate data changes 2018-06-28 12:22:16 +02:00
types Fix type definitions for PersistedModel API 2018-06-28 13:09:47 +02:00
.editorconfig minor formatting issues (trailing spaces and such) and .editorconfig 2015-02-03 13:08:23 +03:00
.eslintignore Add eslint as "npm run lint" and "posttest" hook 2016-04-05 15:25:34 +02:00
.eslintrc Disable `strict` for a few files 2016-08-26 09:54:31 -04:00
.gitignore Add typescript type definitions 2018-05-09 12:47:27 -07:00
.gitmodules Remove unused support/ files 2016-04-05 15:25:34 +02:00
.npmignore Add typescript type definitions 2018-05-09 12:47:27 -07:00
.npmrc Disable package-lock feature of npm 2018-06-12 08:42:05 +02:00
.nycrc Add nyc coverage, report data to coveralls.io 2017-08-30 14:17:27 +02:00
.prettierignore Remove node ref 2018-05-11 09:09:31 -07:00
.prettierrc Remove node ref 2018-05-11 09:09:31 -07:00
.travis.yml Travis: add Node.js 10.x to the build matrix 2018-06-12 08:35:04 +02:00
CHANGES.md 3.22.0 2018-06-12 16:26:58 +02:00
CODEOWNERS chore: update CODEOWNERS (#1566) 2018-03-22 10:32:28 -04:00
CONTRIBUTING.md Add instructions for running the tests (#1330) 2017-04-17 11:14:00 -04:00
LICENSE chore:update license (#1521) 2017-11-13 12:50:36 -05:00
NOTICE Add NOTICE 2015-07-18 19:44:46 -07:00
README.md 📖 Typo on README.md (#1517) 2017-10-30 22:52:38 -04:00
docs.json docs: add DateString definition 2017-05-02 18:51:56 -04:00
index.d.ts Add typescript type definitions 2018-05-09 12:47:27 -07:00
index.js Fix manually 2016-08-22 19:20:12 -04:00
package.json 3.22.0 2018-06-12 16:26:58 +02:00
tsconfig.json Add typescript type definitions 2018-05-09 12:47:27 -07:00

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.