dexie / Dexie.js

A Minimalistic Wrapper for IndexedDB
https://dexie.org
Apache License 2.0
11.69k stars 641 forks source link

Computed value: entry as a function of other entries #2072

Open tobiasBora opened 2 months ago

tobiasBora commented 2 months ago

I'd like to create an excel-like app, where in each cell I can write a formula, computing its value from other cells (the exact list of cells depends on the formula). But I don't know how to do this efficiently with Dexie.js. Would you consider adding a "computed value" functionality, where an entry in the database can be specified as a function of other entries? In the meantime, what workaround would you recommend?

dfahlander commented 1 month ago

Sorry I missed this issue. This functionality would be a bit too complex to fit within the scope of dexie but it could equally well be implemented outside or possibly as an addon registering its own dbcore middleware. Need to detect circular dependencies. But if I was the one building this kind of application I would probably create some layer on top of dexie to request and update cell data.

tobiasBora commented 1 month ago

Ok thanks for your answer, I can understand your point. I'll try to see how to make this in a reasonably efficient way.