New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

waterline

Package Overview
Dependencies
Maintainers
4
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waterline - npm Package Compare versions

Comparing version 0.13.0-rc1 to 0.13.0-rc2

4

lib/waterline.js

@@ -237,4 +237,4 @@ // ██╗ ██╗ █████╗ ████████╗███████╗██████╗ ██╗ ██╗███╗ ██╗███████╗

definition: collection.schema,
tableName: collection.tableName || identity,
identity: identity
tableName: collection.tableName,
identity: collection.identity
};

@@ -241,0 +241,0 @@ });

@@ -594,9 +594,10 @@ /**

// Ensure this modifier is not the empty string.
// if (modifier === '') {
// throw flaverr('E_CONSTRAINT_NOT_USABLE', new Error(
// 'Invalid `contains` (string search) modifier. Should be provided as '+
// 'a non-empty string. But the provided modifier is \'\' (empty string).'
// ));
// }//-•
// If this modifier is the empty string (''), then it means that
// this constraint would match EVERYTHING.
if (modifier === '') {
throw flaverr('E_CONSTRAINT_WOULD_MATCH_EVERYTHING', new Error(
'Since this `contains` (string search) modifier was provided as '+
'`\'\'` (empty string), it would match ANYTHING!'
));
}//-•

@@ -652,9 +653,10 @@ // Convert this modifier into a `like`, making the necessary adjustments.

// Ensure this modifier is not the empty string.
// if (modifier === '') {
// throw flaverr('E_CONSTRAINT_NOT_USABLE', new Error(
// 'Invalid `startsWith` (string search) modifier. Should be provided as '+
// 'a non-empty string. But the provided modifier is \'\' (empty string).'
// ));
// }//-•
// If this modifier is the empty string (''), then it means that
// this constraint would match EVERYTHING.
if (modifier === '') {
throw flaverr('E_CONSTRAINT_WOULD_MATCH_EVERYTHING', new Error(
'Since this `startsWith` (string search) modifier was provided as '+
'`\'\'` (empty string), it would match ANYTHING!'
));
}//-•

@@ -710,9 +712,10 @@ // Convert this modifier into a `like`, making the necessary adjustments.

// Ensure this modifier is not the empty string.
// if (modifier === '') {
// throw flaverr('E_CONSTRAINT_NOT_USABLE', new Error(
// 'Invalid `endsWith` (string search) modifier. Should be provided as '+
// 'a non-empty string. But the provided modifier is \'\' (empty string).'
// ));
// }//-•
// If this modifier is the empty string (''), then it means that
// this constraint would match EVERYTHING.
if (modifier === '') {
throw flaverr('E_CONSTRAINT_WOULD_MATCH_EVERYTHING', new Error(
'Since this `endsWith` (string search) modifier was provided as '+
'`\'\'` (empty string), it would match ANYTHING!'
));
}//-•

@@ -763,2 +766,11 @@ // Convert this modifier into a `like`, making the necessary adjustments.

// If this modifier is '%%', then it means that this `like` constraint
// would match EVERYTHING.
if (modifier === '%%') {
throw flaverr('E_CONSTRAINT_WOULD_MATCH_EVERYTHING', new Error(
'Since this `like` (string search) modifier was provided as '+
'`%%`, it would match ANYTHING!'
));
}//-•
}//‡

@@ -765,0 +777,0 @@ // ┬ ┬┌┐┌┬─┐┌─┐┌─┐┌─┐┌─┐┌┐┌┬┌─┐┌─┐┌┬┐ ┌┬┐┌─┐┌┬┐┬┌─┐┬┌─┐┬─┐

{
"name": "waterline",
"description": "An ORM for Node.js and the Sails framework",
"version": "0.13.0-rc1",
"version": "0.13.0-rc2",
"homepage": "http://github.com/balderdashy/waterline",

@@ -6,0 +6,0 @@ "contributors": [

@@ -9,3 +9,3 @@ # [<img title="waterline-logo" src="http://i.imgur.com/3Xqh6Mz.png" width="610px" alt="Waterline logo"/>](http://waterlinejs.org)

Waterline is a brand new kind of storage and retrieval engine.
Waterline is a next-generation storage and retrieval engine, and the default ORM used in the [Sails framework](http://sailsjs.com).

@@ -16,7 +16,4 @@ It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get and store things like users, whether they live in Redis, MySQL, MongoDB, or Postgres.

For detailed documentation, see [the Sails documentation](http://sailsjs.com).
> Looking for the version of Waterline used in Sails v0.12? See the [0.11.x branch](https://github.com/balderdashy/waterline/tree/0.11.x) of this repo. If you're upgrading to v0.13 from a previous release of Waterline _standalone_, take a look at the [upgrading guide](http://sailsjs.com/documentation/upgrading/to-v-1-0).
> Looking for the version of Waterline used in Sails v0.12? See https://github.com/balderdashy/waterline/tree/0.11.x.
## Installation

@@ -26,3 +23,3 @@ Install from NPM.

```bash
$ npm install waterline
$ npm install waterline --save
```

@@ -33,12 +30,18 @@

Waterline supports [a wide variety of adapters](http://sailsjs.com/documentation/concepts/extending-sails/adapters/available-adapters) both core and community maintained.
Waterline supports [a wide variety of adapters](http://sailsjs.com/documentation/concepts/extending-sails/adapters/available-adapters), both core and community maintained.
## Help
Need help or have a question? Click [here](http://sailsjs.com/support).
## Usage
The up-to-date documentation for Waterline is maintained on the [Sails framework website](http://sailsjs.com).
You can find detailed API reference docs under [Reference > Waterline ORM](http://sailsjs.com/documentation/reference/waterline-orm). For conceptual info (including Waterline standalone usage), and answers to common questions, see [Concepts > Models & ORM](http://sailsjs.com/docs/concepts/extending-sails/adapters/custom-adapters).
#### Help
Check out the recommended [community support options](http://sailsjs.com/support) for tutorials and other resources. If you have a specific question, or just need to clarify how something works, [ask for help](https://gitter.im/balderdashy/sails) or reach out to the core team [directly](http://sailsjs.com/flagship).
You can keep up to date with security patches, the Waterline release schedule, new database adapters, and events in your area by following us ([@sailsjs](https://twitter.com/sailsjs)) on Twitter.
## Bugs &nbsp; [![NPM version](https://badge.fury.io/js/waterline.svg)](http://npmjs.com/package/waterline)
To report a bug, [click here](http://sailsjs.com/bugs).
## Contribute

@@ -54,54 +57,8 @@ Please observe the guidelines and conventions laid out in our [contribution guide](http://sailsjs.com/documentation/contributing) when opening issues or submitting pull requests.

## Meta Keys
As of Waterline 0.13 (Sails v1.0), these keys allow end users to modify the behaviour of Waterline methods. You can pass them as the `meta` query key, or via the `.meta()` query modifier method:
```javascript
SomeModel.create({...})
.meta({
skipAllLifecycleCallbacks: true
})
.exec(...);
```
These keys are not set in stone, and may still change prior to release. (They're posted here now as a way to gather feedback and suggestions.)
Meta Key | Default | Purpose
:------------------------------------ | :---------------| :------------------------------
cascade | false | Set to `true` to automatically "empty out" (i.e. call `replaceCollection(..., ..., [])`) on plural ("collection") associations when deleting a record. _Note: In order to do this when the `fetch` meta key IS NOT enabled (which it is NOT by default), Waterline must do an extra `.find().select('id')` before actually performing the `.destroy()` in order to get the IDs of the records that would be destroyed._
fetch | false | For adapters: When performing `.update()` or `.create()`, set this to `true` to tell the database adapter to send back all records that were updated/destroyed. Otherwise, the second argument to the `.exec()` callback is `undefined`. Warning: Enabling this key may cause performance issues for update/destroy queries that affect large numbers of records.
skipAllLifecycleCallbacks | false | Set to `true` to prevent lifecycle callbacks from running in the query.
skipRecordVerification | false | Set to `true` to skip Waterline's post-query verification pass of any records returned from the adapter(s). Useful for tools like sails-hook-orm's automigrations. **Warning: Enabling this flag causes Waterline to ignore `customToJSON`!**
skipExpandingDefaultSelectClause | false | Set to `true` to force Waterline to skip expanding the `select` clause in criteria when it forges stage 3 queries (i.e. the queries that get passed in to adapter methods). Normally, if a model declares `schema: true`, then the S3Q `select` clause is expanded to an array of column names, even if the S2Q had factory default `select`/`omit` clauses (which is also what it would have if no explicit `select` or `omit` clauses were included in the original S1Q.) Useful for tools like sails-hook-orm's automigrations, where you want temporary access to properties that aren\'t necessarily in the current set of attribute definitions. **Warning: Do not use this flag in your web application backend-- or at least [ask for help](https://sailsjs.com/support) first.**
#### Related model settings
To provide per-model/orm-wide defaults for the `cascade` or `fetch` meta keys, there are a few different model settings you might take advantage of:
```javascript
{
attributes: {...},
primaryKey: 'id',
cascadeOnDestroy: true,
fetchRecordsOnUpdate: true,
fetchRecordsOnDestroy: true,
fetchRecordsOnCreate: true,
fetchRecordsOnCreateEach: true,
}
```
> Not every meta key will necessarily have a model setting that controls it-- in fact, to minimize peak configuration complexity, most will probably not.
## License
[MIT](http://sailsjs.com/license). Copyright © 2012-2017 Mike McNeil, Balderdash Design Co., & The Sails Company
Waterline, like the rest of the [Sails framework](http://sailsjs.com), is free and open-source under the [MIT License](http://sailsjs.com/license).
[Waterline](http://waterlinejs.org), like the rest of the [Sails framework](http://sailsjs.com), is free and open-source under the [MIT License](http://sailsjs.com/license).
![image_squidhome@2x.png](http://sailsjs.com/images/bkgd_squiddy.png)

@@ -81,1 +81,28 @@ # Waterline Roadmap

Deep populate | [#1052](https://github.com/balderdashy/waterline/pull/1052) | Recursively populate child associations.
&nbsp;
&nbsp;
## Experimental features
Below, you'll find a handful of experimental features. If you're interested in them, please try them out and provide [feedback](http://twitter.com/sailsjs)! It helps the core team and other open-source contributors from the community prioritize our efforts, and it lets us know what works and what doesn't. (As always, we welcome your [contributions](http://sailsjs.com/contribute)!)
> Please be aware that these are in the early stages and should not be relied upon
> as production features of Waterline. They could change at any time-- even on a patch
release! **You have been warned!**
#### Experimental lifecycle and accessor methods
```js
var Waterline = require('waterline');
```
+ `Waterline.start(opts, function(err, orm) { /*...*/ })`
+ `Waterline.stop(orm, function(err) { /*...*/ })`
+ `Waterline.getModel(modelIdentity, orm)`
> For detailed usage, see the source code (bottom of `lib/waterline.js` in this repo.)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc