web4more / indexeddb

🖥️ Node.js indexedDB API using an SQLite backend
Apache License 2.0
1 stars 0 forks source link

From TODO #1

Closed jcbhmr closed 1 year ago

jcbhmr commented 1 year ago

binary tree

write tests for RecordStore, including benchmarks

implement

balance?


revisit setImmediate

test that IDBObjectStore.index returns the same or different IDBIndex depending on situation http://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBObjectStore-index-IDBIndex-DOMString-name

Other tests

multiple readonly transactions should be allowed to run at the same time (but not readwrite, they should be all alone)

readonly properties need to actually be readonly

share some code between Index and ObjectStore, like getValue, confirmActiveTransaction, count

break events stuff into separate module, maybe fakeDOMEvents

go through and fix all the left comments (todo stuff)

_ properties should be hidden from standard functions

For .filter calls that are deleting items from arrays (such as ObjectStore.deleteRecord) it might be faster to use splice as iterating over the array

btree? slice to add to middle of array is slow http://jsperf.com/splicing-a-single-value/19

what if my backend data storage was async? should make it easier to plug-and-play things besides JS objects

findIndex (and similar) could be replaced by smarter searches, like binary search if we know the list is sorted