Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[env]
# To use built-in math functions, this compile time flag must be set
# See https://www.sqlite.org/draft/lang_mathfunc.html as a reference
# According to Cargo docs this will not overwrite any env var that was already
# set by the user, and this is a good thing. If the user already set some
# LIBSQLITE3_FLAGS, he probably knows what he is doing.
LIBSQLITE3_FLAGS = "-DSQLITE_ENABLE_MATH_FUNCTIONS"
7 changes: 7 additions & 0 deletions tests/sql_test_files/it_works_sqrt.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set number_three = sqrt(9.0);

select 'text' as component,
case $number_three
when '3.0' then 'It works !'
else 'error: ' || coalesce($number_three, 'NULL')
end AS contents;
Loading