We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b69a121 + 9f28f70 commit 1ed9f1fCopy full SHA for 1ed9f1f
lib/index.js
@@ -297,7 +297,13 @@ module.exports = Adapter => class PostgreSQLAdapter extends Adapter {
297
function mapValueCast (value) {
298
index++
299
parameters.push(value)
300
- return `$${index}${Buffer.isBuffer(value) ? '::bytea' : ''}`
+ let cast = '';
301
+ if (Buffer.isBuffer(value)) {
302
+ cast = '::bytea'
303
+ } else if (typeof value === 'number' && value % 1 === 0) {
304
+ cast = '::int'
305
+ }
306
+ return `$${index}${cast}`
307
}
308
309
function mapValue (value) {
0 commit comments