(scope: string, stageId: string, lock: boolean)
| 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( |
no test coverage detected