Database Adapter implementation for the neos/eventstore package.
Note Currently this package supports MySQL (including MariaDB), PostgreSQL and SQLite.
Install via composer:
composer require neos/eventstore-doctrineadapter
To create a DoctrineEventStore
, an instance of \Doctrine\DBAL\Connection
is required.
This can be obtained from a given DSN for example:
use Doctrine\DBAL\DriverManager;
$connection = DriverManager::getConnection(['url' => $dsn]);
See Doctrine documentation for more details.
With that, an Event Store instance can be created:
use Neos\EventStore\DoctrineAdapter\DoctrineEventStore;
$eventTableName = 'some_namespace_events';
$eventStore = new DoctrineEventStore($connection, $eventTableName);
See README of the neos/eventstore
package for details on how to write and read events.
Contributions in the form of issues, pull requests or discussions are highly appreciated
See LICENSE