Reads a document of a projection.
Optionaloptions: { tx?: EventStoreTransaction }The document and, for a single-stream projection, the version of its stream (null for a document fed by
many streams); null when there is no document
The version of a stream, 0 when it does not exist.
Optionaloptions: { tx?: EventStoreTransaction }
Creates the missing tables of the projections given to createEventStore (see projectionTable), on its own connection of the pool, never in a transaction: MySQL commits every DDL statement. Existing tables are never changed.
An append without
txcreates the tables of the inline projections before their first use. An append in a transaction of the application (tx) never creates them: it would need a second connection of the pool while the transaction holds one, and a table created after the transaction began cannot be read in it (ER_TABLE_DEF_CHANGED). It throws when they are missing, so callinit()on start when you append withtx.