Comments (4)
I'm not quite sure I understand this. In particular, what IndexedDB operations do you suggest this maps to?
from kv-storage.
there is no existing IndexedDB operation to "append" data to an entry. this would be a new operation in kv-storage, for example:
// persist nedb as logfile
tx.objectStore(store).add("nedb", "");
// log set-operation to table1
tx.objectStore(store).append("nedb", 'table1 set { "id": 1, "field1": "foo", "field2": "bar" }\n');
// log set-operation to table1
tx.objectStore(store).append("nedb", 'table1 set { "id": 2, "field1": "baz", "field2": "quz" }\n');
// log delete-operation to table1
tx.objectStore(store).append("nedb", 'table1 delete { "id": 1 }\n');
...
// restart browser, and restore nedb by replaying logfile
var logfile = tx.objectStore(store).get("nedb");
var myDb = replay(logfile);
// myDb = { table1: [{id: 2, field1: "baz", field2: "qux"}] }
because IndexedDB has no append
feature, nedb currently has to inefficiently set
the entire logfile for write-persists.
from kv-storage.
Ah, OK. Since KV Storage is just a higher-level interface on top of IndexedDB, I think you'd be best off opening the issue on the IndexedDB specification instead: https://github.com/w3c/IndexedDB/issues/. It's not within scope here to add things which are impossible to accomplish with IndexedDB.
Closing, but happy to continue discussing in the closed thread!
from kv-storage.
ok, thx for clarifying scope of kv-storage as just mapping of indexeddb.
from kv-storage.
Related Issues (20)
- Use Web IDL, while preserving our goals HOT 6
- "for (const key of storage.keys()) {"
- Cannot store promise-like values HOT 4
- Async parsing like Cloudflare KV API HOT 4
- README incorrectly refer to AngularJS as Angular HOT 1
- Make storage a default export HOT 2
- Atomic compare-and-swap operation? HOT 5
- Performance concerns HOT 20
- Cross browser compatibility HOT 2
- " })(); " HOT 1
- Can't we use web workers for Async access to LS HOT 4
- Bulk read/write API HOT 7
- Derive from %AsyncIteratorPrototype%? HOT 2
- Handle [[LastKey]] being "not yet started" HOT 2
- Name is unclear HOT 2
- Notate points where the implementation could commit
- [kv-storage] WebAppsWG TPAC F2F agenda (Fukuoka, Sep 19-20 2019) HOT 2
- Range Queries Please 🤓 HOT 1
- Query on implementation status HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kv-storage.