Comparing version 0.2.12 to 0.2.13
@@ -24,2 +24,3 @@ /** | ||
var dbName = s.database || process.env.USER; | ||
conSettings.database = dbName; | ||
conSettings.acquireTimeout = s.acquireTimeout || 10000; | ||
@@ -26,0 +27,0 @@ |
@@ -10,2 +10,3 @@ /** | ||
var url = require('url'); | ||
var query = require('querystring'); | ||
@@ -21,2 +22,3 @@ exports.initialize = function initializeSchema(schema, callback) { | ||
var uri = url.parse(schema.settings.url); | ||
var query = query.parse(uri.query); | ||
s.host = uri.hostname; | ||
@@ -27,2 +29,3 @@ s.port = uri.port; | ||
s.password = uri.auth && uri.auth.split(':')[1]; | ||
s.ssl = /(true|require)/.test(query.ssl); | ||
} | ||
@@ -32,2 +35,3 @@ s.host = s.host || 'localhost'; | ||
s.database = s.database || 'test'; | ||
s.ssl = s.ssl || false; | ||
@@ -42,3 +46,4 @@ schema.client = new Client(s.url ? s.url : { | ||
poolSize: s.poolSize || s.pool || 25, | ||
debug: s.debug | ||
debug: s.debug, | ||
ssl: s.ssl | ||
}); | ||
@@ -78,4 +83,5 @@ schema.adapter = new PG(s, schema.client); | ||
password: s.password, | ||
database: 'postgres', | ||
debug: s.debug | ||
database: s.database || 'postgres', | ||
debug: s.debug, | ||
ssl: s.ssl | ||
}, function (err, client, done) { | ||
@@ -147,6 +153,6 @@ if (err) { | ||
if ('function' === typeof filter) { | ||
return filter(new Error("Get parametrs undefined"), null); | ||
return filter(new Error("Get parameters undefined"), null); | ||
} | ||
if ('function' === typeof data) { | ||
return data(new Error("Set parametrs undefined"), null); | ||
return data(new Error("Set parameters undefined"), null); | ||
} | ||
@@ -829,2 +835,2 @@ filter = filter.where ? filter.where : filter; | ||
return '"' + name.replace(/\./g, '"."') + '"'; | ||
} | ||
} |
{ | ||
"name": "caminte", | ||
"description": "ORM for every database: redis, mysql, neo4j, mongodb, rethinkdb, postgres, sqlite, tingodb", | ||
"version": "0.2.12", | ||
"version": "0.2.13", | ||
"author": { | ||
@@ -107,3 +107,3 @@ "name": "Aleksej Gordejev", | ||
"devDependencies": { | ||
"arangojs": ">= 4.2.0", | ||
"arangojs": "4.2.0 - 4.4.0", | ||
"async": "latest", | ||
@@ -110,0 +110,0 @@ "cassandra-driver": ">=2.1.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
13887
700917