You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue with Dexie's table.where() method when targeting an existing IndexedDB database where the keyPath is already indexed. Below is a minimal example demonstrating the problem:
import Dexie from 'dexie';
// Define the Dexie database
const db = new Dexie('myExistingDB');
db.version(1).stores({
// Assume 'id' is already indexed
myTable: '++id, indexedField',
});
// Attempt to query using table.where()
const query = db.myTable.where('indexedField').equals('someValue');
I encountered an issue with Dexie's table.where() method when targeting an existing IndexedDB database where the keyPath is already indexed. Below is a minimal example demonstrating the problem:
import Dexie from 'dexie';
// Define the Dexie database
const db = new Dexie('myExistingDB');
db.version(1).stores({
// Assume 'id' is already indexed
myTable: '++id, indexedField',
});
// Attempt to query using table.where()
const query = db.myTable.where('indexedField').equals('someValue');
query.toArray().then(result => {
console.log(result);
}).catch(error => {
console.error('Error:', error);
});
I'm using latest Dexie version
Platform : Desktop app with electron
The text was updated successfully, but these errors were encountered: