MCPcopy
hub / github.com/electric-sql/pglite / #parseRowDescriptionMessage

Method #parseRowDescriptionMessage

packages/pg-protocol/src/parser.ts:293–305  ·  view source on GitHub ↗
(
    offset: number,
    length: number,
    bytes: ArrayBuffer,
  )

Source from the content-addressed store, hash-verified

291 }
292
293 #parseRowDescriptionMessage(
294 offset: number,
295 length: number,
296 bytes: ArrayBuffer,
297 ) {
298 this.#reader.setBuffer(offset, bytes)
299 const fieldCount = this.#reader.int16()
300 const message = new RowDescriptionMessage(length, fieldCount)
301 for (let i = 0; i < fieldCount; i++) {
302 message.fields[i] = this.#parseField()
303 }
304 return message
305 }
306
307 #parseField(): Field {
308 const name = this.#reader.cstring()

Callers 1

#handlePacketMethod · 0.95

Calls 3

#parseFieldMethod · 0.95
setBufferMethod · 0.80
int16Method · 0.80

Tested by

no test coverage detected