mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
parent
0957e26c88
commit
b99c3826ce
@ -61,6 +61,12 @@ fn test_print_results() {
|
||||
insert account into Account
|
||||
}!
|
||||
|
||||
i := sql db {
|
||||
insert account into Account
|
||||
}!
|
||||
|
||||
println(i)
|
||||
|
||||
count := sql db {
|
||||
select count from Account
|
||||
}!
|
||||
|
@ -190,17 +190,13 @@ fn (mut c Checker) sql_expr(mut node ast.SqlExpr) ast.Type {
|
||||
}
|
||||
c.expr(mut node.db_expr)
|
||||
if node.is_insert {
|
||||
node.typ = ast.int_type
|
||||
node.typ = ast.int_type.set_flag(.result)
|
||||
}
|
||||
last_cur_or_expr := c.cur_or_expr
|
||||
c.cur_or_expr = &node.or_expr
|
||||
c.check_orm_or_expr(mut node)
|
||||
c.cur_or_expr = last_cur_or_expr
|
||||
|
||||
if node.is_insert {
|
||||
return ast.int_type
|
||||
}
|
||||
|
||||
return node.typ.clear_flag(.result)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user