sqlite icon indicating copy to clipboard operation
sqlite copied to clipboard

Executing PRAGMA Query throws false error

Open phal0r opened this issue 3 years ago • 3 comments

Describe the bug As described in #258 in comment https://github.com/capacitor-community/sqlite/issues/258#issuecomment-1102292817 executing PRAGMA queries throws an error, which is actually not an error. This breaks code, that tries to change WAL mode for example.

To Reproduce Running the query as described in https://github.com/capacitor-community/sqlite/issues/258#issuecomment-1102292817

[https://user-images.githubusercontent.com/1294854/164032725-ba05516a-e7d5-40dc-9cfc-2bd20db78dac.png]

Expected behavior Executing a PRAGMA query should respond with success and not throw an error

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

iOS and Android

Smartphone (please complete the following information):

not related to a specific device

Additional context Add any other context about the problem here.

phal0r avatar Sep 10 '22 13:09 phal0r

@phal0r if you update to @capacitor-community/[email protected] and upgrade in the electron folder of your app sqlite3 to 5.1.0 it works fine with WAL2. You can have a look at test with Wal2 & readonly Hope this help

jepiqueau avatar Sep 14 '22 13:09 jepiqueau

@jepiqueau Thanks for the hint, but this bug is about executing the PRAGMA query, not the result of WAL2 or WAL. Let me clarify this bug next week with a more specific description.

phal0r avatar Sep 15 '22 07:09 phal0r

@phal0r so i do not understand

jepiqueau avatar Sep 15 '22 08:09 jepiqueau

@phal0r as you did not come back i assume this is solve on your side when you want to execute a PRAGMA command you must use transaction to false. I close the issue feel free to re-open it if required

jepiqueau avatar Oct 17 '22 06:10 jepiqueau