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

Function writeUuid

packages/sql/pg/src/PgTypes.ts:913–919  ·  view source on GitHub ↗
(sink: ValueSink, value: unknown)

Source from the content-addressed store, hash-verified

911// Four int32s are the sixteen bytes, so a uuid parameter needs no array of
912// its own on the way into a frame.
913const writeUuid = (sink: ValueSink, value: unknown): void => {
914 uuidWords(value)
915 sink.int32(uuidWord[0])
916 sink.int32(uuidWord[1])
917 sink.int32(uuidWord[2])
918 sink.int32(uuidWord[3])
919}
920
921// One `String.fromCharCode` call, so the result is a flat string rather than
922// a rope of pair concatenations that its first reader has to flatten. 45 is

Callers

nothing calls this directly

Calls 2

uuidWordsFunction · 0.85
int32Method · 0.45

Tested by

no test coverage detected