MCPcopy
hub / github.com/electric-sql/pglite / addInt32

Method addInt32

packages/pg-protocol/test/testing/buffer-list.ts:21–31  ·  view source on GitHub ↗
(val: number, first?: boolean)

Source from the content-addressed store, hash-verified

19 }
20
21 public addInt32(val: number, first?: boolean) {
22 return this.add(
23 new Uint8Array([
24 (val >>> 24) & 0xff,
25 (val >>> 16) & 0xff,
26 (val >>> 8) & 0xff,
27 (val >>> 0) & 0xff,
28 ]).buffer,
29 first,
30 )
31 }
32
33 public addCString(val: string, front?: boolean) {
34 const len = byteLengthUtf8(val)

Callers 3

joinMethod · 0.95
test-buffers.tsFile · 0.45

Calls 1

addMethod · 0.95

Tested by

no test coverage detected