MCPcopy Index your code
hub / github.com/brianc/node-postgres / parseDataRowMessage

Function parseDataRowMessage

packages/pg-protocol/src/parser.ts:308–317  ·  view source on GitHub ↗
(reader: BufferReader)

Source from the content-addressed store, hash-verified

306}
307
308const parseDataRowMessage = (reader: BufferReader) => {
309 const fieldCount = reader.int16()
310 const fields: any[] = new Array(fieldCount)
311 for (let i = 0; i < fieldCount; i++) {
312 const len = reader.int32()
313 // a -1 for length means the value of the field is null
314 fields[i] = len === -1 ? null : reader.string(len)
315 }
316 return new DataRowMessage(LATEINIT_LENGTH, fields)
317}
318
319const parseParameterStatusMessage = (reader: BufferReader) => {
320 const name = reader.cstring()

Callers 1

handlePacketMethod · 0.85

Calls 3

int16Method · 0.80
int32Method · 0.80
stringMethod · 0.80

Tested by

no test coverage detected