-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement THEN RETURN clause in DML statements (#214)
* Implement THEN RETURN * Update testdata * Fix Update.SQL() * Fix Update.SQL() * Fix needless sqlOpt
- Loading branch information
Showing
37 changed files
with
638 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
delete foo where foo = 1 and bar = 2 then return * |
3 changes: 3 additions & 0 deletions
3
testdata/input/dml/insert_or_update_then_return_with_action_as.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
INSERT OR UPDATE INTO foo | ||
(foo, bar) VALUES (1, 2) | ||
THEN RETURN WITH ACTION AS act * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
update foo set foo = bar, bar = foo, baz = DEFAULT where foo = 1 then return with action * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ delete from foo where foo = 1 and bar = 2 | |
}, | ||
}, | ||
}, | ||
ThenReturn: (*ast.ThenReturn)(nil), | ||
} | ||
|
||
--- SQL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ delete foo where foo = 1 and bar = 2 | |
}, | ||
}, | ||
}, | ||
ThenReturn: (*ast.ThenReturn)(nil), | ||
} | ||
|
||
--- SQL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ delete foo as F where F.foo = 1 | |
}, | ||
}, | ||
}, | ||
ThenReturn: (*ast.ThenReturn)(nil), | ||
} | ||
|
||
--- SQL | ||
|
Oops, something went wrong.