Skip to content

Commit 37fb4be

Browse files
Added a test, improved the comments in cargo config file
1 parent fb5ae92 commit 37fb4be

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.cargo/config.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
[env]
22
# To use built-in math functions, this compile time flag must be set
33
# See https://www.sqlite.org/draft/lang_mathfunc.html as a reference
4-
LIBSQLITE3_FLAGS = { value = "-DSQLITE_ENABLE_MATH_FUNCTIONS", force=true }
4+
# According to Cargo docs this will not overwrite any env var that was already
5+
# set by the user, and this is a good thing. If the user already set some
6+
# LIBSQLITE3_FLAGS, he probably knows what he is doing.
7+
LIBSQLITE3_FLAGS = "-DSQLITE_ENABLE_MATH_FUNCTIONS"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
set number_three = sqrt(9.0);
2+
3+
select 'text' as component,
4+
case $number_three
5+
when '3.0' then 'It works !'
6+
else 'error: ' || coalesce($number_three, 'NULL')
7+
end AS contents;

0 commit comments

Comments
 (0)