Skip to content

Commit

Permalink
fix: set WithClause.ctes to CommonTableExpr node array
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Nov 20, 2024
1 parent 239dc7b commit 157124b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/data/typeMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const typeMappings: Record<string, string> = {
'Alias.colnames': NodeArray('String'),
'Constraint.generated_when': '"a" | "d"',
'SelectStmt.valuesLists': 'List<Expr>[]',
'WithClause.ctes': NodeArray('CommonTableExpr'),
}

function NodeArray(types: string) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2331,7 +2331,7 @@ export type RowMarkClause = {
*/
export type WithClause = {
/** list of CommonTableExprs */
ctes: any[]
ctes: { CommonTableExpr: CommonTableExpr }[]
/** true = WITH RECURSIVE */
recursive: boolean
/** token location, or -1 if unknown */
Expand Down

0 comments on commit 157124b

Please sign in to comment.