SQLiteEventStore

zio.blocks.projection.SQLiteEventStore
See theSQLiteEventStore companion class

Attributes

Companion
class
Source
EventStore.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def make[E : Schema](transactor: Transactor): Task[SQLiteEventStore[E]]

Creates a store for E in the database of transactor.

Creates a store for E in the database of transactor.

It creates the events table and its index if they are missing, and a bounded hub of 4,096 events to publish to. The tags of E are worked out from its schema with TagResolver.resolve. When the store starts, it compares the tags in the database with the ones it knows, and logs a warning for any it cannot explain.

Value parameters

transactor

the connection to the database file, usually from a TransactorCache

Attributes

Source
EventStore.scala
def make[E : Schema](transactor: Transactor, migration: Migration[E, E]): Task[SQLiteEventStore[E]]

Like make, for an event type whose cases were renamed.

Like make, for an event type whose cases were renamed.

The renameCase steps of migration give the old names of the cases, so that the events saved under an old name are still read, as the renamed case.

Value parameters

migration

the renames of the cases of E; only its renameCase steps make aliases

transactor

the connection to the database file, usually from a TransactorCache

Attributes

Source
EventStore.scala
def makeBlocking[E : Schema](transactor: Transactor, hub: Hub[EventEnvelope[E]]): SQLiteEventStore[E]

Creates a store without an effect, for tests that need one outside a ZIO program.

Creates a store without an effect, for tests that need one outside a ZIO program.

It creates the table and its index on the calling thread, and publishes to hub. Unlike make, it does not check the tags in the database.

Value parameters

hub

the hub that every appended event is published to

transactor

the connection to the database file

Attributes

Source
EventStore.scala
def makeBlocking[E : Schema](transactor: Transactor, hub: Hub[EventEnvelope[E]], migration: Migration[E, E]): SQLiteEventStore[E]

Like makeBlocking, for an event type whose cases were renamed. The renameCase steps of migration give the old names of the cases.

Like makeBlocking, for an event type whose cases were renamed. The renameCase steps of migration give the old names of the cases.

Value parameters

hub

the hub that every appended event is published to

migration

the renames of the cases of E; only its renameCase steps make aliases

transactor

the connection to the database file

Attributes

Source
EventStore.scala
def makeBlockingWithResolver[E : Schema](transactor: Transactor, hub: Hub[EventEnvelope[E]], tagInfo: TagInfo): SQLiteEventStore[E]

Like makeBlocking, with a TagInfo you built yourself.

Like makeBlocking, with a TagInfo you built yourself.

Value parameters

hub

the hub that every appended event is published to

tagInfo

the tags of E, and the old tags that were renamed to them

transactor

the connection to the database file

Attributes

Source
EventStore.scala
def makeWithHub[E : Schema](transactor: Transactor, hub: Hub[EventEnvelope[E]]): Task[SQLiteEventStore[E]]

Like make, but publishes to hub instead of creating one, for example to choose its capacity or what happens when it is full.

Like make, but publishes to hub instead of creating one, for example to choose its capacity or what happens when it is full.

Value parameters

hub

the hub that every appended event is published to

transactor

the connection to the database file, usually from a TransactorCache

Attributes

Source
EventStore.scala
def makeWithHub[E : Schema](transactor: Transactor, hub: Hub[EventEnvelope[E]], migration: Migration[E, E]): Task[SQLiteEventStore[E]]

Like makeWithHub, for an event type whose cases were renamed. The renameCase steps of migration give the old names of the cases.

Like makeWithHub, for an event type whose cases were renamed. The renameCase steps of migration give the old names of the cases.

Value parameters

hub

the hub that every appended event is published to

migration

the renames of the cases of E; only its renameCase steps make aliases

transactor

the connection to the database file, usually from a TransactorCache

Attributes

Source
EventStore.scala
def makeWithHub[E : Schema](transactor: Transactor, hub: Hub[EventEnvelope[E]], tagInfo: TagInfo): Task[SQLiteEventStore[E]]

Like makeWithHub, with a TagInfo you built yourself. All the other factories that return a Task end up here: it creates the table and its index, and checks the tags in the database.

Like makeWithHub, with a TagInfo you built yourself. All the other factories that return a Task end up here: it creates the table and its index, and checks the tags in the database.

Value parameters

hub

the hub that every appended event is published to

tagInfo

the tags of E, and the old tags that were renamed to them

transactor

the connection to the database file, usually from a TransactorCache

Attributes

Source
EventStore.scala
def makeWithResolver[E : Schema](transactor: Transactor, tagInfo: TagInfo): Task[SQLiteEventStore[E]]

Like make, with a TagInfo you built yourself, for example with TagResolver.resolve, instead of one worked out from the schema.

Like make, with a TagInfo you built yourself, for example with TagResolver.resolve, instead of one worked out from the schema.

Value parameters

tagInfo

the tags of E, and the old tags that were renamed to them

transactor

the connection to the database file, usually from a TransactorCache

Attributes

Source
EventStore.scala