MCPcopy Create free account
hub / github.com/denodrivers/postgres / decodeBytea

Function decodeBytea

query/decoders.ts:76–82  ·  view source on GitHub ↗
(byteaStr: string)

Source from the content-addressed store, hash-verified

74}
75
76export function decodeBytea(byteaStr: string): Uint8Array {
77 if (HEX_PREFIX_REGEX.test(byteaStr)) {
78 return decodeByteaHex(byteaStr);
79 } else {
80 return decodeByteaEscape(byteaStr);
81 }
82}
83
84export function decodeByteaArray(value: string) {
85 return parseArray(value, decodeBytea);

Callers 1

decodeTextFunction · 0.90

Calls 2

decodeByteaHexFunction · 0.85
decodeByteaEscapeFunction · 0.85

Tested by

no test coverage detected