• Full name: \App\Infrastructure\Persistence\QueryBuilderTransactionalEventStore
  • This class is marked as final and can't be subclassed
  • This class implements: TransactionalEventStore
  • This class is a Final class

Properties

dfdb

protected \Qubus\Expressive\Database $dfdb

Methods

__construct

public __construct(\Qubus\Expressive\Database $dfdb): mixed

Parameters:

Parameter Type Description
$dfdb \Qubus\Expressive\Database

append

public append(\Codefy\Domain\EventSourcing\DomainEvent $event, \Codefy\Domain\EventSourcing\TransactionId $transactionId): void

Parameters:

Parameter Type Description
$event \Codefy\Domain\EventSourcing\DomainEvent
$transactionId \Codefy\Domain\EventSourcing\TransactionId

Throws:


commit

public commit(\Codefy\Domain\EventSourcing\DomainEvent $events): \Codefy\Domain\EventSourcing\Transactional

Parameters:

Parameter Type Description
$events \Codefy\Domain\EventSourcing\DomainEvent

Throws:


getAggregateHistoryFor

public getAggregateHistoryFor(\Codefy\Domain\Aggregate\AggregateId $aggregateId): \Codefy\Domain\EventSourcing\EventStream

Parameters:

Parameter Type Description
$aggregateId \Codefy\Domain\Aggregate\AggregateId

Throws:


loadFromPlayhead

public loadFromPlayhead(\Codefy\Domain\Aggregate\AggregateId $aggregateId, int $playhead): \Codefy\Domain\EventSourcing\EventStream

Parameters:

Parameter Type Description
$aggregateId \Codefy\Domain\Aggregate\AggregateId
$playhead int

Throws:


eventStream

private eventStream(\Qubus\Expressive\Database|null $query, \Codefy\Domain\Aggregate\AggregateId $aggregateId): \Codefy\Domain\EventSourcing\EventStream

Parameters:

Parameter Type Description
$query \Qubus\Expressive\Database|null
$aggregateId \Codefy\Domain\Aggregate\AggregateId

Throws: