Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
6.4.0
-
None
-
Tried with Qt stock binary (open source) packages:
- Qt 5.15.2 and Qt 6.4
- With both on macOS and Windows (MinGW)
-
-
fa4c8fa71a (qt/qtbase/dev) fa4c8fa71a (qt/tqtc-qtbase/dev)
Description
SQLite supports mathematical functions like sin() and cos(), however they need to be explicitly enabled during compile time with the -DSQLITE_ENABLE_MATH_FUNCTIONS flag:
https://www.sqlite.org/lang_mathfunc.html
However this doesn't seem to be the case for the binary Qt (open source) releases, as "empirical tests" with both Qt 5.15.2 and the latest Qt 6.4 on both Windows and macOS have suggested (in each case the Qt stock binary open source distribution was used, as aquired via the Qt Maintenance Tool).
So the suggestion here would be to compile and provide the SQLite Qt plugin in upcoming binary releases (e.g. Qt 6.5 onwards) with the math functions enabled ( -DSQLITE_ENABLE_MATH_FUNCTIONS), if at this point the omission of this compiler flag was not a concious decision (e.g. to reduce the plugin size to a minimum).
While I cannot back this up, but I believe adding those additions math functions would merely affect the plugin size, but not the execution speed of SQL executed against SQLite (especially for existing SQL statements that wouldn't make use of those math functions like sin(), cos() etc.).