MCPcopy Create free account
hub / github.com/Effect-TS/effect / parameterStatus

Function parameterStatus

packages/sql/pg/test/PgProtocol.test.ts:358–362  ·  view source on GitHub ↗
(name: string, value: string)

Source from the content-addressed store, hash-verified

356 // ParameterStatus is two C-strings and nothing else, so it is the cheapest
357 // way to drive the string decoder across the length its fast path covers.
358 const parameterStatus = (name: string, value: string): Uint8Array => {
359 const encoder = new TextEncoder()
360 const encode = (text: string) => encoder.encode(text)
361 return frame(encode(name), encode(value))
362 }
363
364 const frame = (name: Uint8Array, value: Uint8Array): Uint8Array => {
365 const length = 4 + name.length + 1 + value.length + 1

Callers 1

PgProtocol.test.tsFile · 0.85

Calls 2

frameFunction · 0.70
encodeFunction · 0.70

Tested by

no test coverage detected