NamespaceDrop a projection completely
Query a projection
Optionaloptions: { where?: Record<string, any> }Manually refresh a projection by reprocessing all events
Set an event-specific reducer for a projection (adds new or updates existing)
Update an existing projection's schema with custom SQL alterations. Throws if projection doesn't exist.
Will append an event with optimistic concurrency control. Uses Dynamic Consistency Boundary (DCB) to detect conflicts without table locks. If queryV2 & lastKnownEventId are provided, it checks if any relevant events were added since lastKnownEventId. If yes, throws a concurrency error.
The event id
Will retrieve every event that match the Query
Will close all database connections Usefull to cleanup after tests
Will create necessary table
Will destroy every stream prefixed by 'test-' Usefull to cleanup all test stream
Optionalpayload: { excludeCurrentStream: boolean }Will drop the current stream Usefull to cleanup a test stream
Will insert events in the stream without any concurrency check Usefull to setup a test stream with a lot of events
An array of event id
Wait for instance to finish loading projections from database
Will remove every events of the stream
Create a new projection with schema. Throws if projection already exists.