File tree 2 files changed +7
-19
lines changed
2 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ import {
39
39
} from '../model/field_index' ;
40
40
import { debugAssert } from '../util/assert' ;
41
41
import { getLogLevel , logDebug , LogLevel } from '../util/log' ;
42
- import { ValueIterable , values } from '../util/misc' ;
42
+ import { Iterable } from '../util/misc' ;
43
43
import { SortedSet } from '../util/sorted_set' ;
44
44
45
45
import { IndexManager , IndexType } from './index_manager' ;
@@ -209,7 +209,7 @@ export class QueryEngine {
209
209
210
210
return this . appendRemainingResults (
211
211
transaction ,
212
- values ( indexedDocuments ) ,
212
+ previousResults ,
213
213
query ,
214
214
offset
215
215
) as PersistencePromise < DocumentMap | null > ;
@@ -373,7 +373,7 @@ export class QueryEngine {
373
373
*/
374
374
private appendRemainingResults (
375
375
transaction : PersistenceTransaction ,
376
- indexedResults : ValueIterable < Document > ,
376
+ indexedResults : Iterable < Document > ,
377
377
query : Query ,
378
378
offset : IndexOffset
379
379
) : PersistencePromise < DocumentMap > {
Original file line number Diff line number Diff line change @@ -68,6 +68,10 @@ export interface Equatable<T> {
68
68
isEqual ( other : T ) : boolean ;
69
69
}
70
70
71
+ export interface Iterable < V > {
72
+ forEach : ( cb : ( v : V ) => void ) => void ;
73
+ }
74
+
71
75
/** Helper to compare arrays using isEqual(). */
72
76
export function arrayEquals < T > (
73
77
left : T [ ] ,
@@ -87,19 +91,3 @@ export function immediateSuccessor(s: string): string {
87
91
// Return the input string, with an additional NUL byte appended.
88
92
return s + '\0' ;
89
93
}
90
-
91
- export interface ValueIterable < V > {
92
- forEach : ( cb : ( v : V ) => void ) => void ;
93
- }
94
-
95
- /**
96
- * Exposes a `forEach(value)` method on objects that provide an
97
- * `forEach(key, value)` iterator.
98
- */
99
- export function values < K , V > ( iterable : {
100
- forEach : ( cb : ( k : K , v : V ) => void ) => void ;
101
- } ) : ValueIterable < V > {
102
- return {
103
- forEach : cb => iterable . forEach ( ( k , v ) => cb ( v ) )
104
- } ;
105
- }
You can’t perform that action at this time.
0 commit comments