Upgrade node-pg dependency to 2.6.2
Simplifies PSQL.quoteIdentifier and exposes PSQL.quoteLiteral
This commit is contained in:
parent
e92530d6e5
commit
82f965fa57
1
NEWS.md
1
NEWS.md
@ -3,6 +3,7 @@
|
||||
* Fix shapefile export for non-linestring results starting with NULLs (#111)
|
||||
* Fix missing .prj in shapefile export (#110)
|
||||
* Improve recognition of non-standard field types names by db lookup (#112)
|
||||
* Upgrade node-pg dependency to 2.6.2
|
||||
|
||||
1.5.4 - 2013-10-01
|
||||
------------------
|
||||
|
@ -176,32 +176,13 @@ var PSQL = function(user_id, db) {
|
||||
);
|
||||
};
|
||||
|
||||
// Ported from PostgreSQL 9.2.4 source code in src/interfaces/libpq/fe-exec.c
|
||||
me.quoteIdentifier = function(str) {
|
||||
|
||||
// TODO: delegate to node-postgresl (needs node-pg 2.2.0+!)
|
||||
|
||||
var escaped = '"';
|
||||
|
||||
for(var i = 0; i < str.length; i++) {
|
||||
var c = str[i];
|
||||
if(c === '"') {
|
||||
escaped += c + c;
|
||||
} else {
|
||||
escaped += c;
|
||||
}
|
||||
}
|
||||
|
||||
escaped += '"';
|
||||
|
||||
return escaped;
|
||||
return pg.Client.prototype.escapeIdentifier(str);
|
||||
};
|
||||
|
||||
/*
|
||||
me.escapeLiteral = function(s) {
|
||||
return this.client.escapeLiteral(s);
|
||||
return pg.Client.prototype.escapeLiteral(str);
|
||||
};
|
||||
*/
|
||||
|
||||
me.query = function(sql, callback){
|
||||
var that = this;
|
||||
|
6
npm-shrinkwrap.json
generated
6
npm-shrinkwrap.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cartodb_api",
|
||||
"version": "1.5.3",
|
||||
"name": "cartodb_sql_api",
|
||||
"version": "1.6.0",
|
||||
"dependencies": {
|
||||
"cluster2": {
|
||||
"version": "0.3.5-cdb02",
|
||||
@ -295,7 +295,7 @@
|
||||
}
|
||||
},
|
||||
"pg": {
|
||||
"version": "1.2.0",
|
||||
"version": "2.6.2",
|
||||
"dependencies": {
|
||||
"buffer-writer": {
|
||||
"version": "1.0.0",
|
||||
|
@ -17,7 +17,7 @@
|
||||
"express": "~2.5.11",
|
||||
"underscore" : "~1.3.3",
|
||||
"underscore.string": "~1.1.6",
|
||||
"pg": "~1.2.0",
|
||||
"pg": "~2.6.2",
|
||||
"express": "~2.5.11",
|
||||
"generic-pool": "~2.0.2",
|
||||
"redis": "0.7.1",
|
||||
|
Loading…
Reference in New Issue
Block a user