Skip to content
Advertisement

Tag: indexeddb

Retrieve value from IndexedDB using Dexie and Svelte

I don’t understand how I can get a value from IndexedDB using Dexie. Database is all good in ‘application’ tab in inspect tool. Total newbie, so please be understanding. My db.js App.svelte Whatever I try, object with daysMax={total} outputs undefined, [object Object] or something like [Dexie object Object]. I just want to get 20 from db, as seen in db.js:

How do I change an object’s value in an IndexedDB index?

Is it possible to update an object’s value within an IndexedDB index without cloning, deleting, or putting a new entry? Theoretically something like the following snippet would do the trick, though it probably would not delete until the put was confirmed. But it looks like overkill to me. It looks like it would be a nightmare to do any error

Ensure data types in Dexie.js fields

I have a Dexie.js database with the table “businessLayers” in my React application. I’d like to ensure de data types of the tuples inserted in that table. I thought the method Table.defineClass() would do that, but it does not. My db is the following: I’d like to make not possible to insert an invalid data type on each field. I

Save FormData to Indexdb

The below code is what take final action to save the data to the target DB. Now I am building an offline app, where when no internet is available I would like to save this request to indexdb. I have the whole setup. All I want to know how can I save a FormData instance to indexdb so that I

Advertisement