2,372 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
1
vote
1
replies
74
views
Automerge as svelte-flow backup
Just to prime - The following question is about understanding why automerge, indexedDB adapter and svelte-stores behave in a specific way - I'm not searching for code debug and just put the code in a ...
0
votes
1
answer
95
views
Creating an array of all indexedDB key values - function returns before completion [duplicate]
I am having a challenge with indexedDB keys not matching the record numbers. To correct this I need to cycle through the records and reset the ID to match the index. I am trying to form an array that ...
-3
votes
1
answer
85
views
Indexed DB code does not run inside a click event? [closed]
I cannot add a record to the db when inside a click event
When I remove the click event function the record is added perfectly.
Does anyone know how to get this code to work inside the click event?
...
0
votes
0
answers
74
views
When using Jotai atoms with IndexedDB persistence, the atom resets to null on page reload, even though IndexedDB still contains the stored data
In my React frontend project, I’m using Jotai for state management with IndexedDB persistence to share data across the app.
Current Implementation:
On login, we fetch user settings (including the ...
1
vote
1
answer
100
views
Persistent storage denied for IndexedDB
I intend to use IndexedDB for local storage from local HTML.
However, the DB tables were deleted when free space on drive C: decreases to a certain level. For some reason browser won't let me turn ...
0
votes
1
answer
101
views
Svelte-flow async integration with indexedDB
Context
I'm using Svelte-Flow with Sevelte 5 for some project. To scale I want to have the object defining my node pushed to indexedDB. To keep it in sync and don't dodata handling twice, I want to ...
0
votes
0
answers
20
views
How do I write generic get record by index function using idb package?
My main goal is to avoid hardcoded values so I store string literals via const object as const.
import { Injectable } from '@angular/core';
import { openDB, DBSchema, IDBPDatabase } from 'idb';
const ...
0
votes
1
answer
37
views
IndexedDB await get not returning an object
Working with IndexedDB, I have this code:
async function Get() {
const dataset=await db.result.transaction('Store1','readwrite').objectStore('Store1').get(5);
console.log(dataset);
}
I am expecting ...
0
votes
1
answer
51
views
How to declare and use compound indexes in indexeddb?
With given values of this shape:
interface Entity {
id: number
created_at: Date
updated_at: Date
title: string
}
And this storage and its indexes:
const store = database.createObjectStore(&...
0
votes
0
answers
73
views
Can I save some data to indexeddb when page is closed
Context
I understand that both events like pagehide and visibilitychange are less guaranteed to be fired, compared to unload and beforeunload, see: https://developer.mozilla.org/en-US/docs/Web/API/...
0
votes
0
answers
38
views
Why is my store not updating in my indexedDB?
First time playing with indexedDB I've been reading though much documentation and authored the approach of:
import {openDB, deleteDB, IDBPDatabase} from 'idb'
const ORIGINAL_STORE = 'original'
const ...
1
vote
1
answer
44
views
dexie.js using variable in LIKE operator
im using this code
var db = new Dexie("likeTest");
db.version(1).stores({
friends: "name,age"
});
db.on('populate', function() {
db.friends.add({name: "Foo Barsson", age: ...
0
votes
0
answers
22
views
Blazor WASM JSRuntime Calls with an Object Argument Work in VS Debugger But Not in a Published Release
I have a Blazor WASM app that uses JSRuntime to Get/Put IndexedDB data (mockup below). Calls to "Put" functions that pass on object to be stored work fine in the VS Community 2022 debugger, ...
0
votes
0
answers
64
views
dexie.js how to use two "equal" in where clause?
I'm using dexie.js and I wanted to make a query with two conditions
In MySQL I would do it like this:
SELECT * FROM tab WHERE age=20 AND gender='Male'
I tried something similar using dexie, but it ...
0
votes
1
answer
50
views
How to use count in dexie.js?
I'm trying to count how many records I have in a table using dexie.js
I try this: alert(db.table.count()); and browser return: [object Dexie.Promise]
If I use console.log(db.table.count()); the ...