0.4.0 • Published 9 years ago

eventric-storage v0.4.0

Weekly downloads
22
License
-
Repository
github
Last release
9 years ago

eventric storage definition

Definition of the eventric storage interface and feature specs which can be executed for storage implementations.

API

eventric storage implementations must conform to the following interface:

saveDomainEvent(domainEvent)

Saves a domain event into the stores and returns a promise which resolves after saving

findDomainEvents({aggregateId, startingAtTimestamp})

Searches for domain events in the storage and returns a promise which resolves with the found domain events. If an aggregate id is specified, only domain events with matching property aggregate.id must be returned. If a timestamp is specified, only domain events with property timestamp equal of greater must be returned.

getProjectionStore(projectionName)

Returns a promise which resolves with a unique store for a given projection name.

Note: This is storage implementation specific.

clearProjectionStore(projectionName)

Clears the unique store for a given projection name and returns a promise which resolves after clearing

Note: This is storage implementation specific.

Running feature specs inside storage implementations

The feature specs can be executed to verify a storage implementation is conforming to the above defined interface:

eventricStorage = require 'eventric-storage'
eventricStorage.runFeatureSpecs()

Note: The specs require mocha.

0.4.0

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago