Merge pull request #2 from vojto/master

You should be able to set database file used (Lawnchair adapter)
This commit is contained in:
Davide 2011-12-04 00:19:57 -08:00
commit f4d756c2c5

View File

@ -86,12 +86,19 @@ Include the following js files in your html:
- pgsqlite_plugin.js
- lawnchair_pgsqlite_plugin_adapter.js (must come after pgsqlite_plugin.js)
The `name` option will determine the sqlite filename. In this example, you would be using/creating
the database at: *Documents/kvstore.sqlite3* (all db's in PGSQLitePlugin are in the Documents folder)
The `name` option will determine the sqlite filename. Optionally, you can change it using the `db` option.
In this example, you would be using/creating the database at: *Documents/kvstore.sqlite3* (all db's in PGSQLitePlugin are in the Documents folder)
kvstore = new Lawnchair { name: "kvstore", adapter: PGSQLitePlugin.lawnchair_adapter }, () ->
# do stuff
Using the `db` option you can create multiple stores in one sqlite file. (There will be one table per store.)
recipes = new Lawnchair {db: "cookbook", name: "recipes", ...}
ingredients = new Lawnchair {db: "cookbook", name: "ingredients", ...}
### Other notes from @Joenoon: