Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Dexie's table.where() Method when Targeting Existing IndexedDB with Indexed KeyPath #1994

Open
Naveen-neuphony opened this issue May 15, 2024 · 0 comments

Comments

@Naveen-neuphony
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant