(body: Effect.Effect<A, E, DbService>)
| 33 | } from "./executor-schema"; |
| 34 | |
| 35 | const program = <A, E>(body: Effect.Effect<A, E, DbService>) => |
| 36 | Effect.runPromise( |
| 37 | body.pipe(Effect.provide(DbService.Live), Effect.scoped) as Effect.Effect<A, E, never>, |
| 38 | ); |
| 39 | |
| 40 | // Insert one row into every tenant table, plus an org- and a user-scoped blob, |
| 41 | // all owned by `tenant`. `tag` keeps unique indexes from colliding across orgs. |