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 shapefile export for non-linestring results starting with NULLs (#111)
|
||||||
* Fix missing .prj in shapefile export (#110)
|
* Fix missing .prj in shapefile export (#110)
|
||||||
* Improve recognition of non-standard field types names by db lookup (#112)
|
* 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
|
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) {
|
me.quoteIdentifier = function(str) {
|
||||||
|
return pg.Client.prototype.escapeIdentifier(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;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
me.escapeLiteral = function(s) {
|
me.escapeLiteral = function(s) {
|
||||||
return this.client.escapeLiteral(s);
|
return pg.Client.prototype.escapeLiteral(str);
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
me.query = function(sql, callback){
|
me.query = function(sql, callback){
|
||||||
var that = this;
|
var that = this;
|
||||||
|
6
npm-shrinkwrap.json
generated
6
npm-shrinkwrap.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cartodb_api",
|
"name": "cartodb_sql_api",
|
||||||
"version": "1.5.3",
|
"version": "1.6.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cluster2": {
|
"cluster2": {
|
||||||
"version": "0.3.5-cdb02",
|
"version": "0.3.5-cdb02",
|
||||||
@ -295,7 +295,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pg": {
|
"pg": {
|
||||||
"version": "1.2.0",
|
"version": "2.6.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"buffer-writer": {
|
"buffer-writer": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
"express": "~2.5.11",
|
"express": "~2.5.11",
|
||||||
"underscore" : "~1.3.3",
|
"underscore" : "~1.3.3",
|
||||||
"underscore.string": "~1.1.6",
|
"underscore.string": "~1.1.6",
|
||||||
"pg": "~1.2.0",
|
"pg": "~2.6.2",
|
||||||
"express": "~2.5.11",
|
"express": "~2.5.11",
|
||||||
"generic-pool": "~2.0.2",
|
"generic-pool": "~2.0.2",
|
||||||
"redis": "0.7.1",
|
"redis": "0.7.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user