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

Method addInt32

packages/pg-protocol/src/buffer-writer.ts:23–30  ·  view source on GitHub ↗
(num: number)

Source from the content-addressed store, hash-verified

21 }
22
23 public addInt32(num: number): Writer {
24 this.ensure(4)
25 this.buffer[this.offset++] = (num >>> 24) & 0xff
26 this.buffer[this.offset++] = (num >>> 16) & 0xff
27 this.buffer[this.offset++] = (num >>> 8) & 0xff
28 this.buffer[this.offset++] = (num >>> 0) & 0xff
29 return this
30 }
31
32 public addInt16(num: number): Writer {
33 this.ensure(2)

Callers 6

test-buffers.jsFile · 0.45
buffer-list.jsFile · 0.45
startupFunction · 0.45
parseFunction · 0.45
writeValuesFunction · 0.45

Calls 1

ensureMethod · 0.95

Tested by

no test coverage detected