-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it worth compiling in math functions by default? #1240
Comments
So, looking into this, I am pretty sure this is as simple as removing the below lines from the //go:build sqlite_math_functions
// +build sqlite_math_functions |
Obviously, the README would need updated to either remove the "Math Functions" from the "Feature/Extension List" table too (or note that the math functions are built-in). |
This does not affect |
I would say that we could have cake and eat it too, by setting something like:
It will give all those benefits when migrating or supporting multiple db's as mentioned in the issue, while still allowing for decreasing build size in case if someone needs to have smaller binaries and doesn't use those functions. |
To use math functions like
pow()
andround()
, you currently have to dogo build -tags "sqlite_math_functions" ...
. This works, but this build tag is often forgotten/missed until an error like "not such function" is kicked out.I think it should be considered to add the math functions into builds by default (aka no build tag required). I think it is common enough to use
round()
, 'floor()
, andceil()
that adding the math functions by default would make sense.This would help adapting SQL queries from MySQL/MariaDB or Postgres where the math functionality is always present. It would also help swapping in this library versus the modernc/cznic library that has the math functionality enabled by default [1]
[1] https://gitlab.com/cznic/sqlite/-/tags/v1.14.5
The text was updated successfully, but these errors were encountered: