0

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.

Chris
  • 44,602
  • 16
  • 137
  • 156
rcpinheiro
  • 85
  • 1
  • 6

2 Answers2

0

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

paolooo
  • 4,133
  • 2
  • 18
  • 33
0

Was just trying to answer that same question. Lawnchair seems most flexible and implements a bunch of stores, and you should add the index functionality to it yourself.

I found this presentation while doing research, there are many frameworks listed in the end of it, I will update this answer once I go over them: http://www.slideshare.net/casden/inbrowser-storage-and-me

Artemiy
  • 1,969
  • 14
  • 19