@proto-kit/persistanceDocs


Documentation / @proto-kit/persistance / PrismaBatchStore

Class: PrismaBatchStore

Implements

Constructors

new PrismaBatchStore()

new PrismaBatchStore(connection, batchMapper): PrismaBatchStore

Parameters

connection: PrismaConnection

batchMapper: BatchMapper

Returns

PrismaBatchStore

Defined in

packages/persistance/src/services/prisma/PrismaBatchStore.ts:11

Methods

getBatchAt()

getBatchAt(height): Promise<undefined | Batch>

Parameters

height: number

Returns

Promise<undefined | Batch>

Implementation of

BatchStorage.getBatchAt

Defined in

packages/persistance/src/services/prisma/PrismaBatchStore.ts:16


getCurrentBatchHeight()

getCurrentBatchHeight(): Promise<number>

Returns

Promise<number>

Implementation of

BatchStorage.getCurrentBatchHeight

Defined in

packages/persistance/src/services/prisma/PrismaBatchStore.ts:38


getLatestBatch()

getLatestBatch(): Promise<undefined | Batch>

Returns

Promise<undefined | Batch>

Implementation of

BatchStorage.getLatestBatch

Defined in

packages/persistance/src/services/prisma/PrismaBatchStore.ts:68


pushBatch()

pushBatch(batch): Promise<void>

Parameters

batch: Batch

Returns

Promise<void>

Implementation of

BatchStorage.pushBatch

Defined in

packages/persistance/src/services/prisma/PrismaBatchStore.ts:47