Skip to content

Commit

Permalink
fix: add a few more A_Expr fields
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Nov 6, 2024
1 parent af71884 commit 89ed72b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 2 additions & 0 deletions scripts/typeMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ export const expressionFields = new Set([
'A_Indirection.arg',
'AlterTableCmd.def',
'BoolExpr.args',
'CollateClause.arg',
'CreatePolicyStmt.qual',
'DeleteStmt.whereClause',
'FuncCall.args',
'FuncCall.agg_filter',
'GroupingSet.content',
'IndexStmt.whereClause',
'JoinExpr.quals',
Expand Down
14 changes: 2 additions & 12 deletions src/lib/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1552,12 +1552,7 @@ export type TypeCast = {
*/
export type CollateClause = {
/** input expression */
arg:
| { A_Const: A_Const }
| { A_Expr: A_Expr }
| { CaseExpr: CaseExpr }
| { ColumnRef: ColumnRef }
| { TypeCast: TypeCast }
arg: Expr
/** possibly-qualified collation name */
collname: QualifiedName
/** token location, or -1 if unknown */
Expand Down Expand Up @@ -1595,12 +1590,7 @@ export type FuncCall = {
/** ORDER BY (list of SortBy) */
agg_order?: { SortBy: SortBy }[]
/** FILTER clause, if any */
agg_filter?:
| { A_Const: A_Const }
| { A_Expr: A_Expr }
| { ColumnRef: ColumnRef }
| { NullTest: NullTest }
| { SubLink: SubLink }
agg_filter?: Expr
/** OVER clause, if any */
over?: WindowDef
/** ORDER BY appeared in WITHIN GROUP */
Expand Down

0 comments on commit 89ed72b

Please sign in to comment.