Skip to content

Commit

Permalink
Merge pull request #7593 from planetscale/select-all
Browse files Browse the repository at this point in the history
add support for SELECT ALL
  • Loading branch information
systay authored Mar 3, 2021
2 parents 436188f + a1f5bb1 commit ed545f7
Show file tree
Hide file tree
Showing 4 changed files with 2,811 additions and 2,811 deletions.
1 change: 1 addition & 0 deletions go/vt/sqlparser/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package sqlparser
// String constants to be used in ast.
const (
// Select.Distinct
AllStr = "all "
DistinctStr = "distinct "
StraightJoinHint = "straight_join "
SQLCalcFoundRowsStr = "sql_calc_found_rows "
Expand Down
6 changes: 6 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,12 @@ var (
output: "select distinct a.* from (select 1 from dual union all select 1 from dual) as a",
}, {
input: "select `weird function name`() from t",
}, {
input: "select all* from t",
output: "select * from t",
}, {
input: "select distinct* from t",
output: "select distinct * from t",
}, {
input: "select status() from t", // should not escape function names that are keywords
}, {
Expand Down
Loading

0 comments on commit ed545f7

Please sign in to comment.