mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-08 02:59:37 -06:00
Sync photo-set-iterator.js between repos (#2818)
This commit is contained in:
@@ -123,6 +123,17 @@ export class SinglePhotoSetIterator extends PhotoSetIterator {
|
||||
this._innerIter = startPhoto ? innerSet.iteratorAt(startPhoto) : innerSet.iterator();
|
||||
return false;
|
||||
}
|
||||
|
||||
async return(): Promise<AsyncIteratorResult<IterValue>> {
|
||||
this._done = true;
|
||||
if (this._innerIter) {
|
||||
await this._innerIter.return();
|
||||
}
|
||||
if (this._outerIter) {
|
||||
await this._outerIter.return();
|
||||
}
|
||||
return {done: true};
|
||||
}
|
||||
}
|
||||
|
||||
export class PhotoSetIntersectionIterator extends PhotoSetIterator {
|
||||
@@ -182,6 +193,9 @@ export class EmptyIterator extends PhotoSetIterator {
|
||||
next(): Promise<AsyncIteratorResult<IterValue>> {
|
||||
return Promise.resolve({done: true});
|
||||
}
|
||||
return(): Promise<AsyncIteratorResult<IterValue>> {
|
||||
return Promise.resolve({done: true});
|
||||
}
|
||||
}
|
||||
|
||||
function isIterationOrder(r1: IterValue, r2: IterValue): boolean {
|
||||
|
||||
Reference in New Issue
Block a user