Could the operations that involve manipulating an array in Javascript be flagged?
Hi. I've been reading your documentation, and trying to build something using Dexie, and I've felt uncomfortable. Reading this man's documentation clarified for me what was making me uncomfortable. https://golb.hplar.ch/2018/01/IndexedDB-programming-with-Dexie-js.html#:~:text=Note%20that%20this%20sorts%20the%20results%20in%20JavaScript. I'm never sure whether I am doing a "relatively efficient" operation in indexedDB, or a somewhat slower (and maybe memory-intensive) operation in Javascript.
I tried to figure it out by reading the code, but I failed. (I am embarrassed.)
If you were to mark each operation "this is done using a data structure in memory" or "this is done by manipulating indexedDB" I would feel much more comfortable using Dexie in my project. At present, I'm shooting in the dark. It works, but what did it do?
Or if you even wanted to describe the algorithm in a couple sentences, that would be great. "It uses the index to extract the information from indexedDB into an array of objects, then it sorts the array by a different index using Javascript."
Good point for the docs. There's a lot to go through though. But I think sortBy() is quite special in that sense. All operations that, unlike sortBy(), return a promise requests data from the database. I think updating sortBy() only would be enough, but it would be good to just go through the methods of Table and Collection to verify it.
Thanks. I'll use "does it return a promise" as a distinguishing factor, for now.