cordova-sqlite-evmax-build-free 0.0.12 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +11 -0
- package/SQLitePlugin.coffee.md +6 -0
- package/package.json +1 -1
- package/plugin.xml +1 -1
- package/src/android/io/sqlc/SQLitePlugin.java +7 -5
- package/www/SQLitePlugin.js +4 -0
package/CHANGES.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
# cordova-sqlite-evmax-build-free 0.1.0
|
|
4
|
+
|
|
5
|
+
## cordova-sqlite-evmax-feat-android-db-location 0.0.3-dev
|
|
6
|
+
|
|
7
|
+
## cordova-sqlite-evmax-common-free 0.0.8-dev
|
|
8
|
+
|
|
9
|
+
- more robust handling of large results on Android - replace PluginResult.setKeepCallback() usage to avoid potential stability issue described in:
|
|
10
|
+
- https://github.com/storesafe/cordova-plugin-sqlite-evplus-ext-common-free/issues/14
|
|
11
|
+
|
|
12
|
+
NOTE: While this may introduce a little more overhead, this overhead is expected to be very minor relative to the cost of handling large results between the C, Java, and JavaScript code.
|
|
13
|
+
|
|
3
14
|
# cordova-sqlite-evmax-build-free 0.0.12
|
|
4
15
|
|
|
5
16
|
- update SQLite -> 3.51.2
|
package/SQLitePlugin.coffee.md
CHANGED
|
@@ -721,10 +721,16 @@
|
|
|
721
721
|
cb1 = (result) ->
|
|
722
722
|
if result[0] is 'multi'
|
|
723
723
|
ch1 = true
|
|
724
|
+
# trigger next callback from Java side
|
|
725
|
+
# (using "fjnext:..." rather than "fj:..." for the sake of clarity)
|
|
726
|
+
cordova.exec cb1, null, "SQLitePlugin", "fjnext:0;extra", [mydbid, 0]
|
|
724
727
|
else if result[0] isnt null
|
|
725
728
|
resultSet = resultSet.concat result.slice(0, result.length-1)
|
|
726
729
|
if !ch1
|
|
727
730
|
cb1 [null]
|
|
731
|
+
if ch1
|
|
732
|
+
# trigger next callback from Java side (see comment above regarding "fjnext:")
|
|
733
|
+
cordova.exec cb1, null, "SQLitePlugin", "fjnext:0;extra", [mydbid, 0]
|
|
728
734
|
else # if result[0] is null
|
|
729
735
|
if (index + 1 == batchExecutesLength)
|
|
730
736
|
cb resultSet
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cordova-sqlite-evmax-build-free",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Cordova/PhoneGap sqlite storage - free evmax enterprise version with premium stability and performance improvements including workaround for super-large INSERT transactions & SELECT results on Android (version with external sqlite3 dependencies)",
|
|
5
5
|
"cordova": {
|
|
6
6
|
"id": "cordova-sqlite-evmax-build-free",
|
package/plugin.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
|
|
3
3
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
4
4
|
id="cordova-sqlite-evmax-build-free"
|
|
5
|
-
version="0.0
|
|
5
|
+
version="0.1.0">
|
|
6
6
|
|
|
7
7
|
<name>Cordova sqlite storage - free evmax common version branch with premium stability performance improvements including workaround for super-large INSERT transactions and SELECT results on Android (with external sqlite3 dependencies)</name>
|
|
8
8
|
|
|
@@ -61,7 +61,7 @@ public class SQLitePlugin extends CordovaPlugin {
|
|
|
61
61
|
|
|
62
62
|
@Override
|
|
63
63
|
public boolean execute(String actionAsString, String argsAsString, CallbackContext cbc) {
|
|
64
|
-
if (actionAsString.startsWith("fj")) {
|
|
64
|
+
if (actionAsString.startsWith("fj")) { // matches both fj: & fjnext: actions
|
|
65
65
|
int sep1pos = actionAsString.indexOf(':');
|
|
66
66
|
int sep2pos = actionAsString.indexOf(';');
|
|
67
67
|
|
|
@@ -514,10 +514,11 @@ public class SQLitePlugin extends CordovaPlugin {
|
|
|
514
514
|
final String jr1 = EVNDKDriver.sqlc_evplus_qc_execute(qc, dbq.fj);
|
|
515
515
|
final boolean multi = jr1.charAt(2) == 'm';
|
|
516
516
|
final PluginResult pr1 = new MyPluginResult(jr1);
|
|
517
|
+
dbq.cbc.sendPluginResult(pr1);
|
|
517
518
|
if (multi) {
|
|
518
|
-
|
|
519
|
+
// wait for fjnext: action from JavaScript
|
|
520
|
+
dbq = q.take();
|
|
519
521
|
}
|
|
520
|
-
dbq.cbc.sendPluginResult(pr1);
|
|
521
522
|
|
|
522
523
|
boolean more = multi;
|
|
523
524
|
|
|
@@ -525,10 +526,11 @@ public class SQLitePlugin extends CordovaPlugin {
|
|
|
525
526
|
final String jr2 = EVNDKDriver.sqlc_evplus_qc_execute(qc, "");
|
|
526
527
|
more = jr2.charAt(1) != 'n';
|
|
527
528
|
final PluginResult pr2 = new MyPluginResult(jr2);
|
|
529
|
+
dbq.cbc.sendPluginResult(pr2);
|
|
528
530
|
if (more) {
|
|
529
|
-
|
|
531
|
+
// wait for fjnext: action from JavaScript
|
|
532
|
+
dbq = q.take();
|
|
530
533
|
}
|
|
531
|
-
dbq.cbc.sendPluginResult(pr2);
|
|
532
534
|
}
|
|
533
535
|
|
|
534
536
|
// cleanup:
|
package/www/SQLitePlugin.js
CHANGED
|
@@ -631,11 +631,15 @@ Contact for commercial license: sales@litehelpers.net
|
|
|
631
631
|
cb1 = function(result) {
|
|
632
632
|
if (result[0] === 'multi') {
|
|
633
633
|
ch1 = true;
|
|
634
|
+
cordova.exec(cb1, null, "SQLitePlugin", "fjnext:0;extra", [mydbid, 0]);
|
|
634
635
|
} else if (result[0] !== null) {
|
|
635
636
|
resultSet = resultSet.concat(result.slice(0, result.length - 1));
|
|
636
637
|
if (!ch1) {
|
|
637
638
|
cb1([null]);
|
|
638
639
|
}
|
|
640
|
+
if (ch1) {
|
|
641
|
+
cordova.exec(cb1, null, "SQLitePlugin", "fjnext:0;extra", [mydbid, 0]);
|
|
642
|
+
}
|
|
639
643
|
} else {
|
|
640
644
|
if (index + 1 === batchExecutesLength) {
|
|
641
645
|
cb(resultSet);
|