Closed rahul-idev closed 9 months ago
Could you please elaborate why we should set this parameter to 3? It's discouraged by the SQLite developers: https://www.sqlite.org/compile.html
Hi, Please refer to this line : https://www.sqlite.org/compile.html#dqs
The recommended setting is 0, meaning that double-quoted strings are disallowed in all contexts. However, the default setting is 3 for maximum compatibility with legacy applications.
The default value is 3 which is applied if don't use this flag , this is the same case with parent repository(https://github.com/xerial/sqlite-jdbc/blob/master/Makefile)
Sqlite developers are recommending to use 0 , but 3 would be best case as it can help all applications.
Our code was failing when we switched from original repo to sqlite-jdbc-crypt because double quotes flag is 0 and not default 3.
This can happen with many people.
Also changing this value will not have any significant difference on performance
So, requesting you to approve this PR for having maximum compatibility to users.
Thanks.
I can only just speak for me. I understand that for you it'd be easier if SQLite was compiled with maximum compatibility. But it comes with a drawback: Incorrect behavior can happen when you are outside the SQL standard. It may work but it can also break. Even if it doesn't break you could no longer simply switch to a different database system because of the bad behaviour.
When I use dependencies in my project, I want them to offer maximum security and flawlessness. You still have to debug dependencies and fix bugs far too often, but that is precisely why the delivery state should not cause any more problems.
But thats only MHO.
Well, I think the project will keep the recommended value of 0 for SQLITE_DQS. When I started this project, I updated all tests to use single quoted string where double quotes were used, to better follow SQL specs, and be able to disable double quotes strings.
@rahul-idev If you really want double-quoted strings to be supported, you can recompile the native library with that options enabled. It is not that difficult but take a little bit of time.
https://github.com/Willena/sqlite-jdbc-crypt/blob/fbb86885636f6db348de36244977162d5e752ddb/Makefile#L114
Could you please change DSQLITE_DQS flag to 3 which enables us to use double quotes in SQL Queries