/** * Performs the DDL queries to create the schema necessary for this storage engine implementation. * * @param schemaFactory Factory of the event schema. * @throws EventStoreException when an error occurs executing SQL statements. */ public void createSchema(EventTableFactory schemaFactory) { executeUpdates(getConnection(), e -> { throw new EventStoreException("Failed to create event tables", e); }, connection -> schemaFactory.createDomainEventTable(connection, schema), connection -> schemaFactory.createSnapshotEventTable(connection, schema)); }
/** * Performs the DDL queries to create the schema necessary for this storage engine implementation. * * @param schemaFactory Factory of the event schema. * @throws EventStoreException when an error occurs executing SQL statements. */ public void createSchema(EventTableFactory schemaFactory) { executeUpdates(getConnection(), e -> { throw new EventStoreException("Failed to create event tables", e); }, connection -> schemaFactory.createDomainEventTable(connection, schema), connection -> schemaFactory.createSnapshotEventTable(connection, schema)); }
/** * Performs the DDL queries to create the schema necessary for this storage engine implementation. * * @param schemaFactory Factory of the event schema. * @throws EventStoreException when an error occurs executing SQL statements. */ public void createSchema(EventTableFactory schemaFactory) { executeUpdates(getConnection(), e -> { throw new EventStoreException("Failed to create event tables", e); }, connection -> schemaFactory.createDomainEventTable(connection, schema), connection -> schemaFactory.createSnapshotEventTable(connection, schema)); }