Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

set revMin optional

  • Loading branch information...
commit f07cc281fa6d6a0d3c1dab27c65ff6eecaf7440b 1 parent b4894d8
@adrai authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 lib/eventStore.js
View
12 lib/eventStore.js
@@ -273,17 +273,23 @@ Store.prototype = {
);
},
- // __getEventStream:__ loads the eventstream from _minRev_ to _maxRev_.
+ // __getEventStream:__ loads the eventstream from _revMin_ to _revMax_.
//
// `eventStore.getEventStream(streamId, minRev, maxRev, callback)`
//
// - __streamId:__ id for requested stream (equal to aggregateId)
- // - __minRev:__ revision startpoint
- // - __maxRev:__ revision endpoint (hint: -1 = to end) [optional]
+ // - __revMin:__ revision startpoint [optional]
+ // - __revMax:__ revision endpoint (hint: -1 = to end) [optional]
// - __callback:__ `function(err, snapshot, eventStream){}`
getEventStream: function(streamId, revMin, revMax, callback) {
if (this.hasConfigurationErrors(callback)) return;
+
+ if (typeof revMin === 'function') {
+ callback = revMin;
+ revMin = 0;
+ revMax = -1;
+ }
if (typeof revMax === 'function') {
callback = revMax;
Please sign in to comment.
Something went wrong with that request. Please try again.