idb
idb copied to clipboard
IndexedDB, but with promises
TS declaration error: Type 'IndexNames<DBTypes, StoreName>' does not satisfy the constraint 'string'
When compiling any project that relies on the idb library, I'm getting the following TypeScript error: `Error: node_modules/idb/build/entry.d.ts:359:45 - error TS2344: Type 'IndexNames' does not satisfy the constraint 'string'` Looking...
I have an index result ``` const groupsTable = db.createObjectStore("groups", { keyPath: "groupId", }); groupsTable.createIndex("boardId", "boardId", { unique: false }); await db.getAllFromIndex("groups", "boardId", boardId); ``` but I need order result...
DeleteDB always gets blocked because the database is never closed. It should automatically be closed on Delete. Otherwise something like this is necessary: ```js unwrap(await db).close(); await new Promise(resolve =>...
Hi, I want to only add items to the db and ignore those that are already present in db. ID is unique, I did ```typescript async storeUsers(users: StoredUserPreview[]) { const...
This is an improved version of #151, aimed at solving #150. The general idea is that you specify the auto-incrementing key's name in `DBSchemaValue["autoIncrementKeyPath"]`, and then internally it labels that...
**Is your feature request related to a problem? Please describe.** The problem is that these lines(and similar `unlisten`-s) are confusing https://github.com/jakearchibald/idb/blob/eb2fc14bb3588d09aaa5e86a83bf3519b06e10b3/src/wrap-idb-value.ts#L76-L80 **Describe the solution you'd like** Can you add comments...
I used to import openDB with `import { openDB } from 'idb/with-async-ittr'` but after updating to idb ver 8, this import from with-async-ittr is no longer available. I also tried...
After updating to 8.0.0 I'm seeing "ConstraintError: Key already exists in the object store." errors in Sentry. I'm unable to reproduce. Different browsers. ![image](https://github.com/jakearchibald/idb/assets/1473102/5c023c54-3637-4e55-b05a-2fc20e075cdb) I rolled back to 7.1.1 for...
This simplified example can be found on [Replit](https://replit.com/@OlegAzava/IndexedDb-extending-schema#index.ts). I want to organise my file structure by store: ``` index.ts user.ts portfolio.ts ... ``` In `index.ts` I have: ```ts import {...
this is more of a personal itch, but as i'm mostly using types via JSDoc there is a small bit of friction when opening the db [since there isn't a...