-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Trying to use maths function (from SQLite v3.35) does not work #990
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
Comments
As per the SQLite docs, in order to leverage the built-in math functions, you must compile with However, currently there is no way to include that option with this library. Please add a build tag for it, as was done for You'll also want to add an entry to the table in the README. https://github.com/mattn/go-sqlite3#feature--extension-list |
I didn't understand: is it possible to use pow and sqrt or not? If not, when will it be fixed? I spent a couple of days trying to figure out why sqllite works differently in different applications! |
It is not currently possible to use the built-in math functions, because to do so requires the
You need to raise a PR with the aforementioned changes. |
Hi, I came across this issue when trying to use SQRT function in an application. I added the changes @rittneje mentioned and create a PR, I hope it is correctly implemented. At least on my local test system I can successfully use the scalar math functions afterwards |
Since this PR the underlying version of SQLite should be >=3.35 (and it is). The PR even mentions the new maths function added.
However, when I try to use math functions (like
SELECT power(2,2)
) I get this errorno such function: power
.Is there something more I need to do than use the latest version of the go-sqlite3 library?
The text was updated successfully, but these errors were encountered: