Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

set revMin optional

  • Loading branch information...
commit f07cc281fa6d6a0d3c1dab27c65ff6eecaf7440b 1 parent b4894d8
Adriano Raiano adrai authored

Showing 1 changed file with 9 additions and 3 deletions. Show diff stats Hide diff stats

  1. +9 3 lib/eventStore.js
12 lib/eventStore.js
@@ -273,17 +273,23 @@ Store.prototype = {
273 273 );
274 274 },
275 275
276   - // __getEventStream:__ loads the eventstream from _minRev_ to _maxRev_.
  276 + // __getEventStream:__ loads the eventstream from _revMin_ to _revMax_.
277 277 //
278 278 // `eventStore.getEventStream(streamId, minRev, maxRev, callback)`
279 279 //
280 280 // - __streamId:__ id for requested stream (equal to aggregateId)
281   - // - __minRev:__ revision startpoint
282   - // - __maxRev:__ revision endpoint (hint: -1 = to end) [optional]
  281 + // - __revMin:__ revision startpoint [optional]
  282 + // - __revMax:__ revision endpoint (hint: -1 = to end) [optional]
283 283 // - __callback:__ `function(err, snapshot, eventStream){}`
284 284 getEventStream: function(streamId, revMin, revMax, callback) {
285 285
286 286 if (this.hasConfigurationErrors(callback)) return;
  287 +
  288 + if (typeof revMin === 'function') {
  289 + callback = revMin;
  290 + revMin = 0;
  291 + revMax = -1;
  292 + }
287 293
288 294 if (typeof revMax === 'function') {
289 295 callback = revMax;

0 comments on commit f07cc28

Please sign in to comment.
Something went wrong with that request. Please try again.