Questions tagged [lawnchair]

Lawnchair is a client-side JSON object store implemented in JavaScript.

Lawnchair is a simple JSON database for client-side storage in web applications. Lawnchair supports various storage mechanisms such as plain DOM objects, Gears/SQLite, and WebKit/SQLite.

References:

60 questions
2
votes
1 answer

Lawnchair + Android + PhoneGap working, but not persistent

This is my first attempt at using Lawnchair. I was able to get a simple save/get example working, but the get only seems to work as long as it is within the same application launch. On subsequent app launches, it fails to find the object I have…
tjc59
  • 633
  • 8
  • 24
2
votes
1 answer

Can Lawnchair .all be configured to return an object indexed by key?

I am using Lawnchair to store data locally on my client. The key I am using to insert values is created server-side. Currently when I use .all the list of returned values is an array indexed from 0. I then iterate over this list storing returned…
Resonance
  • 106
  • 6
2
votes
2 answers

Phonegap: can't make localStorage persist

So I init everything: var Store = new Lawnchair({table:'mightapp', adaptor:'gears'}, function(s) { var obj = {msg: 'hooray!'}; s.save({key: "msg", value: obj}); }); Then I comment out the message to test if it persisted... var Store =…
2
votes
3 answers

Asynchronous SQL insert in loop

I'm having trouble inserting rows into an SQL database. I want to turn an array of objects into a SQL table in javascript. The following code only adds the first object of the array. I've tried everything I could find on stackoverflow and elsewhere…
1
vote
1 answer

Lawnchair "exists" method?

I am trying to use lawnchair but the documentation on the site and github seem to say different things. Currently I need to check if an entry exists, and if not create one. However when I run lawnchair (not special parameters as I let it choose the…
Grofit
  • 17,693
  • 24
  • 96
  • 176
1
vote
1 answer

Rails 3 offline web app storage and sync

I'd like to use rails 3 to develop mobile apps that will be able to work offline and sync back as soon as the network is available. I found lawnchair which seems promising for storing/syncing because it is pure json. Is there a way or design pattern…
tommasop
  • 18,495
  • 2
  • 40
  • 51
1
vote
2 answers

How to troubleshoot my SQLite database in a PhoneGap application?

I am using Phonegap and Lawnchair with the SQLitePlugin adapter (https://github.com/davibe/Phonegap-SQLitePlugin). How do I troubleshoot the DB to see what's happening? The DB doesn't seem to show up in the web inspector tool as a localstrorage…
say
  • 2,585
  • 7
  • 35
  • 48
1
vote
0 answers

Android System information

I am trying to write a program to write all the android system information accessible from browser as a cookie like , Browser Version IP address OS OS n Browser version Plugins browser supported Device id if i can Is it possible to pull all these…
rana
  • 1,824
  • 3
  • 21
  • 36
1
vote
2 answers

Use JavaScript Variable as Object Identifier

I am trying to store the following object in the browser local store via a jQuery plugin (Lawnchair): {"key" : lcName, lcType : dataObj} The problem I'm having is that 'lcType' is a variable (of type string) passed to the function which stores the…
dSquared
  • 9,725
  • 5
  • 38
  • 54
1
vote
2 answers

Phonegap - Access data offline from database

I have mutiple tables on my server side which I need to fetch data from and store it on my client side Phonegap so it can be accessed offline. I found Lawnchair but I can't find enough documentation how to save and update mutiple tables. There is…
omarsafwany
  • 3,695
  • 8
  • 44
  • 75
1
vote
0 answers

Does Phonegap Storage API creates a native app database?

I just want to confirm. When using Phonegap Storage API. Does it actually creates / write a native SQL database? Because I probably create a native code C++ / Java to access it and do some stuff there. :) Thanks.
paolooo
  • 4,133
  • 2
  • 18
  • 33
1
vote
2 answers

String ValuesConfiguration File in Phonegap with JQM for android

I am developing app for android using Phonegap with JQM. In J2ME app development , We can have centralized file ( message.txt ) we store list of string values which we are going to use. Like that can we have some configuration to get the string…
Pavunkumar
  • 5,147
  • 14
  • 43
  • 69
1
vote
0 answers

Phonegap lawnchair adaptors

Which adaptor should I use in phonegap to get coverage in maximum android and iOS devices? And other than providing cloud storage for the app, what is a good option to backup the data in case the lawnchair localstorage data somehow goes missing or…
anon
  • 1,101
  • 3
  • 17
  • 33
1
vote
1 answer

Need to restart app..Using Phonegap with lawnchair

I need to restart my app everytime I insert,delete or update my data. Data is inserting and deleting properly...but dont know why i need to restart my app everytime to get the effect. I want to use the file structure for this app.
1
vote
2 answers

Lawnchair across multiple pages

I have been playing around with using Lawnchair in phonegap but can only get the data to load on the same page it was saved. Is this how Lawnchair works? I have tried console.log to log the data that I have saved using Lawnchair on the page that it…
Aaron Fisher
  • 645
  • 3
  • 8
  • 23