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

Function replyFromRow

packages/effect/src/unstable/cluster/SqlMessageStorage.ts:1147–1161  ·  view source on GitHub ↗
(row: ReplyRow)

Source from the content-addressed store, hash-verified

1145} as const satisfies Record<Reply.Reply<any>["_tag"], number | null>
1146
1147const replyFromRow = (row: ReplyRow): Reply.Encoded =>
1148 row.kind !== null && Number(row.kind) === replyKind.WithExit ?
1149 {
1150 _tag: "WithExit",
1151 id: String(row.id),
1152 requestId: String(row.request_id),
1153 exit: JSON.parse(row.payload)
1154 } :
1155 {
1156 _tag: "Chunk",
1157 id: String(row.id),
1158 requestId: String(row.request_id),
1159 values: JSON.parse(row.payload),
1160 sequence: Number(row.sequence!)
1161 }
1162
1163type MessageRow = {
1164 readonly id: string | bigint

Callers

nothing calls this directly

Calls 3

NumberInterface · 0.50
StringInterface · 0.50
parseMethod · 0.45

Tested by

no test coverage detected