Skip to content

Commit

Permalink
preparing gaelyk 2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr committed May 11, 2014
1 parent 7a69787 commit 47548df
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -45,6 +45,7 @@ class SelfRestartingQueryResultIterator<T> implements QueryResultIteratorWithQue
currentCursor = currentIterator.cursor
return next
} catch(e){
if (!currentCursor) throw new NoSuchElementException()
if(e.message?.contains('Please restart it with the last cursor')){
queryBuilder.startAt(currentCursor)
currentIterator = queryBuilder.iterate() as QueryResultIteratorWithQuery
Expand All @@ -57,6 +58,7 @@ class SelfRestartingQueryResultIterator<T> implements QueryResultIteratorWithQue
try {
return currentIterator.hasNext()
} catch(e){
if (!currentCursor) return false
if(e.message?.contains('Please restart it with the last cursor')){
queryBuilder.startAt(currentCursor)
currentIterator = queryBuilder.iterate() as QueryResultIteratorWithQuery
Expand All @@ -73,6 +75,7 @@ class SelfRestartingQueryResultIterator<T> implements QueryResultIteratorWithQue
try {
return currentIterator.getCursor()
} catch(e){
if (!currentCursor) return null
if(e.message?.contains('Please restart it with the last cursor')){
queryBuilder.startAt(currentCursor)
currentIterator = queryBuilder.iterate() as QueryResultIteratorWithQuery
Expand All @@ -85,6 +88,7 @@ class SelfRestartingQueryResultIterator<T> implements QueryResultIteratorWithQue
try {
return currentIterator.getIndexList()
} catch(e){
if (!currentCursor) return []
if(e.message?.contains('Please restart it with the last cursor')){
queryBuilder.startAt(currentCursor)
currentIterator = queryBuilder.iterate() as QueryResultIteratorWithQuery
Expand Down

0 comments on commit 47548df

Please sign in to comment.