This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Inline SQL queries using boolean parameters #15515
Labels
good first issue
Good for newcomers
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Tolerable
Minor significance, cosmetic issues, low or no impact to users.
T-Task
Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Z-Help-Wanted
We know exactly how to fix this issue, and would be grateful for any contribution
Before SQLite 3.23,
TRUE
andFALSE
were not recognised as constants by SQLite, and theIS [NOT] TRUE
/IS [NOT] FALSE
operators were not supported. While Synapse supported SQLite versions older 3.23 that made it necessary to avoid usingTRUE
andFALSE
constants in SQL commands. To work around this constraint the boolean operators were passed as parameters like so:synapse/synapse/storage/databases/main/purge_events.py
Lines 251 to 258 in 57aeeb3
However, Synapse now requires a SQLite version of 3.27.0 or higher if SQLite is configured so we no longer need to do this and futhermore should convert old-style queries in the codebase to use
TRUE
/FALSE
inline as it is easier to parse/read.The text was updated successfully, but these errors were encountered: