Skip to content
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

Add build tag sqlite_math_functions #1037

Closed
wants to merge 1 commit into from
Closed

Conversation

nkt-dk
Copy link
Contributor

@nkt-dk nkt-dk commented Apr 29, 2022

Add build tag sqlite_math_functions to enable built-in scalar math functions using compiler flag SQLITE_ENABLE_MATH_FUNCTIONS. For reference: https://www.sqlite.org/lang_mathfunc.html.

I also updated the readme file, please let me know if you have any comments

@lggruspe
Copy link
Contributor

lggruspe commented May 4, 2022

I think this extension requires linking to math.h:

#cgo LDFLAGS: -lm

@nkt-dk nkt-dk force-pushed the master branch 2 times, most recently from 7931c92 to 34d565d Compare May 5, 2022 07:42
@nkt-dk
Copy link
Contributor Author

nkt-dk commented May 6, 2022

Thank you for the feedback, I think you are correct. I updated the PR and added the linker flag

@rittneje
Copy link
Collaborator

rittneje commented May 8, 2022

Please also update the GitHub merge gate to include this new tag in the "Tags: full" step.

- name: 'Tags: full'
run: go-acc . -- -race -v -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify sqlite_column_metadata"

It would also be helpful to include a unit test (with the same build tag) to verify that the SQLite math functions are compiled in. I don't think it's necessary to cover all of them, just pick one to ensure the build options are being set properly. https://www.sqlite.org/lang_mathfunc.html

@bearbin
Copy link

bearbin commented Jul 12, 2022

@nkt-dk Just giving you a ping on this, would be good to get the build flag in sometime :)

@nkt-dk
Copy link
Contributor Author

nkt-dk commented Jul 16, 2022

Hi @bearbin,
I did not have much time lately but @lggruspe continued this fix and create a new PR here: #1059 Thus I think my PR can be closed and we continue in 1059?

@rittneje
Copy link
Collaborator

superseded by #1059

@rittneje rittneje closed this Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants