@cubejs-backend/postgres-driver
Advanced tools
Comparing version 0.10.16 to 0.10.19
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.10.19](https://github.com/statsbotco/cubejs-client/compare/v0.10.18...v0.10.19) (2019-08-02) | ||
### Bug Fixes | ||
* **postgres-driver:** ERROR: type "string" does not exist ([d472e89](https://github.com/statsbotco/cubejs-client/commit/d472e89)), closes [#176](https://github.com/statsbotco/cubejs-client/issues/176) | ||
## [0.10.16](https://github.com/statsbotco/cubejs-client/compare/v0.10.15...v0.10.16) (2019-07-20) | ||
@@ -8,0 +19,0 @@ |
const BaseDriver = require('@cubejs-backend/query-orchestrator/driver/BaseDriver'); | ||
const { Pool } = require('pg'); | ||
const GenericTypeToPostgres = { | ||
string: 'text' | ||
}; | ||
class PostgresDriver extends BaseDriver { | ||
@@ -19,5 +23,4 @@ constructor(config) { | ||
}); | ||
const self = this; | ||
this.pool.on('error', (err) => { | ||
console.log(`Unexpected error on idle client: ${err.stack || err}`); //TODO | ||
console.log(`Unexpected error on idle client: ${err.stack || err}`); // TODO | ||
}); | ||
@@ -57,6 +60,10 @@ } | ||
param(paramIndex) { | ||
return '$' + (paramIndex + 1); | ||
return `$${paramIndex + 1}`; | ||
} | ||
fromGenericType(columnType) { | ||
return GenericTypeToPostgres[columnType] || super.fromGenericType(columnType); | ||
} | ||
} | ||
module.exports = PostgresDriver; |
@@ -5,3 +5,3 @@ { | ||
"author": "Statsbot, Inc.", | ||
"version": "0.10.16", | ||
"version": "0.10.19", | ||
"engines": { | ||
@@ -19,3 +19,3 @@ "node": ">=8.11.1" | ||
"license": "Apache-2.0", | ||
"gitHead": "993b8eaf27d17e8d319d26c588490764936ef5fd" | ||
"gitHead": "4104903a6f47a63fb7c8b8e03b21ca4559450b71" | ||
} |
19648
59