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

Method addString

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

Source from the content-addressed store, hash-verified

51 }
52
53 public addString(string: string = ''): Writer {
54 const len = Buffer.byteLength(string)
55 this.ensure(len)
56 this.buffer.write(string, this.offset)
57 this.offset += len
58 return this
59 }
60
61 // Write an Int32 byte-length prefix immediately followed by the string's UTF-8
62 // bytes. Postgres' Bind wire format prefixes every parameter with its length,

Callers 3

test-buffers.jsFile · 0.45

Calls 2

ensureMethod · 0.95
writeMethod · 0.80

Tested by

no test coverage detected