Permalink
Browse files

Updates for Android version to match working @chbrody test environment

  • Loading branch information...
1 parent 90e5b5c commit 7788f7602e34ce1be297da8c08d5096ad90b2b05 @brodybits brodybits committed Apr 11, 2012
@@ -75,7 +75,7 @@
this.trans_id = get_unique_id();
this.__completed = false;
this.__submitted = false;
- this.optimization_no_nested_callbacks = true;//if set to true large batches of queries within a transaction will be much faster but you lose the ability to do muiti level nesting of executeSQL callbacks
+ this.optimization_no_nested_callbacks = true;//if set to true large batches of queries within a transaction will be much faster but you _MAY_ lose the ability to do deep multi level nesting of executeSQL callbacks
console.log("root.SQLitePluginTransaction - this.trans_id:"+this.trans_id);
transaction_queue[this.trans_id] = [];
transaction_callback_queue[this.trans_id] = new Object();
@@ -256,4 +256,4 @@
return new SQLitePlugin(dbPath, creationCallback, errorCallback);
}
};
-}).call(this);
+}).call(this);
@@ -5,7 +5,7 @@
* Copyright (c) 2005-2010, Nitobi Software Inc.
* Copyright (c) 2010, IBM Corporation
*/
-package com.phonegap.plugins.sqlitePlugin;
+package com.phonegap.plugin.sqlitePlugin;
import org.json.JSONArray;
import org.json.JSONException;
@@ -228,6 +228,7 @@ public void processResults(Cursor cur, String query_id, String tx_id) {
try {
for (int i = 0; i < colCount; ++i) {
key = cur.getColumnName(i);
+ // for old Android SDK remove lines from HERE:
if(android.os.Build.VERSION.SDK_INT >= 11)
{
switch(cur.getType (i))
@@ -249,7 +250,7 @@ public void processResults(Cursor cur, String query_id, String tx_id) {
break;
}
}
- else
+ else // to HERE.
{
row.put(key, cur.getString(i));
}
@@ -271,7 +271,7 @@ test('batch insertion', function(){
})
test( 'full callback syntax', function() {
- QUnit.stop(500);
+ QUnit.stop(1500); // timing changed by batch processing improvements
QUnit.expect(2);
store.batch([{j:'k'}], function() {
@@ -282,7 +282,7 @@ test( 'full callback syntax', function() {
})
test( 'shorthand callback syntax', function() {
- QUnit.stop(500);
+ QUnit.stop(1500); // timing changed by batch processing improvements
QUnit.expect(2);
store.batch([{o:'k'}], 'ok(true, "shorthand syntax callback gets evaled"); same(this, store, "`this` should be scoped to the Lawnchair instance"); QUnit.start();')
@@ -327,7 +327,7 @@ test('get functionality', function() {
test('get batch functionality', function() {
QUnit.expect(3);
- QUnit.stop(500);
+ QUnit.stop(1500); // timing changed by batch processing improvements
var t = [{key:'test-get'},{key:'test-get-1'}]
store.batch(t, function() {

0 comments on commit 7788f76

Please sign in to comment.