import { Alias } from "./Alias"; import { BaseNode, Keyword } from "./Base"; import { Expr, Identifier, ListExpr, Variable } from "./Expr"; import { Node } from "./Node"; export type AllOtherClauses = ReturningClause | IntoVariablesClause | AsClause | CommaClause | ClusterByClause | WhereCurrentOfClause; export interface ReturningClause extends BaseNode { type: "returning_clause"; returningKw: Keyword<"RETURNING">; columns: ListExpr>; } export interface IntoVariablesClause extends BaseNode { type: "into_variables_clause"; intoKw: Keyword<"INTO">; strictKw?: Keyword<"STRICT">; variables: ListExpr; } export interface AsClause extends BaseNode { type: "as_clause"; asKw: Keyword<"AS">; expr: T; } export interface CommaClause extends BaseNode { type: "comma_clause"; expr: T; } export interface ClusterByClause extends BaseNode { type: "cluster_by_clause"; clusterByKw: [Keyword<"CLUSTER">, Keyword<"BY">]; columns: ListExpr; } export interface WhereCurrentOfClause extends BaseNode { type: "where_current_of_clause"; whereCurrentOfKw: [Keyword<"WHERE">, Keyword<"CURRENT">, Keyword<"OF">]; cursor: Identifier; }