I'm trying out Lawnchair but the documentation is sparse, to say the least. Here are a few questions:
1) How do I order a list of stored objects? Or, to put in another way, how do I define an index for the objects?
2) Is there any way to have more than one key?
Also, does anyone know another cross-platform (IndexedDB + WebSQL) database framework? persistence.js doesn't cut it since it requires Google Gears on Firefox.
1) As of now, Lawnchair doesn't support
order by
feature. Anyway, possible solution for this is you can sort objects after you grabbed it from Lawnchair. Or maybe perhaps you can add a plugin for that here:http://brian.io/lawnchair/plugins/
2) I have tried adding new keys or fields in Lawnchair. I think it's not possible for now.
You may want to indexedDBShim. It uses indexed-db api but supports websql as well.
https://github.com/axemclion/IndexedDBShim