File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ fn test_print_results() {
6161 insert account into Account
6262 }!
6363
64+ i := sql db {
65+ insert account into Account
66+ }!
67+
68+ println (i)
69+
6470 count := sql db {
6571 select count from Account
6672 }!
Original file line number Diff line number Diff line change @@ -190,17 +190,13 @@ fn (mut c Checker) sql_expr(mut node ast.SqlExpr) ast.Type {
190190 }
191191 c.expr (mut node.db_expr)
192192 if node.is_insert {
193- node.typ = ast.int_type
193+ node.typ = ast.int_type. set_flag (.result)
194194 }
195195 last_cur_or_expr := c.cur_or_expr
196196 c.cur_or_expr = & node.or_expr
197197 c.check_orm_or_expr (mut node)
198198 c.cur_or_expr = last_cur_or_expr
199199
200- if node.is_insert {
201- return ast.int_type
202- }
203-
204200 return node.typ.clear_flag (.result)
205201}
206202
You can’t perform that action at this time.
0 commit comments