Comparing version 0.1.3 to 0.1.4
'use strict'; | ||
var es = require('elasticsearch'); | ||
var Model = require('./model'); | ||
var Schema = require('./schema') | ||
var Schema = require('./schema'); | ||
var _ = require('lodash'); | ||
@@ -46,3 +46,3 @@ | ||
} | ||
} | ||
}; | ||
@@ -72,3 +72,3 @@ /** | ||
return this.getModel(index, type); | ||
} | ||
}; | ||
@@ -121,3 +121,3 @@ /** | ||
return _.get(this.models, index + '.' + type); | ||
} | ||
}; | ||
@@ -124,0 +124,0 @@ /** |
var _ = require('lodash'); | ||
var Promise = require('bluebird'); | ||
var search = require('./search'); | ||
@@ -108,24 +106,2 @@ var query = require('./query'); | ||
/** | ||
* Delete document by a query | ||
* @param {Object} body Query body | ||
* @param {Object} opt Optional options object | ||
* @param {Function} cb Optional callback | ||
* @return {Promise} If there is no callback it will return a promise | ||
*/ | ||
Model.prototype.deleteByQuery = function (body, opt, cb) { | ||
if (!opt) opt = {}; | ||
return this | ||
.connection | ||
.deleteByQuery(_.merge( | ||
{ | ||
index: this.index, | ||
type: this.type, | ||
body: body | ||
}, opt), | ||
cb | ||
); | ||
} | ||
Model.prototype = _.merge(Model.prototype, query); | ||
@@ -132,0 +108,0 @@ |
@@ -1,2 +0,1 @@ | ||
var Promise = require('bluebird'); | ||
var _ = require('lodash'); | ||
@@ -3,0 +2,0 @@ |
{ | ||
"name": "reboundodm", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "An ElasticSearch ODM for Node.js. Use ElasticSearch as your primary document store...Elasticconnection!", | ||
@@ -26,5 +26,4 @@ "main": "./index.js", | ||
"dependencies": { | ||
"bluebird": "^2.9.34", | ||
"elasticsearch": "^5.0.0", | ||
"lodash": "^3.10.0" | ||
"elasticsearch": "^11.0.0", | ||
"lodash": "^4.13" | ||
}, | ||
@@ -31,0 +30,0 @@ "devDependencies": { |
@@ -83,3 +83,3 @@ # Rebound-ODM | ||
Tests are written as integrated, behavioral tests of the exposed API. Included Vagrantfile to stand-up a live Elasticsearch instance | ||
Tests are written as integrated, behavioral tests of the exposed API. Included Vagrantfile to stand-up a live Elasticsearch instance. | ||
@@ -86,0 +86,0 @@ * vagrant up or have an instance of Elasticsearch running locally |
Sorry, the diff of this file is not supported yet
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
2
23090
14
426
+ Addedasap@2.0.6(transitive)
+ Addedelasticsearch@11.0.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedpromise@7.3.1(transitive)
- Removedbluebird@^2.9.34
- Removedbluebird@2.11.0(transitive)
- Removedelasticsearch@5.0.0(transitive)
Updatedelasticsearch@^11.0.0
Updatedlodash@^4.13