Initial commit
This commit is contained in:
17
node_modules/postgres-bytea/encoder.js
generated
vendored
Normal file
17
node_modules/postgres-bytea/encoder.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
'use strict'
|
||||
|
||||
const { Transform } = require('stream')
|
||||
|
||||
class ByteaEncoder extends Transform {
|
||||
constructor () {
|
||||
super()
|
||||
this.push('\\\\x')
|
||||
}
|
||||
|
||||
_transform (chunk, encoding, callback) {
|
||||
this.push(chunk.toString('hex'))
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ByteaEncoder
|
||||
Reference in New Issue
Block a user