Skip to main content
Version: FireSquid

Store Interface

Store is a generic interface exposed by to the batch handler that defines an interface for persisting data. Its concrete type is inferred from the Database argument of the run() method:

run<Store>(db: Database<Store>, handler: (ctx: BatchContext<Store, Item>) => Promise<void>): void

The Database interface only defines the logic of how the processor persists the processor status and the store. Squid SDK supports Database implementations for TypeORM-compatible databases (TypeormDatabase) and flat files. The interface allows implementation of adapters for custom data sinks. Support for more databases and analytic store will be added in the future.