Socket
Socket
Sign inDemoInstall

cormo

Package Overview
Dependencies
0
Maintainers
1
Versions
171
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.7 to 0.3.8

30

lib/connection/manipulate.js

@@ -15,3 +15,3 @@ // Generated by CoffeeScript 1.4.0

ConnectionManipulate.prototype._manipulateCreation = function(model, data, callback) {
ConnectionManipulate.prototype._manipulateCreate = function(model, data, callback) {
model = inflector.camelize(model);

@@ -27,3 +27,3 @@ if (!this.models[model]) {

ConnectionManipulate.prototype._manipulateDeletion = function(model, data, callback) {
ConnectionManipulate.prototype._manipulateDelete = function(model, data, callback) {
model = inflector.camelize(model);

@@ -49,2 +49,19 @@ if (!this.models[model]) {

ConnectionManipulate.prototype._manipulateDropModel = function(model, callback) {
model = inflector.camelize(model);
if (!this.models[model]) {
return callback(new Error("model " + model + " does not exist"));
}
model = this.models[model];
return model.drop(callback);
};
ConnectionManipulate.prototype._manipulateDropAllModels = function(callback) {
var _this = this;
return async.forEach(Object.keys(this.models), function(model, callback) {
model = _this.models[model];
return model.drop(callback);
}, callback);
};
ConnectionManipulate.prototype._manipulateConvertIds = function(id_to_record_map, model, data) {

@@ -98,3 +115,3 @@ var column, property, _ref, _results;

_this._manipulateConvertIds(id_to_record_map, model, data);
return _this._manipulateCreation(model, data, function(error, record) {
return _this._manipulateCreate(model, data, function(error, record) {
if (error) {

@@ -110,5 +127,10 @@ return callback(error);

model = key.substr(7);
return _this._manipulateDeletion(model, data, callback);
return _this._manipulateDelete(model, data, callback);
} else if (key === 'deleteAll') {
return _this._manipulateDeleteAllModels(callback);
} else if (key.substr(0, 5) === 'drop_') {
model = key.substr(5);
return _this._manipulateDropModel(model, callback);
} else if (key === 'dropAll') {
return _this._manipulateDropAllModels(callback);
} else {

@@ -115,0 +137,0 @@ return callback(new Error('unknown command: ' + key));

2

package.json
{
"name": "cormo",
"description": "ORM framework for Node.js",
"version": "0.3.7",
"version": "0.3.8",
"keywords": [

@@ -6,0 +6,0 @@ "orm",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc