diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-09-01 01:05:38 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-09-01 01:05:38 +0200 |
commit | 70912b07250e7c86ace4a0b0b16e90352df93ece (patch) | |
tree | 4609e53f86197c7706e803972537488cacb9173c /src/query.ts | |
parent | aa36fce8a0d1ead29709444527c2d1a4ba9491a6 (diff) |
fix error in index iteration
Diffstat (limited to 'src/query.ts')
-rw-r--r-- | src/query.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/query.ts b/src/query.ts index 7308d9ede..766696874 100644 --- a/src/query.ts +++ b/src/query.ts @@ -21,6 +21,7 @@ */ import { openPromise } from "./promiseUtils"; +import { join } from "path"; /** * Result of an inner join. @@ -463,11 +464,14 @@ class QueryStreamIndexJoin<T, S> extends QueryStreamBase<JoinResult<T, S>> { f(true, undefined, tx); return; } + const joinKey = this.key(value); + console.log("***** JOINING ON", joinKey); const s = tx.objectStore(this.storeName).index(this.indexName); - const req = s.openCursor(IDBKeyRange.only(this.key(value))); + const req = s.openCursor(IDBKeyRange.only(joinKey)); req.onsuccess = () => { const cursor = req.result; if (cursor) { + console.log(`join result for ${joinKey}`, { left: value, right: cursor.value }); f(false, { left: value, right: cursor.value }, tx); cursor.continue(); } |