waterline
Advanced tools
Comparing version 0.10.10 to 0.10.11
@@ -285,3 +285,3 @@ var _ = require('lodash'), | ||
// async.each(toBeSynced, function(collection, next) { | ||
async.each(toBeSynced, function(collection, next) { | ||
async.eachSeries(toBeSynced, function(collection, next) { | ||
// async.eachLimit(toBeSynced, 9, function(collection, next) { | ||
@@ -288,0 +288,0 @@ collection.sync(next); |
@@ -15,2 +15,5 @@ /** | ||
// Alias "catch" as "fail", for backwards compatibility with projects | ||
// that were created using Q | ||
Promise.prototype.fail = Promise.prototype.catch; | ||
@@ -535,2 +538,7 @@ var Deferred = module.exports = function(context, method, criteria, values) { | ||
/** | ||
* Alias "catch" as "fail" | ||
*/ | ||
Deferred.prototype.fail = Deferred.prototype.catch; | ||
/** | ||
* Build An Aggregate Criteria Option | ||
@@ -537,0 +545,0 @@ * |
{ | ||
"name": "waterline", | ||
"description": "An ORM for Node.js and the Sails framework", | ||
"version": "0.10.10", | ||
"version": "0.10.11", | ||
"homepage": "http://github.com/balderdashy/waterline", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -293,7 +293,7 @@ # [<img title="waterline-logo" src="http://i.imgur.com/3Xqh6Mz.png" width="810px" alt="Waterline logo"/>](https://github.com/balderdashy/waterline) | ||
// Promises are awesome! | ||
}).fail(function(err){ | ||
}).catch(function(err){ | ||
// An error occurred | ||
}) | ||
``` | ||
Promises use the [Q library](https://github.com/kriskowal/q), so anything you do after the first `then` call (or `spread`, or `fail`), will be a complete Q promise object. Remember, you must end the query somehow (by calling `then` or one of the other functions) in order to complete the database request. | ||
Promises use the [Bluebird library](https://github.com/petkaantonov/bluebird), so anything you do after the first `then` call (or `spread`, or `catch`), will be a complete Bluebird promise object. Remember, you must end the query somehow (by calling `then` or one of the other functions) in order to complete the database request. | ||
@@ -300,0 +300,0 @@ Each of the following basic methods are available by default on a Collection instance: |
329428
8790