eventric-storage
eventric storage definition
Last updated 5 years ago by efacilitation .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eventric-storage 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 0.4.0                                ...           latest (5 years ago)

7 Versions

  • 0.4.0                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (1)
Dependents (2)

Copyright 2014 - 2017 © taobao.org |