diff --git a/README.md b/README.md index 005aa90e3..14889f47f 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,7 @@ See the [Sample section](#sample) for a sample with a more detailed explanation. - iOS versions supported: 8.x / 9.x / 10.x / 11.x (see [deviations section](#deviations) below for differences in case of WKWebView) - FTS3, FTS4, and R-Tree are fully tested and supported for all target platforms in this version branch. - Default `PRAGMA journal_mode` setting (*tested*): - - Android pre-8.0 with builtin android.database implementation (as selected using the `androidDatabaseImplementation` option in `window.sqlitePlugin.openDatabase`): `persist` + - Android with builtin android.database implementation (as selected using the `androidDatabaseImplementation` option in `window.sqlitePlugin.openDatabase`): `persist` (pre-8.x) / `truncate` (Android 8+) - otherwise: `delete` - AUTO-VACUUM is not enabled by default. If no form of `VACUUM` or `PRAGMA auto_vacuum` is used then sqlite will automatically reuse deleted data space for new data but the database file will never shrink. For reference: and [litehelpers/Cordova-sqlite-storage#646](https://github.com/litehelpers/Cordova-sqlite-storage/issues/646) - In case of memory issues please use smaller transactions or use the plugin version at [litehelpers / Cordova-sqlite-evcore-extbuild-free](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free) (GPL or commercial license terms). diff --git a/spec/www/spec/sqlite-version-test.js b/spec/www/spec/sqlite-version-test.js index 67fe959b0..e7e04dd2e 100755 --- a/spec/www/spec/sqlite-version-test.js +++ b/spec/www/spec/sqlite-version-test.js @@ -127,9 +127,12 @@ var mytests = function() { expect(rs).toBeDefined(); expect(rs.rows).toBeDefined(); expect(rs.rows.length).toBe(1); - // TBD different for builtin android.database implementation: - if (!isWindows && isAndroid && isImpl2) // TBD ... - expect(rs.rows.item(0).journal_mode).toBe('persist'); + // DEFAULT PRAGMA journal_mode setting is + // DIFFERENT for builtin android.database implementation: + if (!isWindows && isAndroid && isImpl2) + expect(rs.rows.item(0).journal_mode).toBe( + (/Android [2-7]/.test(navigator.userAgent)) ? + 'persist' : 'truncate'); else expect(rs.rows.item(0).journal_mode).toBe('delete');