MCPcopy Index your code
hub / github.com/electric-sql/pglite / #parseCopyMessage

Method #parseCopyMessage

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

Source from the content-addressed store, hash-verified

263 }
264
265 #parseCopyMessage(
266 offset: number,
267 length: number,
268 bytes: ArrayBuffer,
269 messageName: MessageName,
270 ) {
271 this.#reader.setBuffer(offset, bytes)
272 const isBinary = this.#reader.byte() !== 0
273 const columnCount = this.#reader.int16()
274 const message = new CopyResponse(length, messageName, isBinary, columnCount)
275 for (let i = 0; i < columnCount; i++) {
276 message.columnTypes[i] = this.#reader.int16()
277 }
278 return message
279 }
280
281 #parseNotificationMessage(
282 offset: number,

Callers 2

#parseCopyInMessageMethod · 0.95
#parseCopyOutMessageMethod · 0.95

Calls 3

setBufferMethod · 0.80
byteMethod · 0.80
int16Method · 0.80

Tested by

no test coverage detected