Skip to content

Commit

Permalink
Merge branch 'common-src' into master-src: cs-sqlite-dll completely r…
Browse files Browse the repository at this point in the history
…emoved; updates to README.md
  • Loading branch information
Chris Brody committed Aug 11, 2014
2 parents 77713d8 + c257e94 commit 5fc45b4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ License for iOS version: MIT only

## WARNING: breaking change for Android version

The automatic "`.db`" database file extension is [now removed](https://github.com/brodysoft/Cordova-SQLitePlugin/commit/3723cfc2dc933ae128fe9d5998efe4d76fcb0370) for the Android version, for consistency with the iOS & WP(8) versions. For an existing app, you may have to open an existing database like:
The automatic "`.db`" database file extension is [now removed](https://github.com/brodysoft/Cordova-SQLitePlugin/commit/3723cfc2dc933ae128fe9d5998efe4d76fcb0370) for the Android version, for consistency with the other versions. For an existing app, you may have to open an existing database like:

```js
var db = window.sqlitePlugin.openDatabase({name: "my.db"});
Expand Down Expand Up @@ -45,14 +45,18 @@ Also the threading model is changed as described below.
- Android & iOS working with [SQLCipher](http://sqlcipher.net) for encryption (see below)
- Android is supported back to SDK 10 (a.k.a. Gingerbread, Android 2.3.3); Support for older versions is available upon request.

## Apps using Cordova/PhoneGap SQLitePlugin
## Some apps using Cordova/PhoneGap SQLitePlugin

- [Get It Done app](http://getitdoneapp.com/) by [marcucio.com](http://marcucio.com/)
- [Larkwire](http://www.larkwire.com/) (iOS version): Learn bird songs the fun way
- [Tangorin](https://play.google.com/store/apps/details?id=com.tangorin.app) (Android) Japanese Dictionary at [tangorin.com](http://tangorin.com/)

## Known issues

- Deleting a database is not (yet) implemented for WP(8).
- db.executeSql() calls callback multiple times
- issues with db.close() & sqlitePlugin.deleteDatabase()
- using web workers is currently not supported and known to be broken on Android

## Other limitations

Expand All @@ -61,6 +65,7 @@ Also the threading model is changed as described below.
- For iOS, iCloud backup is NOT optional and should be.
- The Android version cannot work with more than 100 open db files due to its threading model.
- Missing db creation callback
- Multi-page architecture is not (yet) supported.

## Other versions

Expand Down Expand Up @@ -194,8 +199,11 @@ window.sqlitePlugin.deleteDatabase("my.db", successcb, errorcb);
## Easy install with cordova tool

npm install -g cordova # if you don't have cordova
cordova create MyProjectFolder com.my.project MyProject && cd MyProjectFolder # if you are just starting
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin

You can find more details at [this writeup](http://iphonedevlog.wordpress.com/2014/04/07/installing-chris-brodys-sqlite-database-with-cordova-cli-android/).

## Source tree

- `SQLitePlugin.coffee.md`: platform-independent (Literate coffee-script, can be read by recent coffee-script compiler)
Expand Down Expand Up @@ -383,26 +391,23 @@ or in Android:

./bin/test.sh android

Lawnchair Adapter Usage
=======================
# Adapters

Common adapter
--------------
## Lawnchair Adapter

Please look at the `Lawnchair-adapter` tree that contains a common adapter, which should also work with the Android version, along with a test-www directory.
### Common adapter

Please look at the `Lawnchair-adapter` tree that contains a common adapter, which should also work with the Android version, along with a test-www directory.

Included files
--------------
### Included files

Include the following js files in your html:

- lawnchair.js (you provide)
- SQLitePlugin.js
- Lawnchair-sqlitePlugin.js (must come after SQLitePlugin.js)

Sample
------
### Sample

The `name` option will determine the sqlite filename. Optionally, you can change it using the `db` option.

Expand All @@ -426,6 +431,9 @@ It also supports bgType argument:
users = new Lawnchair {name: "users", bgType: 1, ...}
```

### PouchDB

The adapter is now part of [PouchDB](http://pouchdb.com/) thanks to [@nolanlawson](https://github.com/nolanlawson), see [PouchDB FAQ](http://pouchdb.com/faq.html).

# Contributing

Expand All @@ -441,3 +449,10 @@ users = new Lawnchair {name: "users", bgType: 1, ...}
- Always use `git mv` to move files & directories;
- Never mix a move/rename operation and any other changes in the same commit.

## Major branches

- `common-src` - source for Android & iOS versions
- `master-src` - source for Android, iOS, & WP(8) versions
- `master-rc` - pre-release version, including source for CSharp-SQLite library classes
- `master` - version for release, will be included in PhoneGap build.

Binary file removed src/wp/cs-sqlite-dll/SQLiteWPNative.dll
Binary file not shown.

0 comments on commit 5fc45b4

Please sign in to comment.