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
16
votes
4 answers

Queryable client-side storage

What solutions are there for queryable client-side data stores? This would be used as a temporary cache to perform basic operations like sorting and aggregating over user-selected date ranges in the client I've found a few promising candidates, but…
user1424744
  • 161
  • 1
  • 5
6
votes
1 answer

Using Adapters with Lawnchair

I'm trying to use adapters in Lawnchair and running into an issue. I've got a couple of Adapter scripts in my code:
ryanstewart
  • 1,004
  • 10
  • 18
5
votes
3 answers

Lawnchair .nuke() not working after filling my storage quota

I'm using Lawnchair to store persistent data using the "dom adapter" of my web client (Firefox 13.0) and have hit the storage quota. Console.log says Persistent storage maximum size reached Fair enough; I'll just nuke it with this:
Thunder Rabbit
  • 5,405
  • 8
  • 44
  • 82
4
votes
5 answers

How do I use Lawnchair with more than one table?

I am trying to use Lawnchair (http://westcoastlogic.com/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…
gmreburn
  • 41
  • 2
4
votes
1 answer

Clear all elements from Backbone Collection and remove them from the associated Lawnchair

I am using Backbone.js, Lawnchair, and backbone.lawnchair.js. I was wondering what the correct way to "empty" a collection (both from the application and from localStorage) would be? Currently, I am employing something along these…
andrewpthorp
  • 4,998
  • 8
  • 35
  • 56
3
votes
2 answers

Android PhoneGap localStorage via Lawnchair

So I've written an app using PhoneGap and Lawnchair. It works perfectly on iOS but on an Android device I get: sqlite returned: error code = 14 This only happens on a device and not in the simulator, any points as to what I'm doing wrong? Note: This…
Ahmed Nuaman
  • 12,662
  • 15
  • 55
  • 87
3
votes
1 answer

Should i use Lawnchair or localForage to maintain data offline

I'm writing an app using Ionic framework. I use mongodb as a datastore in the cloud but the lists are too comprehensive and is slowing the app down. After consuming millions of hours reading about client side storage I still dont have a clear…
petrivoges
  • 79
  • 1
  • 10
3
votes
0 answers

Lawnchair storage with 2 collections on Phonegap Android

I ran into a nasty problem with Lawnchair (0.6.1). I want to have 2 globally accessible collections/Lawnchairs, both with the webkit-sqlite adapter. This is how I declare them, right after loading Lawnchair and the adapter: var clientStore =…
pwntr
  • 65
  • 6
3
votes
2 answers

Using lawnchair with Typescript

Got a simple problem, which was touched upon in a similar question around the "this" scope with typescript. I have a storage service which wraps lawnchair for my local storage concerns. Now I am migrating this code over to Typescript I have come to…
Grofit
  • 17,693
  • 24
  • 96
  • 176
3
votes
1 answer

Receiving errors in lawnchair callbacks

If I call a method in lawnchair and it errors, can I get an error callback? I'm implementing an adapter and have some known error conditions that I would like to provide back to the client to handle. But I can't find out how errors are returned in…
tekumara
  • 8,357
  • 10
  • 57
  • 69
2
votes
1 answer

Lawnchair javascript data "get" does not let me assign into another variable

I am using Lawnchair to save data in js and retrieve it back for my mobile app. I have this in my js file. $(document).ready(function() { //Lawchair set up db = Lawnchair({name: 'db'},function(e){ console.log('storage open'); …
Phyo Wai Win
  • 1,160
  • 6
  • 14
2
votes
1 answer

concatenation array of objects with javascript

I am taking questions from user and save them in DOM using Lawnchair.first step of declaration var dbQuestions = new Lawnchair({name:'questions'}, function(obj) { consol('questions initialized'); }); User can input…
Humayun Kabir
  • 561
  • 2
  • 13
  • 27
2
votes
2 answers

PhoneGap Local Storage WebSQL, IndexedDB, html5sql, lawnchair

I am trying to figure out the best way to store data in my cross platform app I am developing using PhoneGap.The API instructions suggest using WebSQL however this will no longer be supported, and IndexedDB is currently only for Windows /…
2
votes
2 answers

Lawnchair-IndexedDB doesn't support multiple records

I tried creating multiple records in indexed-db but it won't allow me, example, nike and adidas objectStores var nike = Lawnchair({adapter:'indexed-db', name:'stores', record:'nike'},function(e){ console.log("nike store open"); …
paolooo
  • 4,133
  • 2
  • 18
  • 33
2
votes
2 answers

Why does Lawnchair's webkit-sqlite adapter converts key to string?

I got a problem on webkit-sqlite adapter. It somehow saves the key on a string format rather than integer. Indexed-db works just fine. It won't convert the key to string. Please see the code below. var ppl = Lawnchair({adapter: 'webkit-sqlite',…
paolooo
  • 4,133
  • 2
  • 18
  • 33
1
2 3 4