Skip to content

Commit

Permalink
Merge branch 'common-src' into master-src (simple solution to reprodu…
Browse files Browse the repository at this point in the history
…ce & fix #111 and updates to README.md)
  • Loading branch information
Chris Brody committed Aug 12, 2014
2 parents 5fc45b4 + f7329d3 commit 827bf72
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Also the threading model is changed as described below.
## Some apps using Cordova/PhoneGap SQLitePlugin

- [Get It Done app](http://getitdoneapp.com/) by [marcucio.com](http://marcucio.com/)
- [KAAHE Health Encyclopedia](http://www.kaahe.org/en/index.php?option=com_content&view=article&id=817): Official health app of the Kingdom of Saudi Arabia.
- [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/)

Expand Down
2 changes: 1 addition & 1 deletion SQLitePlugin.coffee.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ License for common Javascript: MIT or Apache
tx.executeSql(statement, params, mysuccess, myerror)
return
@addTransaction new SQLitePluginTransaction(this, myfn, myerror, mysuccess, false, false)
@addTransaction new SQLitePluginTransaction(this, myfn, null, null, false, false)
return
### SQLitePluginTransaction object for batching:
Expand Down
37 changes: 37 additions & 0 deletions test-www/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,43 @@
});
}); **/

test(suiteName + "DB String result test", function() {
if (isWebSql) {
ok('skipped');
return;
}

var db = openDatabase("DB-String-test.db", "1.0", "Demo", DEFAULT_SIZE);

var expected = [ 'FIRST', 'SECOND' ];
var i=0;

ok(!!db, "db object");

stop(2);

var okcb = function(res) {
if (i > 1) {
ok(false, "unexpected result: " + JSON.stringify(res));
console.log("discarding unexpected result: " + JSON.stringify(res))
return;
}

ok(!!res, "valid object");

// do not count res if undefined:
if (!!res) { // will freeze the test if res is undefined:
console.log("res.rows.item(0).uppertext: " + res.rows.item(0).uppertext);
equal(res.rows.item(0).uppertext, expected[i], "Check result " + i);
i++;
start(1);
}
};

db.executeSql("select upper('first') as uppertext", [], okcb);
db.executeSql("select upper('second') as uppertext", [], okcb);
});

test(suiteName + "db transaction test", function() {

if (isWebSql) {
Expand Down
2 changes: 1 addition & 1 deletion www/SQLitePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
myfn = function(tx) {
tx.executeSql(statement, params, mysuccess, myerror);
};
this.addTransaction(new SQLitePluginTransaction(this, myfn, myerror, mysuccess, false, false));
this.addTransaction(new SQLitePluginTransaction(this, myfn, null, null, false, false));
};


Expand Down

0 comments on commit 827bf72

Please sign in to comment.