1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm: support parenthesized expressions as in select from User where (name == 'Sam' && is_customer == true) || id == 1 (#15693)

This commit is contained in:
Louis Schmieder
2022-09-09 20:08:48 +02:00
committed by GitHub
parent 61a4b469a3
commit f249feb9da
5 changed files with 104 additions and 18 deletions

View File

@@ -360,6 +360,12 @@ fn test_orm() {
// has them zeroed, because the db field resolution is seconds.
assert updated_time_mod.created.format_ss() == t.format_ss()
para_select := sql db {
select from User where (name == 'Sam' && is_customer == true) || id == 1
}
assert para_select[0] == first
sql db {
drop table Module
drop table TestTime