storesafe/cordova-sqlite-storage

Upcoming minor release items

brodybits opened this issue · 11 comments

Minor release

Mandatory

ADDITIONAL (GENERAL):

Documentation

ADDITIONAL:

  • Note that standard transaction mechanism is no longer recommended and to be deprecated ref: #690 DONE
  • Document "multiple sqlite problem risk" ref: #626 DONE
  • TBD Document safest settings to use for database on Android ref: #671

Feature(s)

UPDATE: Moved to major release ref: #687 due to time/schedule constraint:

  • Function to get database directory path ref: #680 (may be affected by #681: Database storage in arbitrary path Android/iOS/macOS/Windows)

Highly desired

Documentation

Testing

  • Extremely large/small values ref: #627

ADDITIONAL:

  • Test with advanced features such as JOIN & VIEW ref: #658

Fixes & features

UPDATE: these updates are expected to come in the major release ref: #687

  • CREATE database if it does not exist should be optional ref: #212
  • Database storage in arbitrary path (Android/iOS/macOS/Windows) ref: #681
  • Deprecate other iOS database locations ref: #682

ADDITIONAL, HIGHLY DESIRED before major release now expected to come in the major release ref: #687

  • Use UTF-8 encoding for Windows ref: #652

  • TBD better cleanup of "new transaction is waiting for open operation" log messages ref: #679

  • SQLite3 compile options such as HAVE_USLEEP & NDEBUG for closer match to sqlcipher version

  • Integrate fix contributed in #709 to handle NULL ( u0000) characters on Windows platform

  • Should refuse to open new database files after onDestroy on Android has been called, equivalent on iOS ref: PR #697

  • Update needed to work with cordova-android@7 ref: #729

  • builtin android.database end transaction if active before closing (8192bc8) ref:#730 DONE

  • Bind all numbers as REAL numbers ref: #684 possibly before major release

  • TBD (possibly related to #684): builtin android.database implementation seems to treat numeric parameter argument values as string values, needs investigation ref: #730 (comment)

  • TBD for investigation: PRAGMA journal_mode should be same value on builtin android.database implementation, default Android-sqlite-connector implementation, and other platforms ref: #730 (comment) WILL NOT BE CHANGED: PRAGMA journal_mode reports delete in case of default android.database implementation (same as other platform implementations) on Android 8.1

  • Fix broken Circle/Travis CI or remove

  • JavaScript remove qid no longer needed & other cleanup

  • Fix for builtin android.database implementation on Turkish and other foreign locales in PR #713

  • PR #657: Add plugin typings from DefinitelyTyped

  • address iOS/macOS resource leak when deleting database without closing first

  • Use extra durable build option as described in #736 (comment)

  • review any other possible causes of database corruption ref: #736 TBD

  • iOS/macOS platform version openDatabase checks from https://github.com/brodybits/cordova-sqlite-evmax-legacy-exp-free

  • Resolve issue with PSPDFKit ref: storesafe/cordova-sqlcipher-adapter#59

  • Windows implementation should include an error object when signaling a close error

  • Resolve INCORRECT error code / INCONSISTENT error messages on Windows

  • TBD include actual error code, perhaps in error message (already done on builtin android.database implementation in case of androidDatabaseImplementation: 2 on Android)

  • Include info about prepare statement error vs execute statement error, as done on Windows

  • testing with PRAGMA foreign_keys ref: storesafe/cordova-sqlite-evcore-extbuild-free#23

  • test/document issue with Unicode column name ref: #641.

  • improve testing & documentation related to Unicode characters on Android ref: #739

  • document existence of spatialite fork

  • pointer to https://github.com/Crypho/cordova-plugin-secure-storage

ADDITIONAL DOCUMENTATION:

MAJOR DOCUMENTATION CLEANUP NEEDED here or in NEXT MAJOR RELEASE (#687) ref: storesafe/cordova-sqlite-storage-help#33 & #596 (comment)

Timeline

4-6 weeks due to existing backlog

@brodybits there is any update on the timeline for this release? I'm interested particularly in the fix for the issue #563

Thanks

My apologies for the delay that was due to workload. I will probably need another 1-2 months and may combine with major release in #687.

@jabawack81 workaround for #563 is to fix it yourself in a fork or with help from npmjs.com / patch-package.

@brodybits I would love to if I knew what to fix.

@jabawack81 the /SAFESEH build flag for Win32 is now integrated with this plugin version as well as cordova-sqlite-ext. Please report if it helps or not.

cordova-sqlite-storage 2.1.0 & 2.1.1 released with some changes discussed here:

  • Workaround solutions for iOS/macOS data loss risk issues:
    • compile with SQLITE_THREADSAFE=2 again ref: #703
    • workaround solution for iOS threading issue reported in #716
  • Add /SAFESH as described in:
  • Document "multiple sqlite problem risk" ref: #626
  • Possible extra cleanup of "new transaction is waiting for open operation" log messages

along with a couple additional changes from pull requests:

  • Suppress warnings for sqlite3.c & PSPDFThreadSafeMutableDictionary.m on iOS/macOS ref: #569
  • style(package): add macOS Platform to package.json #695

I Brody I got the same error.

My test procedure:

  • I've deleted the plugin, platform and node_modules folder from my cordova project
  • updated cordova-sqlite-storage to 2.1.2
  • run cordova prepare from the powershell
  • from visualstudio 2017 project->store->create app packages...

and got this error:

------ Building platform: windows
------ Build configuration options:  --release -- --win --archs "x86 arm"
No scripts found for hook "before_compile".
PlatformApi successfully found for platform windows
Reading build config file: C:[PROJECTFOLDER]\build.json
Running command: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe" -version -nologo
Command finished with error code 0: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe -version,-nologo
Using MSBuild v15.1 from C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Building project: C:[PROJECTFOLDER]\platforms\windows\CordovaApp.Windows10.jsproj
  Configuration : release
  Platform      : x86
Running command: C:\WINDOWS\system32\reg.exe query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows" /s /v InstallationFolder /reg:32
Command finished with error code 0: C:\WINDOWS\system32\reg.exe query,HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows,/s,/v,InstallationFolder,/reg:32
Running command: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe" C:[PROJECTFOLDER]\platforms\windows\CordovaApp.Windows10.jsproj /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=release /p:Platform=x86 /p:AppxBundle=Never /p:UapAppxPackageBuildMode=StoreUpload
  Patching 10 in prebuild event...
  Injected base.js reference to the /www/index.html
  Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
  Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4148,5): error MSB3030: Could not copy the file "C:[PROJECTFOLDER]\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\SQLite3.winmd" because it was not found. [C:[PROJECTFOLDER]\platforms\windows\CordovaApp.Windows10.jsproj]
Command finished with error code 1: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe C:[PROJECTFOLDER]\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=release,/p:Platform=x86,/p:AppxBundle=Never,/p:UapAppxPackageBuildMode=StoreUpload
1>MSBUILD : cordova-build error : Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe: Command failed with exit code 1
1>Done building project "project.jsproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Package: 0 succeeded, 2 failed ===========

@jabawack81 I just updated https://github.com/brodybits/cordova-sqlite-storage-starter-app and was able to create a Windows app package from project -> store -> create app packages (with a test certificate, I did not create the app package for the app store but this part should not matter). In general cordova prepare is not necessary if you do cordova platform add windows with the plugins already configured in config.xml. In case of any further issues:

Hi guys, any news about next release? I get bug on Windows 10 #709
How can I help with next release that will include this fix?

Is there any plan or possibility that spatialite will be integrated or can be used with any of supported plugin versions?

Spatialite is already discussed in storesafe/cordova-sqlite-storage-help#32.

At this point I am giving top priority to a newly redesigned plugin version which is in progress at this time, discussed in brodybits/ask-me-anything#3.

Priority for other items is given to paid customers. Please feel free to reach out to chris.brody+brodybits@gmail.com or sales@xpbrew.com in case of interest.