Skip to content

Commit c7318be

Browse files
dfahlanderliz709
authored andcommitted
Add test for virtual index fallback behavior
- Verify that queries work correctly when only compound indexes exist - Tests that virtual sub-indexes are used as fallback when no explicit index is defined - Ensures startsWith() works with virtual indexes created from compound indexes like [name+age+shoeSize]
1 parent 8d8709d commit c7318be

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
"cd src",
9090
"tsc [--watch 'Watching for file changes']",
9191
"tsc --target es2021 --outdir ../tools/tmp/modern/src/",
92-
"rollup -c ../tools/build-configs/rollup.config.js",
93-
"rollup -c ../tools/build-configs/rollup.umd.config.js",
94-
"rollup -c ../tools/build-configs/rollup.modern.config.js",
92+
"rollup -c ../tools/build-configs/rollup.config.mjs",
93+
"rollup -c ../tools/build-configs/rollup.umd.config.mjs",
94+
"rollup -c ../tools/build-configs/rollup.modern.config.mjs",
9595
"node ../tools/replaceVersionAndDate.js ../dist/dexie.js",
9696
"node ../tools/replaceVersionAndDate.js ../dist/dexie.mjs",
9797
"node ../tools/replaceVersionAndDate.js ../dist/modern/dexie.mjs",

test/next/tests-next.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {resetDatabase, supports, spawnedTest, promisedTest, isSafari, isSafariPr
77
const _db = new Dexie("Apansson") as Dexie & {
88
friends: Dexie.Table<{id?: number, name: string, age: number, shoeSize: number}, number>;
99
}
10-
_db.version(1).stores({friends: '++id,name,age,[name+age+shoeSize]'});
10+
_db.version(13).stores({friends: '++id,age,name,[name+age+shoeSize]'});
1111
_db.on("populate", function() {
1212
_db.friends.bulkAdd([
1313
{name: "Arne1", age: 42, shoeSize: 46},

0 commit comments

Comments
 (0)