mirror of
https://github.com/moparisthebest/PhoneGap-SQLitePlugin-Android
synced 2024-11-26 02:22:15 -05:00
Adding db option to change the sqlite filename
This commit is contained in:
parent
6badbe15e4
commit
a6798cb042
11
README.md
11
README.md
@ -86,12 +86,19 @@ Include the following js files in your html:
|
|||||||
- pgsqlite_plugin.js
|
- pgsqlite_plugin.js
|
||||||
- lawnchair_pgsqlite_plugin_adapter.js (must come after 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 }, () ->
|
kvstore = new Lawnchair { name: "kvstore", adapter: PGSQLitePlugin.lawnchair_adapter }, () ->
|
||||||
# do stuff
|
# 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:
|
### Other notes from @Joenoon:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user