You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importdb.sqlitestructTeste {
pubmut:
id int
name string
rank f32
}
mutconn:= sqlite.connect(':memory:')!
sql conn {
create table Teste
}!res:= sql conn {
select from Teste where name=='a'&& ( id==28|| (rank >3.33&& rank <3.33))
}!dump(res)
================ V panic ================
module: main
function: main()
message: near ";": syntax error (1) (SELECT `id`, `name`, `rank` FROM `Teste` WHERE `name` = ?1 AND (`id` = ?2 OR (`rank` > ?3 AND `rank` < ?4);)
file: code.v:18
v hash: 87f92b1
=========================================
/home/admin/v/vlib/builtin/builtin.c.v:87: at panic_debug: Backtrace
/box/code.v:128: by main__main
/tmp/v_60000/code.01JR08Z73YA25ARYYZGX8APFH6.tmp.c:19304: by main
Exited with error status 1
There should be a closing parenthesis:
SELECT id, name, rank FROM Teste WHERE name = ?1 AND (id = ?2 OR (rank > ?3 AND rank < ?4);
|V full version |V 0.4.10 87f92b1f66df2f9f88ee10c8f8c11cdb04eb1ba8.87f92b1
|:-------------------|:-------------------
|OS |linux, Debian GNU/Linux 12 (bookworm) (VM)
|Processor |2 cpus, 64bit, little endian, Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
|Memory |0.64GB/2.02GB
| |
|V executable |/home/admin/v/v
|V last modified time|2025-04-04 11:25:28
| |
|V home dir |OK, value: /home/admin/v
|VMODULES |OK, value: .vmodules
|VTMP |OK, value: /tmp/v_0
|Current working dir |OK, value: /home/admin/playground
| |
|Git version |git version 2.39.5
|V git status |Error: fatal: detected dubious ownership in repository at '/home/admin/v'
To add an exception for this directory, call:
git config --global --add safe.directory /home/admin/v
|.git/config present |true
| |
|cc version |cc (Debian 12.2.0-14) 12.2.0
|gcc version |gcc (Debian 12.2.0-14) 12.2.0
|clang version |Debian clang version 14.0.6
|tcc version |tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux)
|tcc git status |Error: fatal: detected dubious ownership in repository at '/home/admin/v/thirdparty/tcc'
To add an exception for this directory, call:
git config --global --add safe.directory /home/admin/v/thirdparty/tcc
Error: fatal: detected dubious ownership in repository at '/home/admin/v/thirdparty/tcc'
To add an exception for this directory, call:
git config --global --add safe.directory /home/admin/v/thirdparty/tcc
|emcc version |N/A
|glibc version |ldd (Debian GLIBC 2.36-9+deb12u8) 2.36
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
Describe the bug
Code: https://play.vlang.io/p/7189093887
Reproduction Steps
https://play.vlang.io/p/7189093887
Expected Behavior
build success.
Current Behavior
Output:
There should be a closing parenthesis:
SELECT
id,name,rankFROMTesteWHEREname= ?1 AND (id= ?2 OR (rank> ?3 ANDrank< ?4);Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.10 87f92b1.87f92b1
Environment details (OS name and version, etc.)
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.