arobson / consequent-postgres

Postrgres storage actor and event adapters for consequent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consequent-Postgres

Provides both actor and event storage adapters for Postgres.

Note: This approach does not support siblings and is best suited for use with microservice architectures where services own their own database or systems where writes are behind a consistent hash on record/actor id.

Approach

Snapshots, events and event packs are all stored in actor/entity-specific tables.

Usage

var consequentFn = require( "consequent" );
var stores = require( "consequent-postgres" )(
	"postgresql://dbuser:secretpassword@database.server.com:3211/mydb"
);

var consequent = consequentFn( {
	actorStore: stores.actor,
	eventStore: stores.event,
	searchStore: stores.search
} );

About

Postrgres storage actor and event adapters for consequent


Languages

Language:JavaScript 94.4%Language:PLpgSQL 4.8%Language:Shell 0.8%