Skip to content

Commit

Permalink
Workaround problem of "Numeric fields returned as text" (brianc/node-…
Browse files Browse the repository at this point in the history
  • Loading branch information
anvuong committed Nov 24, 2019
1 parent 2e99944 commit 496b56e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/postgresql.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ exports.initialize = function initializeDataSource(dataSource, callback) {
if (!postgresql) {
return;
}
postgresql.types.setTypeParser(20, function(val) {
return parseInt(val)
})

const dbSettings = dataSource.settings || {};
dbSettings.host = dbSettings.host || dbSettings.hostname || 'localhost';
Expand Down

0 comments on commit 496b56e

Please sign in to comment.