You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
720 B

import {Iterable} from '../../../../../lib/src/collection/Iterable.ts'
import ConnectionExecutable from '../ConnectionExecutable.ts'
import {Collection} from '../../../../../lib/src/collection/Collection.ts'
export class ResultIterable extends Iterable<any> {
constructor(
protected executable: ConnectionExecutable
) { super() }
async at_index(i: number): Promise<any> {
return this.executable.get_row(i)
}
async from_range(start: number, end: number): Promise<Collection<any>> {
return this.executable.get_range(start, end)
}
async count() {
return this.executable.count()
}
clone() {
return new ResultIterable(this.executable)
}
}