admin管理员组文章数量:1325505
I am trying to use Lawnchair (/) for a mobile project to store information about different things. I need to store in more than more table.
var people = new Lawnchair('people');
var groups = new Lawnchair('groups');
This does not pletely work, it tries to copy contents from the people table to the group table. I have tried setting people.adapter.table on the fly which also results in a similar issue. I'm beginning to think it is not possible to have more than one table with Lawnchair..
Any help?
I am trying to use Lawnchair (http://westcoastlogic./lawnchair/) for a mobile project to store information about different things. I need to store in more than more table.
var people = new Lawnchair('people');
var groups = new Lawnchair('groups');
This does not pletely work, it tries to copy contents from the people table to the group table. I have tried setting people.adapter.table on the fly which also results in a similar issue. I'm beginning to think it is not possible to have more than one table with Lawnchair..
Any help?
Share Improve this question edited May 11, 2011 at 17:34 Daniel A. White 191k49 gold badges379 silver badges465 bronze badges asked Apr 1, 2011 at 2:46 gmreburngmreburn 412 bronze badges 1- 4 put the tables together and place the lawnchair in the middle. don't forget to wear sunscreen. – pixelbobby Commented May 11, 2011 at 17:34
5 Answers
Reset to default 8You should set the 'name' option on your Lawnchair instances:
var people = new Lawnchair({name: "people"}, function(){});
var groups = new Lawnchair({name: "groups"}, function(){});
-Marc
try older Lawnchair JavaScript Lawnchair library.. stored as same "table"?
I've never used Lawnchair, but it appears to be serializing your objects to JSON which doesn't support references. You might need to convert your objects to some intermediate form (i.e. replace the "people" reference with its key. Then, after you read it, you could use the key to get the object back.
Lawnchair is a cross mobile device key-value data store that insulates you from worrying about what platform your code is on.
You are trying to bend LawnChair in to doing something that it isn't designed to do.
You need to do full HTML5 database SQL.
And also be noted that, use adapter as 'dom' if you have no specific adaptor, sometimes Lawnchair will use window-name adapter as default adaptor, which have some problems with multiple table scenario.
本文标签: javascriptHow do I use Lawnchair with more than one tableStack Overflow
版权声明:本文标题:javascript - How do I use Lawnchair with more than one table? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742197812a2431404.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论