We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a496b1 commit 8270dd5Copy full SHA for 8270dd5
packages/cubejs-backend-native/js/ResultWrapper.ts
@@ -51,6 +51,18 @@ export class ResultWrapper extends BaseWrapper implements DataResult {
51
52
this.proxy = new Proxy(this, {
53
get: (target, prop: string | symbol) => {
54
+ // To support iterative access
55
+ if (prop === Symbol.iterator) {
56
+ const array = this.getArray();
57
+ const l = array.length;
58
+
59
+ return function* () {
60
+ for (let i = 0; i < l; i++) {
61
+ yield array[i];
62
+ }
63
+ };
64
65
66
// intercept indexes
67
if (typeof prop === 'string' && !Number.isNaN(Number(prop))) {
68
const array = this.getArray();
0 commit comments