File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ fn test_print_results() {
61
61
insert account into Account
62
62
}!
63
63
64
+ i := sql db {
65
+ insert account into Account
66
+ }!
67
+
68
+ println (i)
69
+
64
70
count := sql db {
65
71
select count from Account
66
72
}!
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 {
190
190
}
191
191
c.expr (mut node.db_expr)
192
192
if node.is_insert {
193
- node.typ = ast.int_type
193
+ node.typ = ast.int_type. set_flag (.result)
194
194
}
195
195
last_cur_or_expr := c.cur_or_expr
196
196
c.cur_or_expr = & node.or_expr
197
197
c.check_orm_or_expr (mut node)
198
198
c.cur_or_expr = last_cur_or_expr
199
199
200
- if node.is_insert {
201
- return ast.int_type
202
- }
203
-
204
200
return node.typ.clear_flag (.result)
205
201
}
206
202
You can’t perform that action at this time.
0 commit comments