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

Function selectStage

packages/effect/src/eventlog/SqlEventLogServerEncrypted.ts:557–566  ·  view source on GitHub ↗
(scope: string, stageId: string, lock: boolean)

Source from the content-addressed store, hash-verified

555
556 const stageColumns = sql.literal("id, scope, state, pinned, through_sequence, expires_at")
557 const selectStage = (scope: string, stageId: string, lock: boolean) =>
558 query(sql`
559 SELECT ${stageColumns} FROM ${stagesSql} ${lock ? lockHint : noClause}
560 WHERE id = ${stageId} ${lock ? forUpdate : noClause}`).pipe(
561 Effect.map(([row]) => {
562 if (row === undefined) return undefined
563 const stage = toStageRow(row)
564 return stage.scope === scope ? stage : undefined
565 })
566 )
567
568 const selectActivation = (id: string) =>
569 Effect.map(

Callers 2

makeStorageFunction · 0.85
stagePartFunction · 0.85

Calls 4

toStageRowFunction · 0.85
queryFunction · 0.70
pipeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected