Metakit / @doeixd/metakit/store/check

EffectStoreConnection

interface · packages/metakit/src/storeCheck.ts:50

interface EffectStoreConnection<E = unknown> {
  readonly transaction: <A, E2>(
    run: (tx: EffectStoreTx<E>) => Effect.Effect<A, E2>,
  ) => Effect.Effect<A, E | E2>
  readonly read: (id: string) => Effect.Effect<StoreRow | undefined, E>
  readonly write: (id: string, balance: number) => Effect.Effect<void, E>
}

Members

EffectStoreConnection.transaction

property · packages/metakit/src/storeCheck.ts:51

readonly transaction: <A, E2>(
  run: (tx: EffectStoreTx<E>) => Effect.Effect<A, E2>,
) => Effect.Effect<A, E | E2>

EffectStoreConnection.read

property · packages/metakit/src/storeCheck.ts:54

readonly read: (id: string) => Effect.Effect<StoreRow | undefined, E>

EffectStoreConnection.write

property · packages/metakit/src/storeCheck.ts:55

readonly write: (id: string, balance: number) => Effect.Effect<void, E>