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

Method addString

packages/pg-protocol/src/buffer-writer.ts:58–67  ·  view source on GitHub ↗
(string: string = '')

Source from the content-addressed store, hash-verified

56 }
57
58 public addString(string: string = ''): Writer {
59 const length = byteLengthUtf8(string)
60 this.#ensure(length)
61 this.#encoder.encodeInto(
62 string,
63 new Uint8Array(this.#bufferView.buffer, this.#offset),
64 )
65 this.#offset += length
66 return this
67 }
68
69 public add(otherBuffer: ArrayBuffer): Writer {
70 this.#ensure(otherBuffer.byteLength)

Callers 4

addCStringMethod · 0.95
writeValuesFunction · 0.45

Calls 2

#ensureMethod · 0.95
byteLengthUtf8Function · 0.90

Tested by

no test coverage detected