downstairs
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -6,3 +6,3 @@ { | ||
"port": "5432", | ||
"user": "nicholas", | ||
"user": "damien", | ||
"password": null, | ||
@@ -16,7 +16,16 @@ "name": "downstairs_development" | ||
"port": "5432", | ||
"user": "nicholas", | ||
"user": "damien", | ||
"password": null, | ||
"name": "downstairs_test" | ||
} | ||
}, | ||
"production": { | ||
"database": { | ||
"host": "localhost", | ||
"port": "5432", | ||
"user": "damien", | ||
"password": null, | ||
"name": "downstairs_production" | ||
} | ||
} | ||
} |
@@ -16,7 +16,7 @@ var Table = {} | ||
if (Model.sql[key]) { | ||
if (conditions[key]) { | ||
if (typeof conditions[key] !== 'null') { | ||
var clause = Model.sql[key].equals(conditions[key]); | ||
clauses.push(clause); | ||
} | ||
else { | ||
else if (typeof conditions[key] === 'null') { | ||
var clause = Model.sql[key].isNull(); | ||
@@ -95,3 +95,2 @@ clauses.push(clause); | ||
var _self = this; | ||
@@ -236,12 +235,14 @@ var _cb = cb; | ||
var _self = this; | ||
var queries = {}; | ||
var createCb = function(err, results){ | ||
if (results) { | ||
return _self.find(data, cb); | ||
} else { | ||
return _cb(err, null); | ||
} | ||
queries.creator = function(insertCb) { | ||
_self.connection.query(sqlStr, insertCb); | ||
} | ||
queries.findCreated = function(insertCb) { | ||
_self.find(data, insertCb); | ||
} | ||
this.connection.query(sqlStr, createCb); | ||
async.series(queries, function(err, queryResults) { | ||
return _cb(err, queryResults.findCreated); | ||
}); | ||
} | ||
@@ -248,0 +249,0 @@ |
{ | ||
"name": "downstairs", | ||
"description": "A light ORM wrapped about brianc's node-sql and node-pg", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"homepage": "https://github.com/moneytribeaustralia/downstairs.js", | ||
@@ -43,7 +43,7 @@ "author": { | ||
"lingo": "0.0.5", | ||
"nconf": "~0.6.4", | ||
"nconf": "~0.6.5", | ||
"async": "~0.1.22", | ||
"validator": "~0.4.12", | ||
"validator": "~0.4.13", | ||
"underscore": "~1.4.1" | ||
} | ||
} |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
0
45673
27
1044
Updatednconf@~0.6.5
Updatedvalidator@~0.4.13