MCPcopy
hub / github.com/brianc/node-postgres / errorOrNotice

Function errorOrNotice

packages/pg/test/test-buffers.js:91–99  ·  view source on GitHub ↗
(fields)

Source from the content-addressed store, hash-verified

89}
90
91const errorOrNotice = function (fields) {
92 fields = fields || []
93 const buf = new BufferList()
94 fields.forEach(function (field) {
95 buf.addChar(field.type)
96 buf.addCString(field.value)
97 })
98 return buf.add(Buffer.from([0])) // terminator
99}
100
101buffers.parseComplete = function () {
102 return new BufferList().join(true, '1')

Callers 1

test-buffers.jsFile · 0.85

Calls 3

addCharMethod · 0.95
addCStringMethod · 0.95
addMethod · 0.95

Tested by

no test coverage detected