Comparing version 0.2.5 to 0.2.6
@@ -1,2 +0,2 @@ | ||
// Bookshelf.js 0.2.5 | ||
// Bookshelf.js 0.2.6 | ||
@@ -30,3 +30,3 @@ // (c) 2013 Tim Griesser | ||
// Keep in sync with `package.json`. | ||
Bookshelf.VERSION = '0.2.5'; | ||
Bookshelf.VERSION = '0.2.6'; | ||
@@ -62,3 +62,3 @@ // We're using `Backbone.Events` rather than `EventEmitter`, | ||
if (_.isFunction(method)) { | ||
method.apply(this._builder, this._builder); | ||
method.call(this._builder, this._builder); | ||
} else if (_.isObject(method)) { | ||
@@ -65,0 +65,0 @@ for (var key in method) { |
{ | ||
"name": "bookshelf", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "A lightweight Active Record ORM for PostgreSQL, MySQL, and SQLite3, influenced by Backbone.js", | ||
@@ -5,0 +5,0 @@ "main": "bookshelf.js", |
@@ -130,3 +130,20 @@ /*global describe, it */ | ||
it('allows passing an function to query', function() { | ||
var qb = model.resetQuery().query(); | ||
equal(qb.wheres.length, 0); | ||
var q = model.query(function(qb) { | ||
this.where({id: 1}).orWhere('id', '>', '10'); | ||
}); | ||
equal(q, model); | ||
equal(qb.wheres.length, 2); | ||
qb = model.resetQuery().query(); | ||
equal(qb.wheres.length, 0); | ||
q = model.query(function(qb) { | ||
qb.where({id: 1}).orWhere('id', '>', '10'); | ||
}); | ||
equal(q, model); | ||
equal(qb.wheres.length, 2); | ||
}); | ||
}); | ||
@@ -133,0 +150,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171637
4614