mobilexag / cordova-sqlite-evplus-ext-free

Other
0 stars 2 forks source link

Inconsistent error info in case of constraint violation on Windows #25

Closed brodycj closed 1 year ago

brodycj commented 5 years ago

For some reason the Windows UWP SQLite3 implementation would not report the correct error code in case of constraint violation. This issue is not resolved by PR #18.

This will need some deeper investigation, and I would like to break this case out of issue #22.

I would like to fix this when I merge some more updates from cordova-sqlite-storage, as part of the long-term warranty and support plan (#24).

P.S. Here is the error message that is reported in case of constraint violation on Windows:

SQLite3 step error result - with code: 1 message: SQL logic error
brodycj commented 4 years ago

The plugin seems to report both incorrect error code and incorrect error message in case of constraint violation on Windows. I hope to get this fixed in the near future.

P.S. I discovered that there are even more error mapping tests with the incorrect error code & incorrect error message. I may need some more time to investigate and find a solution.

P.S. 2: I think the one other case that I found with the inconsistent error information is with the following CREATE statement:

CREATE VIRTUAL TABLE test_table USING bogus_module (data)
brodycj commented 4 years ago

UPDATED: I spent over half a day last week on testing and debugging the plugin on Windows in case of the constraint error, concluded that the both the C++ and JavaScript code are handling this error case correctly. I would now suspect that there is some kind of issue with the way that SQLite (sqlite3.c) is either built or invoked from its API on Windows. (One difference is that the UTF-16 API calls are used on Windows.)

I may need multiple days to experiment and debug with SQLite on Windows to get to the bottom of this issue and identify a possible solution or workaround.

Considering that the Windows platform is not considered future-proof and may be deprecated at any point of time (see #31), and that it should be possible to develop and debug the same kind of application logic on the other supported platforms, I would like to keep this issue at a low priority. Should not block a release or any other work.

brodycj commented 1 year ago

Windows support is no longer needed as discussed by email