Socket
Book a DemoInstallSign in
Socket

eventric-storage

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventric-storage

eventric storage definition

0.4.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

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.

Keywords

eventric

FAQs

Package last updated on 30 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.