JsStore
JsStore copied to clipboard
Where over undeclared columns
This could be a good feature for tables with many columns, some of them seldom filtered and not wanting to declare them for space minimization. dexie.js has this feature with the .filter() and other methods. Maybe a good thing could be a that the where must involve an declared (indexed) column before filtering by undeclared column.
I am no very good javascript to offer any help.
Thanks for this excellent library.
I can understand the suggestion but whole point of indexeddb is that if you want to search something, put indexes so that searching becomes faster and JsStore implemented the same concept.
On the other hand , implementing your suggestion will be like adding more complexity both in size & learning in JsStore. I will see if i can implement this with small changes, so keeping this thread open until i have something.
UPDATE - JsStore is created in such a way to use indexing & implementing this will have big changes. I need time to think what will be good way to implement without affecting other parts.
Keeping this thread open.
Sorry for such a long time, i got busy with some other projects.
I have added this feature in jsstore, now where query can be performed on non indexed column if one of the column in where is indexed.
e.g -
select({
from:'Customers',
where:{
name:'ujjwal',
emailId:'[email protected]'
}
})
here emailId is not indexed but name is.
This feature has been added in v - 4.4.1.
If anyone is looking to query on all non Indexed column, then in this case store can be used.
You need to select all data from table and then use store
to perform filtering and other queries.