diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml index 40149717..6f852892 100644 --- a/.github/workflows/run-tests.yaml +++ b/.github/workflows/run-tests.yaml @@ -26,4 +26,7 @@ jobs: run: cd ./packages/utils && yarn test - name: transform - run: cd ./packages/transform && yarn test \ No newline at end of file + run: cd ./packages/transform && yarn test + + - name: traverse + run: cd ./packages/traverse && yarn test \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md deleted file mode 100644 index 3f6b89e2..00000000 --- a/AGENTS.md +++ /dev/null @@ -1,224 +0,0 @@ -## PostgreSQL Deparser for PG17: Architecture Analysis and Implementation Guide - -This document provides guidance for working in the `deparser` repository. It is intended for internal developers and agents contributing to the PostgreSQL 17 upgrade. - ---- - -### Key Technical Goals - -* Compatibility for PostgreSQL 17 -* Expand test coverage with thorough kitchen-sink tests -* Document architecture, types, and helper modules clearly - ---- - -### Architecture Overview - -#### Visitor Pattern Core (`packages/deparser/src/deparser.ts`) - -```ts -export class Deparser implements DeparserVisitor { - private formatter: SqlFormatter; - private tree: Node[]; - - visit(node: Node, context: DeparserContext = {}): string { - const nodeType = this.getNodeType(node); - const nodeData = this.getNodeData(node); - - if (this[nodeType]) return this[nodeType](node, context); - throw new Error(`Unsupported node type: ${nodeType}`); - } - - getNodeType(node: Node): string { - return Object.keys(node)[0]; - } - - getNodeData(node: Node): any { - return (node as any)[this.getNodeType(node)]; - } -} -``` - ---- - -### Key Utility Modules - -* **SqlFormatter**: Manages indentation and spacing -* **QuoteUtils**: Quotes/escapes identifiers per PostgreSQL rules -* **ListUtils**: Unwraps `List` nodes, standardizes array access -* **DeparserContext**: Maintains traversal and formatting state -* **Node Types (`@pgsql/types`)**: Canonical TypeScript types for all nodes - -**Source references for types:** - -* `packages/types/src/types.ts` -* `packages/types/src/enums.ts` - ---- - -### Context-Driven Rendering - -Use `DeparserContext` to manage behavior across complex node trees. For example, strings may require different escaping depending on context (e.g., identifier vs. expression). Avoid duplicating logic in node handlers—use `context` to guide formatting. - -```ts -export interface DeparserContext { - isStringLiteral?: boolean; - parentNodeTypes: string[]; - [key: string]: any; -} -``` - -`parentNodeTypes` keeps track of the path to the leaf nodes during tree traversal so that formatting and behavior in leaf nodes can be adjusted based on their position in the tree. - ---- - -### QuoteUtils: Identifier Handling - -```ts -export class QuoteUtils { - static quote(identifier: string): string { - if (!identifier) return ''; - if (this.needsQuoting(identifier)) return `"${identifier.replace(/"/g, '""')}"`; - return identifier; - } - - private static needsQuoting(identifier: string): boolean { - return !/^[a-z_][a-z0-9_$]*$/i.test(identifier) || RESERVED_KEYWORDS.has(identifier.toLowerCase()); - } -} -``` - ---- - -### ListUtils: List Handling - -```ts -export class ListUtils { - static unwrapList(listNode: any): any[] { - if (!listNode) return []; - if (listNode.List) return listNode.List.items || []; - if (Array.isArray(listNode)) return listNode; - return [listNode]; - } - - static processNodeList(nodes: any[], visitor: (node: any) => string): string[] { - return this.unwrapList(nodes).map(visitor); - } -} -``` - ---- - -### Testing Strategy - -* Focus on `deparser/__tests__/kitchen-sink` -* Run targeted tests with: - -```bash -cd packages/deparser -yarn test --testNamePattern="specific-test" -``` - ---- - -### AST Debugging: How to Identify and Fix Errors - -When a test fails, it shows AST diffs for diagnosis. - -Example failure: - -```diff -- "rexpr": { "FuncCall": { "args": [ "A_Const" ] } } -+ "rexpr": { "FuncCall": { "args": [ { "FuncCall": { "args": [...] } ] } } } -``` - -Fix: prevent accidental nested `FuncCall` by inspecting and unwrapping recursively. - -## Custom testing strategy - -Parse the any deparsed or pretty-formatted SQL back and verify the AST matches the original. This ensures the formatting doesn't break the SQL semantics. - -Please review the test utilities — note that exact SQL string equality is not required. The focus is on comparing the resulting ASTs. - -Refer to `expectAstMatch` to understand how correctness is validated. - -The pipeline is: -parse(sql1) → ast → deparse(ast) → sql2 -While sql2 !== sql1 (textually), a correct round-trip means: -parse(sql1) === parse(sql2) (AST-level equality). - -You can see `expectAstMatch` here: packages/deparser/test-utils/index.ts - - ---- - -### Development Setup - -#### Prerequisites - -* Node.js v14+ -* Yarn - -#### Install & Build - -```bash -yarn -yarn build -``` - -#### Test Commands - -```bash -yarn test -# or -yarn test --testNamePattern="specific-test" -yarn test:watch -``` - -Update `TESTS.md` with latest test status and passing percentages. - ---- - -### Package Structure - -* `packages/deparser`: SQL output generator -* `packages/parser`: SQL AST generator -* `packages/types`: PG AST type definitions -* `packages/utils`: Shared helpers (quote, list, context) - ---- - -### Suggested Workflow - -1. Begin with `kitchen-sink` cases -2. Use stderr to view AST diff output -3. Use expected AST block as source of truth -4. Match deparsed output to expected structure -5. Fix one issue at a time—validate before moving forward - ---- - -## Testing Process & Workflow - -**Our systematic approach to fixing deparser issues:** - -1. **One test at a time**: Focus on individual failing tests using `yarn test --testNamePattern="specific-test"` -2. **Always check for regressions**: After each fix, run full `yarn test` to ensure no previously passing tests broke -3. **Track progress**: Update this file with current pass/fail counts after each significant change -4. **Build before testing**: Always run `yarn build` after code changes before testing -5. **Clean commits**: Stage files explicitly with `git add `, never use `git add .` -6. **Tight feedback loops**: Use isolated debug scripts for complex issues, but don't commit them - -**Workflow**: Make changes → `yarn test --testNamePattern="target-test"` → `yarn test` (check regressions) → Update this file → Commit & push - -**When committing to TESTS.md, always run all tests — do not use testNamePattern, only `yarn test`** - -PostgreSQL AST nodes are wrapped with type names as keys — `{ RangeVar: {...} }`, `{ String: {...} }`, etc. — see `Node` type in `@pgsql/types`. - -Node type detection should use the wrapper key — `Object.keys(node)[0]` — for wrapped nodes from `@pgsql/types`. - -`@pgsql/types` provides comprehensive type definitions for all PostgreSQL AST node types. The `Node` type is the wrapped form. - -Parent context should inform node type resolution when wrapper detection fails. - -`visit()` should only be called on wrapped `Node` instances — avoid duck typing by checking for properties like `schemaname`, `sval`, `ival`, etc. These should be handled by specific node visitor methods in the deparser. diff --git a/README.md b/README.md index 6abbc4fc..757dd39d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ npm install -g @pgsql/cli # For programmatic AST construction npm install @pgsql/utils +# For programmatic AST visiting/traversal +npm install @pgsql/traverse + # For protobuf parsing and code generation npm install pg-proto-parser ``` @@ -123,6 +126,38 @@ const stmt: { SelectStmt: SelectStmt } = t.nodes.selectStmt({ await deparse(stmt); ``` +#### Walk/Traverse an AST +```typescript +import { walk, NodePath } from '@pgsql/traverse'; +import type { Walker, Visitor } from '@pgsql/traverse'; + +// Using a simple walker function +const walker: Walker = (path: NodePath) => { + console.log(`Visiting ${path.tag} at path:`, path.path); + + // Return false to skip traversing children + if (path.tag === 'SelectStmt') { + return false; // Skip SELECT statement children + } +}; + +walk(ast, walker); + +// Using a visitor object (recommended for multiple node types) +const visitor: Visitor = { + SelectStmt: (path) => { + console.log('SELECT statement:', path.node); + }, + RangeVar: (path) => { + console.log('Table:', path.node.relname); + console.log('Path to table:', path.path); + console.log('Parent node:', path.parent?.tag); + } +}; + +walk(ast, visitor); +``` + ## 📦 Packages | Package | Description | Key Features | @@ -133,7 +168,7 @@ await deparse(stmt); | [**@pgsql/utils**](./packages/utils) | Type-safe AST node creation utilities | • Programmatic AST construction
• Runtime Schema
• Seamless integration with types | | [**pg-proto-parser**](./packages/proto-parser) | PostgreSQL protobuf parser and code generator | • Generate TypeScript interfaces from protobuf
• Create enum mappings and utilities
• AST helper generation | | [**@pgsql/transform**](./packages/transform) | Multi-version PostgreSQL AST transformer | • Transform ASTs between PostgreSQL versions (13→17)
• Single source of truth deparser pipeline
• Backward compatibility for legacy SQL | - +| [**@pgsql/traverse**](./packages/traverse) | PostgreSQL AST traversal utilities | • Visitor pattern for traversing PostgreSQL AST nodes
• NodePath context with parent/path information
• Runtime schema-based precise traversal | ## 🛠️ Development @@ -226,6 +261,7 @@ console.log(await deparse(query)); * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications. * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs. +* [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. * [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. diff --git a/DEPARSER_USAGE.md b/packages/deparser/DEPARSER_USAGE.md similarity index 100% rename from DEPARSER_USAGE.md rename to packages/deparser/DEPARSER_USAGE.md diff --git a/packages/deparser/README.md b/packages/deparser/README.md index 8d76147d..91cbeb08 100644 --- a/packages/deparser/README.md +++ b/packages/deparser/README.md @@ -155,6 +155,7 @@ Built on the excellent work of several contributors: * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications. * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs. +* [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. * [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. diff --git a/packages/deparser/TESTING.md b/packages/deparser/TESTING.md new file mode 100644 index 00000000..19fe0967 --- /dev/null +++ b/packages/deparser/TESTING.md @@ -0,0 +1,29 @@ +## Custom testing strategy + +Parse the any deparsed or pretty-formatted SQL back and verify the AST matches the original. This ensures the formatting doesn't break the SQL semantics. + +Please review the test utilities — note that exact SQL string equality is not required. The focus is on comparing the resulting ASTs. + +Refer to `expectAstMatch` to understand how correctness is validated. + +The pipeline is: +parse(sql1) → ast → deparse(ast) → sql2 +While sql2 !== sql1 (textually), a correct round-trip means: +parse(sql1) === parse(sql2) (AST-level equality). + +You can see `expectAstMatch` here: packages/deparser/test-utils/index.ts + +## Testing Process & Workflow + +**Our systematic approach to fixing deparser issues:** + +1. **One test at a time**: Focus on individual failing tests using `yarn test --testNamePattern="specific-test"` +2. **Always check for regressions**: After each fix, run full `yarn test` to ensure no previously passing tests broke +3. **Track progress**: Update this file with current pass/fail counts after each significant change +4. **Build before testing**: Always run `yarn build` after code changes before testing +5. **Clean commits**: Stage files explicitly with `git add `, never use `git add .` +6. **Tight feedback loops**: Use isolated debug scripts for complex issues, but don't commit them + +**Workflow**: Make changes → `yarn test --testNamePattern="target-test"` → `yarn test` (check regressions) → Update this file → Commit & push + +**When committing to TESTS.md, always run all tests — do not use testNamePattern, only `yarn test`** \ No newline at end of file diff --git a/packages/parser/README.md b/packages/parser/README.md index 712a9e2a..29b69113 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -140,6 +140,7 @@ Built on the excellent work of several contributors: * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications. * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs. +* [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. * [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. @@ -147,4 +148,4 @@ Built on the excellent work of several contributors: AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. -No developer or entity involved in creating Software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Software code or Software CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. \ No newline at end of file +No developer or entity involved in creating Software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Software code or Software CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/packages/pgsql-cli/README.md b/packages/pgsql-cli/README.md index a6253af3..f0695072 100644 --- a/packages/pgsql-cli/README.md +++ b/packages/pgsql-cli/README.md @@ -258,6 +258,7 @@ The command options remain largely the same, with some improvements: * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications. * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs. +* [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. * [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. @@ -265,4 +266,4 @@ The command options remain largely the same, with some improvements: AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. -No developer or entity involved in creating Software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Software code or Software CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. \ No newline at end of file +No developer or entity involved in creating Software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Software code or Software CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/packages/proto-parser/README.md b/packages/proto-parser/README.md index 7beed0c7..2abda1fa 100644 --- a/packages/proto-parser/README.md +++ b/packages/proto-parser/README.md @@ -323,6 +323,7 @@ t.nodes.selectStmt({ * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications. * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs. +* [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. * [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. diff --git a/packages/transform/README.md b/packages/transform/README.md index 31de6f2e..4586ed92 100644 --- a/packages/transform/README.md +++ b/packages/transform/README.md @@ -123,6 +123,7 @@ This enables a single source of truth for SQL generation while supporting legacy * [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. * [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications. * [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs. +* [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. * [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. * [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. diff --git a/packages/transform/scripts/pg-proto-parser.ts b/packages/transform/scripts/pg-proto-parser.ts index 5d93aa54..3b7dce70 100644 --- a/packages/transform/scripts/pg-proto-parser.ts +++ b/packages/transform/scripts/pg-proto-parser.ts @@ -20,16 +20,11 @@ for (const version of versions) { }, utils: { enums: { - enabled: true, - unidirectional: true, - toIntFilename: 'enum-to-int.ts', - toStringFilename: 'enum-to-str.ts' + enabled: false } }, runtimeSchema: { - enabled: true, - filename: 'runtime-schema.ts', - format: 'typescript' + enabled: false } }; diff --git a/packages/transform/src/13/enum-to-int.ts b/packages/transform/src/13/enum-to-int.ts deleted file mode 100644 index 20ed4e98..00000000 --- a/packages/transform/src/13/enum-to-int.ts +++ /dev/null @@ -1,2167 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "ClusterOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumInt = (enumType: EnumType, key: string): number => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case "OVERRIDING_NOT_SET": - return 0; - case "OVERRIDING_USER_VALUE": - return 1; - case "OVERRIDING_SYSTEM_VALUE": - return 2; - default: - throw new Error("Key not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case "QSRC_ORIGINAL": - return 0; - case "QSRC_PARSER": - return 1; - case "QSRC_INSTEAD_RULE": - return 2; - case "QSRC_QUAL_INSTEAD_RULE": - return 3; - case "QSRC_NON_INSTEAD_RULE": - return 4; - default: - throw new Error("Key not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case "SORTBY_DEFAULT": - return 0; - case "SORTBY_ASC": - return 1; - case "SORTBY_DESC": - return 2; - case "SORTBY_USING": - return 3; - default: - throw new Error("Key not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case "SORTBY_NULLS_DEFAULT": - return 0; - case "SORTBY_NULLS_FIRST": - return 1; - case "SORTBY_NULLS_LAST": - return 2; - default: - throw new Error("Key not recognized in enum SortByNulls"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case "AEXPR_OP": - return 0; - case "AEXPR_OP_ANY": - return 1; - case "AEXPR_OP_ALL": - return 2; - case "AEXPR_DISTINCT": - return 3; - case "AEXPR_NOT_DISTINCT": - return 4; - case "AEXPR_NULLIF": - return 5; - case "AEXPR_OF": - return 6; - case "AEXPR_IN": - return 7; - case "AEXPR_LIKE": - return 8; - case "AEXPR_ILIKE": - return 9; - case "AEXPR_SIMILAR": - return 10; - case "AEXPR_BETWEEN": - return 11; - case "AEXPR_NOT_BETWEEN": - return 12; - case "AEXPR_BETWEEN_SYM": - return 13; - case "AEXPR_NOT_BETWEEN_SYM": - return 14; - case "AEXPR_PAREN": - return 15; - default: - throw new Error("Key not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case "ROLESPEC_CSTRING": - return 0; - case "ROLESPEC_CURRENT_USER": - return 1; - case "ROLESPEC_SESSION_USER": - return 2; - case "ROLESPEC_PUBLIC": - return 3; - default: - throw new Error("Key not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case "CREATE_TABLE_LIKE_COMMENTS": - return 0; - case "CREATE_TABLE_LIKE_CONSTRAINTS": - return 1; - case "CREATE_TABLE_LIKE_DEFAULTS": - return 2; - case "CREATE_TABLE_LIKE_GENERATED": - return 3; - case "CREATE_TABLE_LIKE_IDENTITY": - return 4; - case "CREATE_TABLE_LIKE_INDEXES": - return 5; - case "CREATE_TABLE_LIKE_STATISTICS": - return 6; - case "CREATE_TABLE_LIKE_STORAGE": - return 7; - case "CREATE_TABLE_LIKE_ALL": - return 8; - default: - throw new Error("Key not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case "DEFELEM_UNSPEC": - return 0; - case "DEFELEM_SET": - return 1; - case "DEFELEM_ADD": - return 2; - case "DEFELEM_DROP": - return 3; - default: - throw new Error("Key not recognized in enum DefElemAction"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case "PARTITION_RANGE_DATUM_MINVALUE": - return 0; - case "PARTITION_RANGE_DATUM_VALUE": - return 1; - case "PARTITION_RANGE_DATUM_MAXVALUE": - return 2; - default: - throw new Error("Key not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case "RTE_RELATION": - return 0; - case "RTE_SUBQUERY": - return 1; - case "RTE_JOIN": - return 2; - case "RTE_FUNCTION": - return 3; - case "RTE_TABLEFUNC": - return 4; - case "RTE_VALUES": - return 5; - case "RTE_CTE": - return 6; - case "RTE_NAMEDTUPLESTORE": - return 7; - case "RTE_RESULT": - return 8; - default: - throw new Error("Key not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case "WCO_VIEW_CHECK": - return 0; - case "WCO_RLS_INSERT_CHECK": - return 1; - case "WCO_RLS_UPDATE_CHECK": - return 2; - case "WCO_RLS_CONFLICT_CHECK": - return 3; - default: - throw new Error("Key not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case "GROUPING_SET_EMPTY": - return 0; - case "GROUPING_SET_SIMPLE": - return 1; - case "GROUPING_SET_ROLLUP": - return 2; - case "GROUPING_SET_CUBE": - return 3; - case "GROUPING_SET_SETS": - return 4; - default: - throw new Error("Key not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case "CTEMaterializeDefault": - return 0; - case "CTEMaterializeAlways": - return 1; - case "CTEMaterializeNever": - return 2; - default: - throw new Error("Key not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case "SETOP_NONE": - return 0; - case "SETOP_UNION": - return 1; - case "SETOP_INTERSECT": - return 2; - case "SETOP_EXCEPT": - return 3; - default: - throw new Error("Key not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case "OBJECT_ACCESS_METHOD": - return 0; - case "OBJECT_AGGREGATE": - return 1; - case "OBJECT_AMOP": - return 2; - case "OBJECT_AMPROC": - return 3; - case "OBJECT_ATTRIBUTE": - return 4; - case "OBJECT_CAST": - return 5; - case "OBJECT_COLUMN": - return 6; - case "OBJECT_COLLATION": - return 7; - case "OBJECT_CONVERSION": - return 8; - case "OBJECT_DATABASE": - return 9; - case "OBJECT_DEFAULT": - return 10; - case "OBJECT_DEFACL": - return 11; - case "OBJECT_DOMAIN": - return 12; - case "OBJECT_DOMCONSTRAINT": - return 13; - case "OBJECT_EVENT_TRIGGER": - return 14; - case "OBJECT_EXTENSION": - return 15; - case "OBJECT_FDW": - return 16; - case "OBJECT_FOREIGN_SERVER": - return 17; - case "OBJECT_FOREIGN_TABLE": - return 18; - case "OBJECT_FUNCTION": - return 19; - case "OBJECT_INDEX": - return 20; - case "OBJECT_LANGUAGE": - return 21; - case "OBJECT_LARGEOBJECT": - return 22; - case "OBJECT_MATVIEW": - return 23; - case "OBJECT_OPCLASS": - return 24; - case "OBJECT_OPERATOR": - return 25; - case "OBJECT_OPFAMILY": - return 26; - case "OBJECT_POLICY": - return 27; - case "OBJECT_PROCEDURE": - return 28; - case "OBJECT_PUBLICATION": - return 29; - case "OBJECT_PUBLICATION_REL": - return 30; - case "OBJECT_ROLE": - return 31; - case "OBJECT_ROUTINE": - return 32; - case "OBJECT_RULE": - return 33; - case "OBJECT_SCHEMA": - return 34; - case "OBJECT_SEQUENCE": - return 35; - case "OBJECT_SUBSCRIPTION": - return 36; - case "OBJECT_STATISTIC_EXT": - return 37; - case "OBJECT_TABCONSTRAINT": - return 38; - case "OBJECT_TABLE": - return 39; - case "OBJECT_TABLESPACE": - return 40; - case "OBJECT_TRANSFORM": - return 41; - case "OBJECT_TRIGGER": - return 42; - case "OBJECT_TSCONFIGURATION": - return 43; - case "OBJECT_TSDICTIONARY": - return 44; - case "OBJECT_TSPARSER": - return 45; - case "OBJECT_TSTEMPLATE": - return 46; - case "OBJECT_TYPE": - return 47; - case "OBJECT_USER_MAPPING": - return 48; - case "OBJECT_VIEW": - return 49; - default: - throw new Error("Key not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case "DROP_RESTRICT": - return 0; - case "DROP_CASCADE": - return 1; - default: - throw new Error("Key not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case "AT_AddColumn": - return 0; - case "AT_AddColumnRecurse": - return 1; - case "AT_AddColumnToView": - return 2; - case "AT_ColumnDefault": - return 3; - case "AT_CookedColumnDefault": - return 4; - case "AT_DropNotNull": - return 5; - case "AT_SetNotNull": - return 6; - case "AT_DropExpression": - return 7; - case "AT_CheckNotNull": - return 8; - case "AT_SetStatistics": - return 9; - case "AT_SetOptions": - return 10; - case "AT_ResetOptions": - return 11; - case "AT_SetStorage": - return 12; - case "AT_DropColumn": - return 13; - case "AT_DropColumnRecurse": - return 14; - case "AT_AddIndex": - return 15; - case "AT_ReAddIndex": - return 16; - case "AT_AddConstraint": - return 17; - case "AT_AddConstraintRecurse": - return 18; - case "AT_ReAddConstraint": - return 19; - case "AT_ReAddDomainConstraint": - return 20; - case "AT_AlterConstraint": - return 21; - case "AT_ValidateConstraint": - return 22; - case "AT_ValidateConstraintRecurse": - return 23; - case "AT_AddIndexConstraint": - return 24; - case "AT_DropConstraint": - return 25; - case "AT_DropConstraintRecurse": - return 26; - case "AT_ReAddComment": - return 27; - case "AT_AlterColumnType": - return 28; - case "AT_AlterColumnGenericOptions": - return 29; - case "AT_ChangeOwner": - return 30; - case "AT_ClusterOn": - return 31; - case "AT_DropCluster": - return 32; - case "AT_SetLogged": - return 33; - case "AT_SetUnLogged": - return 34; - case "AT_DropOids": - return 35; - case "AT_SetTableSpace": - return 36; - case "AT_SetRelOptions": - return 37; - case "AT_ResetRelOptions": - return 38; - case "AT_ReplaceRelOptions": - return 39; - case "AT_EnableTrig": - return 40; - case "AT_EnableAlwaysTrig": - return 41; - case "AT_EnableReplicaTrig": - return 42; - case "AT_DisableTrig": - return 43; - case "AT_EnableTrigAll": - return 44; - case "AT_DisableTrigAll": - return 45; - case "AT_EnableTrigUser": - return 46; - case "AT_DisableTrigUser": - return 47; - case "AT_EnableRule": - return 48; - case "AT_EnableAlwaysRule": - return 49; - case "AT_EnableReplicaRule": - return 50; - case "AT_DisableRule": - return 51; - case "AT_AddInherit": - return 52; - case "AT_DropInherit": - return 53; - case "AT_AddOf": - return 54; - case "AT_DropOf": - return 55; - case "AT_ReplicaIdentity": - return 56; - case "AT_EnableRowSecurity": - return 57; - case "AT_DisableRowSecurity": - return 58; - case "AT_ForceRowSecurity": - return 59; - case "AT_NoForceRowSecurity": - return 60; - case "AT_GenericOptions": - return 61; - case "AT_AttachPartition": - return 62; - case "AT_DetachPartition": - return 63; - case "AT_AddIdentity": - return 64; - case "AT_SetIdentity": - return 65; - case "AT_DropIdentity": - return 66; - default: - throw new Error("Key not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case "ACL_TARGET_OBJECT": - return 0; - case "ACL_TARGET_ALL_IN_SCHEMA": - return 1; - case "ACL_TARGET_DEFAULTS": - return 2; - default: - throw new Error("Key not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case "VAR_SET_VALUE": - return 0; - case "VAR_SET_DEFAULT": - return 1; - case "VAR_SET_CURRENT": - return 2; - case "VAR_SET_MULTI": - return 3; - case "VAR_RESET": - return 4; - case "VAR_RESET_ALL": - return 5; - default: - throw new Error("Key not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case "CONSTR_NULL": - return 0; - case "CONSTR_NOTNULL": - return 1; - case "CONSTR_DEFAULT": - return 2; - case "CONSTR_IDENTITY": - return 3; - case "CONSTR_GENERATED": - return 4; - case "CONSTR_CHECK": - return 5; - case "CONSTR_PRIMARY": - return 6; - case "CONSTR_UNIQUE": - return 7; - case "CONSTR_EXCLUSION": - return 8; - case "CONSTR_FOREIGN": - return 9; - case "CONSTR_ATTR_DEFERRABLE": - return 10; - case "CONSTR_ATTR_NOT_DEFERRABLE": - return 11; - case "CONSTR_ATTR_DEFERRED": - return 12; - case "CONSTR_ATTR_IMMEDIATE": - return 13; - default: - throw new Error("Key not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case "FDW_IMPORT_SCHEMA_ALL": - return 0; - case "FDW_IMPORT_SCHEMA_LIMIT_TO": - return 1; - case "FDW_IMPORT_SCHEMA_EXCEPT": - return 2; - default: - throw new Error("Key not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case "ROLESTMT_ROLE": - return 0; - case "ROLESTMT_USER": - return 1; - case "ROLESTMT_GROUP": - return 2; - default: - throw new Error("Key not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case "FETCH_FORWARD": - return 0; - case "FETCH_BACKWARD": - return 1; - case "FETCH_ABSOLUTE": - return 2; - case "FETCH_RELATIVE": - return 3; - default: - throw new Error("Key not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case "FUNC_PARAM_IN": - return 0; - case "FUNC_PARAM_OUT": - return 1; - case "FUNC_PARAM_INOUT": - return 2; - case "FUNC_PARAM_VARIADIC": - return 3; - case "FUNC_PARAM_TABLE": - return 4; - default: - throw new Error("Key not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case "TRANS_STMT_BEGIN": - return 0; - case "TRANS_STMT_START": - return 1; - case "TRANS_STMT_COMMIT": - return 2; - case "TRANS_STMT_ROLLBACK": - return 3; - case "TRANS_STMT_SAVEPOINT": - return 4; - case "TRANS_STMT_RELEASE": - return 5; - case "TRANS_STMT_ROLLBACK_TO": - return 6; - case "TRANS_STMT_PREPARE": - return 7; - case "TRANS_STMT_COMMIT_PREPARED": - return 8; - case "TRANS_STMT_ROLLBACK_PREPARED": - return 9; - default: - throw new Error("Key not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case "NO_CHECK_OPTION": - return 0; - case "LOCAL_CHECK_OPTION": - return 1; - case "CASCADED_CHECK_OPTION": - return 2; - default: - throw new Error("Key not recognized in enum ViewCheckOption"); - } - } - case "ClusterOption": - { - switch (key) { - case "CLUOPT_RECHECK": - return 0; - case "CLUOPT_VERBOSE": - return 1; - default: - throw new Error("Key not recognized in enum ClusterOption"); - } - } - case "DiscardMode": - { - switch (key) { - case "DISCARD_ALL": - return 0; - case "DISCARD_PLANS": - return 1; - case "DISCARD_SEQUENCES": - return 2; - case "DISCARD_TEMP": - return 3; - default: - throw new Error("Key not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case "REINDEX_OBJECT_INDEX": - return 0; - case "REINDEX_OBJECT_TABLE": - return 1; - case "REINDEX_OBJECT_SCHEMA": - return 2; - case "REINDEX_OBJECT_SYSTEM": - return 3; - case "REINDEX_OBJECT_DATABASE": - return 4; - default: - throw new Error("Key not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case "ALTER_TSCONFIG_ADD_MAPPING": - return 0; - case "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN": - return 1; - case "ALTER_TSCONFIG_REPLACE_DICT": - return 2; - case "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN": - return 3; - case "ALTER_TSCONFIG_DROP_MAPPING": - return 4; - default: - throw new Error("Key not recognized in enum AlterTSConfigType"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case "ALTER_SUBSCRIPTION_OPTIONS": - return 0; - case "ALTER_SUBSCRIPTION_CONNECTION": - return 1; - case "ALTER_SUBSCRIPTION_PUBLICATION": - return 2; - case "ALTER_SUBSCRIPTION_REFRESH": - return 3; - case "ALTER_SUBSCRIPTION_ENABLED": - return 4; - default: - throw new Error("Key not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case "ONCOMMIT_NOOP": - return 0; - case "ONCOMMIT_PRESERVE_ROWS": - return 1; - case "ONCOMMIT_DELETE_ROWS": - return 2; - case "ONCOMMIT_DROP": - return 3; - default: - throw new Error("Key not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case "PARAM_EXTERN": - return 0; - case "PARAM_EXEC": - return 1; - case "PARAM_SUBLINK": - return 2; - case "PARAM_MULTIEXPR": - return 3; - default: - throw new Error("Key not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case "COERCION_IMPLICIT": - return 0; - case "COERCION_ASSIGNMENT": - return 1; - case "COERCION_EXPLICIT": - return 2; - default: - throw new Error("Key not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case "COERCE_EXPLICIT_CALL": - return 0; - case "COERCE_EXPLICIT_CAST": - return 1; - case "COERCE_IMPLICIT_CAST": - return 2; - default: - throw new Error("Key not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case "AND_EXPR": - return 0; - case "OR_EXPR": - return 1; - case "NOT_EXPR": - return 2; - default: - throw new Error("Key not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case "EXISTS_SUBLINK": - return 0; - case "ALL_SUBLINK": - return 1; - case "ANY_SUBLINK": - return 2; - case "ROWCOMPARE_SUBLINK": - return 3; - case "EXPR_SUBLINK": - return 4; - case "MULTIEXPR_SUBLINK": - return 5; - case "ARRAY_SUBLINK": - return 6; - case "CTE_SUBLINK": - return 7; - default: - throw new Error("Key not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case "ROWCOMPARE_LT": - return 0; - case "ROWCOMPARE_LE": - return 1; - case "ROWCOMPARE_EQ": - return 2; - case "ROWCOMPARE_GE": - return 3; - case "ROWCOMPARE_GT": - return 4; - case "ROWCOMPARE_NE": - return 5; - default: - throw new Error("Key not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case "IS_GREATEST": - return 0; - case "IS_LEAST": - return 1; - default: - throw new Error("Key not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case "SVFOP_CURRENT_DATE": - return 0; - case "SVFOP_CURRENT_TIME": - return 1; - case "SVFOP_CURRENT_TIME_N": - return 2; - case "SVFOP_CURRENT_TIMESTAMP": - return 3; - case "SVFOP_CURRENT_TIMESTAMP_N": - return 4; - case "SVFOP_LOCALTIME": - return 5; - case "SVFOP_LOCALTIME_N": - return 6; - case "SVFOP_LOCALTIMESTAMP": - return 7; - case "SVFOP_LOCALTIMESTAMP_N": - return 8; - case "SVFOP_CURRENT_ROLE": - return 9; - case "SVFOP_CURRENT_USER": - return 10; - case "SVFOP_USER": - return 11; - case "SVFOP_SESSION_USER": - return 12; - case "SVFOP_CURRENT_CATALOG": - return 13; - case "SVFOP_CURRENT_SCHEMA": - return 14; - default: - throw new Error("Key not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case "IS_XMLCONCAT": - return 0; - case "IS_XMLELEMENT": - return 1; - case "IS_XMLFOREST": - return 2; - case "IS_XMLPARSE": - return 3; - case "IS_XMLPI": - return 4; - case "IS_XMLROOT": - return 5; - case "IS_XMLSERIALIZE": - return 6; - case "IS_DOCUMENT": - return 7; - default: - throw new Error("Key not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case "XMLOPTION_DOCUMENT": - return 0; - case "XMLOPTION_CONTENT": - return 1; - default: - throw new Error("Key not recognized in enum XmlOptionType"); - } - } - case "NullTestType": - { - switch (key) { - case "IS_NULL": - return 0; - case "IS_NOT_NULL": - return 1; - default: - throw new Error("Key not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case "IS_TRUE": - return 0; - case "IS_NOT_TRUE": - return 1; - case "IS_FALSE": - return 2; - case "IS_NOT_FALSE": - return 3; - case "IS_UNKNOWN": - return 4; - case "IS_NOT_UNKNOWN": - return 5; - default: - throw new Error("Key not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case "CMD_UNKNOWN": - return 0; - case "CMD_SELECT": - return 1; - case "CMD_UPDATE": - return 2; - case "CMD_INSERT": - return 3; - case "CMD_DELETE": - return 4; - case "CMD_UTILITY": - return 5; - case "CMD_NOTHING": - return 6; - default: - throw new Error("Key not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case "JOIN_INNER": - return 0; - case "JOIN_LEFT": - return 1; - case "JOIN_FULL": - return 2; - case "JOIN_RIGHT": - return 3; - case "JOIN_SEMI": - return 4; - case "JOIN_ANTI": - return 5; - case "JOIN_UNIQUE_OUTER": - return 6; - case "JOIN_UNIQUE_INNER": - return 7; - default: - throw new Error("Key not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case "AGG_PLAIN": - return 0; - case "AGG_SORTED": - return 1; - case "AGG_HASHED": - return 2; - case "AGG_MIXED": - return 3; - default: - throw new Error("Key not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case "AGGSPLIT_SIMPLE": - return 0; - case "AGGSPLIT_INITIAL_SERIAL": - return 1; - case "AGGSPLIT_FINAL_DESERIAL": - return 2; - default: - throw new Error("Key not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case "SETOPCMD_INTERSECT": - return 0; - case "SETOPCMD_INTERSECT_ALL": - return 1; - case "SETOPCMD_EXCEPT": - return 2; - case "SETOPCMD_EXCEPT_ALL": - return 3; - default: - throw new Error("Key not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case "SETOP_SORTED": - return 0; - case "SETOP_HASHED": - return 1; - default: - throw new Error("Key not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case "ONCONFLICT_NONE": - return 0; - case "ONCONFLICT_NOTHING": - return 1; - case "ONCONFLICT_UPDATE": - return 2; - default: - throw new Error("Key not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case "LIMIT_OPTION_DEFAULT": - return 0; - case "LIMIT_OPTION_COUNT": - return 1; - case "LIMIT_OPTION_WITH_TIES": - return 2; - default: - throw new Error("Key not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case "LCS_NONE": - return 0; - case "LCS_FORKEYSHARE": - return 1; - case "LCS_FORSHARE": - return 2; - case "LCS_FORNOKEYUPDATE": - return 3; - case "LCS_FORUPDATE": - return 4; - default: - throw new Error("Key not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case "LockWaitBlock": - return 0; - case "LockWaitSkip": - return 1; - case "LockWaitError": - return 2; - default: - throw new Error("Key not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case "LockTupleKeyShare": - return 0; - case "LockTupleShare": - return 1; - case "LockTupleNoKeyExclusive": - return 2; - case "LockTupleExclusive": - return 3; - default: - throw new Error("Key not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case "NO_KEYWORD": - return 0; - case "UNRESERVED_KEYWORD": - return 1; - case "COL_NAME_KEYWORD": - return 2; - case "TYPE_FUNC_NAME_KEYWORD": - return 3; - case "RESERVED_KEYWORD": - return 4; - default: - throw new Error("Key not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case "NUL": - return 0; - case "ASCII_37": - return 37; - case "ASCII_40": - return 40; - case "ASCII_41": - return 41; - case "ASCII_42": - return 42; - case "ASCII_43": - return 43; - case "ASCII_44": - return 44; - case "ASCII_45": - return 45; - case "ASCII_46": - return 46; - case "ASCII_47": - return 47; - case "ASCII_58": - return 58; - case "ASCII_59": - return 59; - case "ASCII_60": - return 60; - case "ASCII_61": - return 61; - case "ASCII_62": - return 62; - case "ASCII_63": - return 63; - case "ASCII_91": - return 91; - case "ASCII_92": - return 92; - case "ASCII_93": - return 93; - case "ASCII_94": - return 94; - case "IDENT": - return 258; - case "UIDENT": - return 259; - case "FCONST": - return 260; - case "SCONST": - return 261; - case "USCONST": - return 262; - case "BCONST": - return 263; - case "XCONST": - return 264; - case "Op": - return 265; - case "ICONST": - return 266; - case "PARAM": - return 267; - case "TYPECAST": - return 268; - case "DOT_DOT": - return 269; - case "COLON_EQUALS": - return 270; - case "EQUALS_GREATER": - return 271; - case "LESS_EQUALS": - return 272; - case "GREATER_EQUALS": - return 273; - case "NOT_EQUALS": - return 274; - case "SQL_COMMENT": - return 275; - case "C_COMMENT": - return 276; - case "ABORT_P": - return 277; - case "ABSOLUTE_P": - return 278; - case "ACCESS": - return 279; - case "ACTION": - return 280; - case "ADD_P": - return 281; - case "ADMIN": - return 282; - case "AFTER": - return 283; - case "AGGREGATE": - return 284; - case "ALL": - return 285; - case "ALSO": - return 286; - case "ALTER": - return 287; - case "ALWAYS": - return 288; - case "ANALYSE": - return 289; - case "ANALYZE": - return 290; - case "AND": - return 291; - case "ANY": - return 292; - case "ARRAY": - return 293; - case "AS": - return 294; - case "ASC": - return 295; - case "ASSERTION": - return 296; - case "ASSIGNMENT": - return 297; - case "ASYMMETRIC": - return 298; - case "AT": - return 299; - case "ATTACH": - return 300; - case "ATTRIBUTE": - return 301; - case "AUTHORIZATION": - return 302; - case "BACKWARD": - return 303; - case "BEFORE": - return 304; - case "BEGIN_P": - return 305; - case "BETWEEN": - return 306; - case "BIGINT": - return 307; - case "BINARY": - return 308; - case "BIT": - return 309; - case "BOOLEAN_P": - return 310; - case "BOTH": - return 311; - case "BY": - return 312; - case "CACHE": - return 313; - case "CALL": - return 314; - case "CALLED": - return 315; - case "CASCADE": - return 316; - case "CASCADED": - return 317; - case "CASE": - return 318; - case "CAST": - return 319; - case "CATALOG_P": - return 320; - case "CHAIN": - return 321; - case "CHAR_P": - return 322; - case "CHARACTER": - return 323; - case "CHARACTERISTICS": - return 324; - case "CHECK": - return 325; - case "CHECKPOINT": - return 326; - case "CLASS": - return 327; - case "CLOSE": - return 328; - case "CLUSTER": - return 329; - case "COALESCE": - return 330; - case "COLLATE": - return 331; - case "COLLATION": - return 332; - case "COLUMN": - return 333; - case "COLUMNS": - return 334; - case "COMMENT": - return 335; - case "COMMENTS": - return 336; - case "COMMIT": - return 337; - case "COMMITTED": - return 338; - case "CONCURRENTLY": - return 339; - case "CONFIGURATION": - return 340; - case "CONFLICT": - return 341; - case "CONNECTION": - return 342; - case "CONSTRAINT": - return 343; - case "CONSTRAINTS": - return 344; - case "CONTENT_P": - return 345; - case "CONTINUE_P": - return 346; - case "CONVERSION_P": - return 347; - case "COPY": - return 348; - case "COST": - return 349; - case "CREATE": - return 350; - case "CROSS": - return 351; - case "CSV": - return 352; - case "CUBE": - return 353; - case "CURRENT_P": - return 354; - case "CURRENT_CATALOG": - return 355; - case "CURRENT_DATE": - return 356; - case "CURRENT_ROLE": - return 357; - case "CURRENT_SCHEMA": - return 358; - case "CURRENT_TIME": - return 359; - case "CURRENT_TIMESTAMP": - return 360; - case "CURRENT_USER": - return 361; - case "CURSOR": - return 362; - case "CYCLE": - return 363; - case "DATA_P": - return 364; - case "DATABASE": - return 365; - case "DAY_P": - return 366; - case "DEALLOCATE": - return 367; - case "DEC": - return 368; - case "DECIMAL_P": - return 369; - case "DECLARE": - return 370; - case "DEFAULT": - return 371; - case "DEFAULTS": - return 372; - case "DEFERRABLE": - return 373; - case "DEFERRED": - return 374; - case "DEFINER": - return 375; - case "DELETE_P": - return 376; - case "DELIMITER": - return 377; - case "DELIMITERS": - return 378; - case "DEPENDS": - return 379; - case "DESC": - return 380; - case "DETACH": - return 381; - case "DICTIONARY": - return 382; - case "DISABLE_P": - return 383; - case "DISCARD": - return 384; - case "DISTINCT": - return 385; - case "DO": - return 386; - case "DOCUMENT_P": - return 387; - case "DOMAIN_P": - return 388; - case "DOUBLE_P": - return 389; - case "DROP": - return 390; - case "EACH": - return 391; - case "ELSE": - return 392; - case "ENABLE_P": - return 393; - case "ENCODING": - return 394; - case "ENCRYPTED": - return 395; - case "END_P": - return 396; - case "ENUM_P": - return 397; - case "ESCAPE": - return 398; - case "EVENT": - return 399; - case "EXCEPT": - return 400; - case "EXCLUDE": - return 401; - case "EXCLUDING": - return 402; - case "EXCLUSIVE": - return 403; - case "EXECUTE": - return 404; - case "EXISTS": - return 405; - case "EXPLAIN": - return 406; - case "EXPRESSION": - return 407; - case "EXTENSION": - return 408; - case "EXTERNAL": - return 409; - case "EXTRACT": - return 410; - case "FALSE_P": - return 411; - case "FAMILY": - return 412; - case "FETCH": - return 413; - case "FILTER": - return 414; - case "FIRST_P": - return 415; - case "FLOAT_P": - return 416; - case "FOLLOWING": - return 417; - case "FOR": - return 418; - case "FORCE": - return 419; - case "FOREIGN": - return 420; - case "FORWARD": - return 421; - case "FREEZE": - return 422; - case "FROM": - return 423; - case "FULL": - return 424; - case "FUNCTION": - return 425; - case "FUNCTIONS": - return 426; - case "GENERATED": - return 427; - case "GLOBAL": - return 428; - case "GRANT": - return 429; - case "GRANTED": - return 430; - case "GREATEST": - return 431; - case "GROUP_P": - return 432; - case "GROUPING": - return 433; - case "GROUPS": - return 434; - case "HANDLER": - return 435; - case "HAVING": - return 436; - case "HEADER_P": - return 437; - case "HOLD": - return 438; - case "HOUR_P": - return 439; - case "IDENTITY_P": - return 440; - case "IF_P": - return 441; - case "ILIKE": - return 442; - case "IMMEDIATE": - return 443; - case "IMMUTABLE": - return 444; - case "IMPLICIT_P": - return 445; - case "IMPORT_P": - return 446; - case "IN_P": - return 447; - case "INCLUDE": - return 448; - case "INCLUDING": - return 449; - case "INCREMENT": - return 450; - case "INDEX": - return 451; - case "INDEXES": - return 452; - case "INHERIT": - return 453; - case "INHERITS": - return 454; - case "INITIALLY": - return 455; - case "INLINE_P": - return 456; - case "INNER_P": - return 457; - case "INOUT": - return 458; - case "INPUT_P": - return 459; - case "INSENSITIVE": - return 460; - case "INSERT": - return 461; - case "INSTEAD": - return 462; - case "INT_P": - return 463; - case "INTEGER": - return 464; - case "INTERSECT": - return 465; - case "INTERVAL": - return 466; - case "INTO": - return 467; - case "INVOKER": - return 468; - case "IS": - return 469; - case "ISNULL": - return 470; - case "ISOLATION": - return 471; - case "JOIN": - return 472; - case "KEY": - return 473; - case "LABEL": - return 474; - case "LANGUAGE": - return 475; - case "LARGE_P": - return 476; - case "LAST_P": - return 477; - case "LATERAL_P": - return 478; - case "LEADING": - return 479; - case "LEAKPROOF": - return 480; - case "LEAST": - return 481; - case "LEFT": - return 482; - case "LEVEL": - return 483; - case "LIKE": - return 484; - case "LIMIT": - return 485; - case "LISTEN": - return 486; - case "LOAD": - return 487; - case "LOCAL": - return 488; - case "LOCALTIME": - return 489; - case "LOCALTIMESTAMP": - return 490; - case "LOCATION": - return 491; - case "LOCK_P": - return 492; - case "LOCKED": - return 493; - case "LOGGED": - return 494; - case "MAPPING": - return 495; - case "MATCH": - return 496; - case "MATERIALIZED": - return 497; - case "MAXVALUE": - return 498; - case "METHOD": - return 499; - case "MINUTE_P": - return 500; - case "MINVALUE": - return 501; - case "MODE": - return 502; - case "MONTH_P": - return 503; - case "MOVE": - return 504; - case "NAME_P": - return 505; - case "NAMES": - return 506; - case "NATIONAL": - return 507; - case "NATURAL": - return 508; - case "NCHAR": - return 509; - case "NEW": - return 510; - case "NEXT": - return 511; - case "NFC": - return 512; - case "NFD": - return 513; - case "NFKC": - return 514; - case "NFKD": - return 515; - case "NO": - return 516; - case "NONE": - return 517; - case "NORMALIZE": - return 518; - case "NORMALIZED": - return 519; - case "NOT": - return 520; - case "NOTHING": - return 521; - case "NOTIFY": - return 522; - case "NOTNULL": - return 523; - case "NOWAIT": - return 524; - case "NULL_P": - return 525; - case "NULLIF": - return 526; - case "NULLS_P": - return 527; - case "NUMERIC": - return 528; - case "OBJECT_P": - return 529; - case "OF": - return 530; - case "OFF": - return 531; - case "OFFSET": - return 532; - case "OIDS": - return 533; - case "OLD": - return 534; - case "ON": - return 535; - case "ONLY": - return 536; - case "OPERATOR": - return 537; - case "OPTION": - return 538; - case "OPTIONS": - return 539; - case "OR": - return 540; - case "ORDER": - return 541; - case "ORDINALITY": - return 542; - case "OTHERS": - return 543; - case "OUT_P": - return 544; - case "OUTER_P": - return 545; - case "OVER": - return 546; - case "OVERLAPS": - return 547; - case "OVERLAY": - return 548; - case "OVERRIDING": - return 549; - case "OWNED": - return 550; - case "OWNER": - return 551; - case "PARALLEL": - return 552; - case "PARSER": - return 553; - case "PARTIAL": - return 554; - case "PARTITION": - return 555; - case "PASSING": - return 556; - case "PASSWORD": - return 557; - case "PLACING": - return 558; - case "PLANS": - return 559; - case "POLICY": - return 560; - case "POSITION": - return 561; - case "PRECEDING": - return 562; - case "PRECISION": - return 563; - case "PRESERVE": - return 564; - case "PREPARE": - return 565; - case "PREPARED": - return 566; - case "PRIMARY": - return 567; - case "PRIOR": - return 568; - case "PRIVILEGES": - return 569; - case "PROCEDURAL": - return 570; - case "PROCEDURE": - return 571; - case "PROCEDURES": - return 572; - case "PROGRAM": - return 573; - case "PUBLICATION": - return 574; - case "QUOTE": - return 575; - case "RANGE": - return 576; - case "READ": - return 577; - case "REAL": - return 578; - case "REASSIGN": - return 579; - case "RECHECK": - return 580; - case "RECURSIVE": - return 581; - case "REF_P": - return 582; - case "REFERENCES": - return 583; - case "REFERENCING": - return 584; - case "REFRESH": - return 585; - case "REINDEX": - return 586; - case "RELATIVE_P": - return 587; - case "RELEASE": - return 588; - case "RENAME": - return 589; - case "REPEATABLE": - return 590; - case "REPLACE": - return 591; - case "REPLICA": - return 592; - case "RESET": - return 593; - case "RESTART": - return 594; - case "RESTRICT": - return 595; - case "RETURNING": - return 596; - case "RETURNS": - return 597; - case "REVOKE": - return 598; - case "RIGHT": - return 599; - case "ROLE": - return 600; - case "ROLLBACK": - return 601; - case "ROLLUP": - return 602; - case "ROUTINE": - return 603; - case "ROUTINES": - return 604; - case "ROW": - return 605; - case "ROWS": - return 606; - case "RULE": - return 607; - case "SAVEPOINT": - return 608; - case "SCHEMA": - return 609; - case "SCHEMAS": - return 610; - case "SCROLL": - return 611; - case "SEARCH": - return 612; - case "SECOND_P": - return 613; - case "SECURITY": - return 614; - case "SELECT": - return 615; - case "SEQUENCE": - return 616; - case "SEQUENCES": - return 617; - case "SERIALIZABLE": - return 618; - case "SERVER": - return 619; - case "SESSION": - return 620; - case "SESSION_USER": - return 621; - case "SET": - return 622; - case "SETS": - return 623; - case "SETOF": - return 624; - case "SHARE": - return 625; - case "SHOW": - return 626; - case "SIMILAR": - return 627; - case "SIMPLE": - return 628; - case "SKIP": - return 629; - case "SMALLINT": - return 630; - case "SNAPSHOT": - return 631; - case "SOME": - return 632; - case "SQL_P": - return 633; - case "STABLE": - return 634; - case "STANDALONE_P": - return 635; - case "START": - return 636; - case "STATEMENT": - return 637; - case "STATISTICS": - return 638; - case "STDIN": - return 639; - case "STDOUT": - return 640; - case "STORAGE": - return 641; - case "STORED": - return 642; - case "STRICT_P": - return 643; - case "STRIP_P": - return 644; - case "SUBSCRIPTION": - return 645; - case "SUBSTRING": - return 646; - case "SUPPORT": - return 647; - case "SYMMETRIC": - return 648; - case "SYSID": - return 649; - case "SYSTEM_P": - return 650; - case "TABLE": - return 651; - case "TABLES": - return 652; - case "TABLESAMPLE": - return 653; - case "TABLESPACE": - return 654; - case "TEMP": - return 655; - case "TEMPLATE": - return 656; - case "TEMPORARY": - return 657; - case "TEXT_P": - return 658; - case "THEN": - return 659; - case "TIES": - return 660; - case "TIME": - return 661; - case "TIMESTAMP": - return 662; - case "TO": - return 663; - case "TRAILING": - return 664; - case "TRANSACTION": - return 665; - case "TRANSFORM": - return 666; - case "TREAT": - return 667; - case "TRIGGER": - return 668; - case "TRIM": - return 669; - case "TRUE_P": - return 670; - case "TRUNCATE": - return 671; - case "TRUSTED": - return 672; - case "TYPE_P": - return 673; - case "TYPES_P": - return 674; - case "UESCAPE": - return 675; - case "UNBOUNDED": - return 676; - case "UNCOMMITTED": - return 677; - case "UNENCRYPTED": - return 678; - case "UNION": - return 679; - case "UNIQUE": - return 680; - case "UNKNOWN": - return 681; - case "UNLISTEN": - return 682; - case "UNLOGGED": - return 683; - case "UNTIL": - return 684; - case "UPDATE": - return 685; - case "USER": - return 686; - case "USING": - return 687; - case "VACUUM": - return 688; - case "VALID": - return 689; - case "VALIDATE": - return 690; - case "VALIDATOR": - return 691; - case "VALUE_P": - return 692; - case "VALUES": - return 693; - case "VARCHAR": - return 694; - case "VARIADIC": - return 695; - case "VARYING": - return 696; - case "VERBOSE": - return 697; - case "VERSION_P": - return 698; - case "VIEW": - return 699; - case "VIEWS": - return 700; - case "VOLATILE": - return 701; - case "WHEN": - return 702; - case "WHERE": - return 703; - case "WHITESPACE_P": - return 704; - case "WINDOW": - return 705; - case "WITH": - return 706; - case "WITHIN": - return 707; - case "WITHOUT": - return 708; - case "WORK": - return 709; - case "WRAPPER": - return 710; - case "WRITE": - return 711; - case "XML_P": - return 712; - case "XMLATTRIBUTES": - return 713; - case "XMLCONCAT": - return 714; - case "XMLELEMENT": - return 715; - case "XMLEXISTS": - return 716; - case "XMLFOREST": - return 717; - case "XMLNAMESPACES": - return 718; - case "XMLPARSE": - return 719; - case "XMLPI": - return 720; - case "XMLROOT": - return 721; - case "XMLSERIALIZE": - return 722; - case "XMLTABLE": - return 723; - case "YEAR_P": - return 724; - case "YES_P": - return 725; - case "ZONE": - return 726; - case "NOT_LA": - return 727; - case "NULLS_LA": - return 728; - case "WITH_LA": - return 729; - case "POSTFIXOP": - return 730; - case "UMINUS": - return 731; - default: - throw new Error("Key not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/13/enum-to-str.ts b/packages/transform/src/13/enum-to-str.ts deleted file mode 100644 index 448b212b..00000000 --- a/packages/transform/src/13/enum-to-str.ts +++ /dev/null @@ -1,2167 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "ClusterOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumString = (enumType: EnumType, key: number): string => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case 0: - return "OVERRIDING_NOT_SET"; - case 1: - return "OVERRIDING_USER_VALUE"; - case 2: - return "OVERRIDING_SYSTEM_VALUE"; - default: - throw new Error("Value not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case 0: - return "QSRC_ORIGINAL"; - case 1: - return "QSRC_PARSER"; - case 2: - return "QSRC_INSTEAD_RULE"; - case 3: - return "QSRC_QUAL_INSTEAD_RULE"; - case 4: - return "QSRC_NON_INSTEAD_RULE"; - default: - throw new Error("Value not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case 0: - return "SORTBY_DEFAULT"; - case 1: - return "SORTBY_ASC"; - case 2: - return "SORTBY_DESC"; - case 3: - return "SORTBY_USING"; - default: - throw new Error("Value not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case 0: - return "SORTBY_NULLS_DEFAULT"; - case 1: - return "SORTBY_NULLS_FIRST"; - case 2: - return "SORTBY_NULLS_LAST"; - default: - throw new Error("Value not recognized in enum SortByNulls"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case 0: - return "AEXPR_OP"; - case 1: - return "AEXPR_OP_ANY"; - case 2: - return "AEXPR_OP_ALL"; - case 3: - return "AEXPR_DISTINCT"; - case 4: - return "AEXPR_NOT_DISTINCT"; - case 5: - return "AEXPR_NULLIF"; - case 6: - return "AEXPR_OF"; - case 7: - return "AEXPR_IN"; - case 8: - return "AEXPR_LIKE"; - case 9: - return "AEXPR_ILIKE"; - case 10: - return "AEXPR_SIMILAR"; - case 11: - return "AEXPR_BETWEEN"; - case 12: - return "AEXPR_NOT_BETWEEN"; - case 13: - return "AEXPR_BETWEEN_SYM"; - case 14: - return "AEXPR_NOT_BETWEEN_SYM"; - case 15: - return "AEXPR_PAREN"; - default: - throw new Error("Value not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case 0: - return "ROLESPEC_CSTRING"; - case 1: - return "ROLESPEC_CURRENT_USER"; - case 2: - return "ROLESPEC_SESSION_USER"; - case 3: - return "ROLESPEC_PUBLIC"; - default: - throw new Error("Value not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case 0: - return "CREATE_TABLE_LIKE_COMMENTS"; - case 1: - return "CREATE_TABLE_LIKE_CONSTRAINTS"; - case 2: - return "CREATE_TABLE_LIKE_DEFAULTS"; - case 3: - return "CREATE_TABLE_LIKE_GENERATED"; - case 4: - return "CREATE_TABLE_LIKE_IDENTITY"; - case 5: - return "CREATE_TABLE_LIKE_INDEXES"; - case 6: - return "CREATE_TABLE_LIKE_STATISTICS"; - case 7: - return "CREATE_TABLE_LIKE_STORAGE"; - case 8: - return "CREATE_TABLE_LIKE_ALL"; - default: - throw new Error("Value not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case 0: - return "DEFELEM_UNSPEC"; - case 1: - return "DEFELEM_SET"; - case 2: - return "DEFELEM_ADD"; - case 3: - return "DEFELEM_DROP"; - default: - throw new Error("Value not recognized in enum DefElemAction"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case 0: - return "PARTITION_RANGE_DATUM_MINVALUE"; - case 1: - return "PARTITION_RANGE_DATUM_VALUE"; - case 2: - return "PARTITION_RANGE_DATUM_MAXVALUE"; - default: - throw new Error("Value not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case 0: - return "RTE_RELATION"; - case 1: - return "RTE_SUBQUERY"; - case 2: - return "RTE_JOIN"; - case 3: - return "RTE_FUNCTION"; - case 4: - return "RTE_TABLEFUNC"; - case 5: - return "RTE_VALUES"; - case 6: - return "RTE_CTE"; - case 7: - return "RTE_NAMEDTUPLESTORE"; - case 8: - return "RTE_RESULT"; - default: - throw new Error("Value not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case 0: - return "WCO_VIEW_CHECK"; - case 1: - return "WCO_RLS_INSERT_CHECK"; - case 2: - return "WCO_RLS_UPDATE_CHECK"; - case 3: - return "WCO_RLS_CONFLICT_CHECK"; - default: - throw new Error("Value not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case 0: - return "GROUPING_SET_EMPTY"; - case 1: - return "GROUPING_SET_SIMPLE"; - case 2: - return "GROUPING_SET_ROLLUP"; - case 3: - return "GROUPING_SET_CUBE"; - case 4: - return "GROUPING_SET_SETS"; - default: - throw new Error("Value not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case 0: - return "CTEMaterializeDefault"; - case 1: - return "CTEMaterializeAlways"; - case 2: - return "CTEMaterializeNever"; - default: - throw new Error("Value not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case 0: - return "SETOP_NONE"; - case 1: - return "SETOP_UNION"; - case 2: - return "SETOP_INTERSECT"; - case 3: - return "SETOP_EXCEPT"; - default: - throw new Error("Value not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case 0: - return "OBJECT_ACCESS_METHOD"; - case 1: - return "OBJECT_AGGREGATE"; - case 2: - return "OBJECT_AMOP"; - case 3: - return "OBJECT_AMPROC"; - case 4: - return "OBJECT_ATTRIBUTE"; - case 5: - return "OBJECT_CAST"; - case 6: - return "OBJECT_COLUMN"; - case 7: - return "OBJECT_COLLATION"; - case 8: - return "OBJECT_CONVERSION"; - case 9: - return "OBJECT_DATABASE"; - case 10: - return "OBJECT_DEFAULT"; - case 11: - return "OBJECT_DEFACL"; - case 12: - return "OBJECT_DOMAIN"; - case 13: - return "OBJECT_DOMCONSTRAINT"; - case 14: - return "OBJECT_EVENT_TRIGGER"; - case 15: - return "OBJECT_EXTENSION"; - case 16: - return "OBJECT_FDW"; - case 17: - return "OBJECT_FOREIGN_SERVER"; - case 18: - return "OBJECT_FOREIGN_TABLE"; - case 19: - return "OBJECT_FUNCTION"; - case 20: - return "OBJECT_INDEX"; - case 21: - return "OBJECT_LANGUAGE"; - case 22: - return "OBJECT_LARGEOBJECT"; - case 23: - return "OBJECT_MATVIEW"; - case 24: - return "OBJECT_OPCLASS"; - case 25: - return "OBJECT_OPERATOR"; - case 26: - return "OBJECT_OPFAMILY"; - case 27: - return "OBJECT_POLICY"; - case 28: - return "OBJECT_PROCEDURE"; - case 29: - return "OBJECT_PUBLICATION"; - case 30: - return "OBJECT_PUBLICATION_REL"; - case 31: - return "OBJECT_ROLE"; - case 32: - return "OBJECT_ROUTINE"; - case 33: - return "OBJECT_RULE"; - case 34: - return "OBJECT_SCHEMA"; - case 35: - return "OBJECT_SEQUENCE"; - case 36: - return "OBJECT_SUBSCRIPTION"; - case 37: - return "OBJECT_STATISTIC_EXT"; - case 38: - return "OBJECT_TABCONSTRAINT"; - case 39: - return "OBJECT_TABLE"; - case 40: - return "OBJECT_TABLESPACE"; - case 41: - return "OBJECT_TRANSFORM"; - case 42: - return "OBJECT_TRIGGER"; - case 43: - return "OBJECT_TSCONFIGURATION"; - case 44: - return "OBJECT_TSDICTIONARY"; - case 45: - return "OBJECT_TSPARSER"; - case 46: - return "OBJECT_TSTEMPLATE"; - case 47: - return "OBJECT_TYPE"; - case 48: - return "OBJECT_USER_MAPPING"; - case 49: - return "OBJECT_VIEW"; - default: - throw new Error("Value not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case 0: - return "DROP_RESTRICT"; - case 1: - return "DROP_CASCADE"; - default: - throw new Error("Value not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case 0: - return "AT_AddColumn"; - case 1: - return "AT_AddColumnRecurse"; - case 2: - return "AT_AddColumnToView"; - case 3: - return "AT_ColumnDefault"; - case 4: - return "AT_CookedColumnDefault"; - case 5: - return "AT_DropNotNull"; - case 6: - return "AT_SetNotNull"; - case 7: - return "AT_DropExpression"; - case 8: - return "AT_CheckNotNull"; - case 9: - return "AT_SetStatistics"; - case 10: - return "AT_SetOptions"; - case 11: - return "AT_ResetOptions"; - case 12: - return "AT_SetStorage"; - case 13: - return "AT_DropColumn"; - case 14: - return "AT_DropColumnRecurse"; - case 15: - return "AT_AddIndex"; - case 16: - return "AT_ReAddIndex"; - case 17: - return "AT_AddConstraint"; - case 18: - return "AT_AddConstraintRecurse"; - case 19: - return "AT_ReAddConstraint"; - case 20: - return "AT_ReAddDomainConstraint"; - case 21: - return "AT_AlterConstraint"; - case 22: - return "AT_ValidateConstraint"; - case 23: - return "AT_ValidateConstraintRecurse"; - case 24: - return "AT_AddIndexConstraint"; - case 25: - return "AT_DropConstraint"; - case 26: - return "AT_DropConstraintRecurse"; - case 27: - return "AT_ReAddComment"; - case 28: - return "AT_AlterColumnType"; - case 29: - return "AT_AlterColumnGenericOptions"; - case 30: - return "AT_ChangeOwner"; - case 31: - return "AT_ClusterOn"; - case 32: - return "AT_DropCluster"; - case 33: - return "AT_SetLogged"; - case 34: - return "AT_SetUnLogged"; - case 35: - return "AT_DropOids"; - case 36: - return "AT_SetTableSpace"; - case 37: - return "AT_SetRelOptions"; - case 38: - return "AT_ResetRelOptions"; - case 39: - return "AT_ReplaceRelOptions"; - case 40: - return "AT_EnableTrig"; - case 41: - return "AT_EnableAlwaysTrig"; - case 42: - return "AT_EnableReplicaTrig"; - case 43: - return "AT_DisableTrig"; - case 44: - return "AT_EnableTrigAll"; - case 45: - return "AT_DisableTrigAll"; - case 46: - return "AT_EnableTrigUser"; - case 47: - return "AT_DisableTrigUser"; - case 48: - return "AT_EnableRule"; - case 49: - return "AT_EnableAlwaysRule"; - case 50: - return "AT_EnableReplicaRule"; - case 51: - return "AT_DisableRule"; - case 52: - return "AT_AddInherit"; - case 53: - return "AT_DropInherit"; - case 54: - return "AT_AddOf"; - case 55: - return "AT_DropOf"; - case 56: - return "AT_ReplicaIdentity"; - case 57: - return "AT_EnableRowSecurity"; - case 58: - return "AT_DisableRowSecurity"; - case 59: - return "AT_ForceRowSecurity"; - case 60: - return "AT_NoForceRowSecurity"; - case 61: - return "AT_GenericOptions"; - case 62: - return "AT_AttachPartition"; - case 63: - return "AT_DetachPartition"; - case 64: - return "AT_AddIdentity"; - case 65: - return "AT_SetIdentity"; - case 66: - return "AT_DropIdentity"; - default: - throw new Error("Value not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case 0: - return "ACL_TARGET_OBJECT"; - case 1: - return "ACL_TARGET_ALL_IN_SCHEMA"; - case 2: - return "ACL_TARGET_DEFAULTS"; - default: - throw new Error("Value not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case 0: - return "VAR_SET_VALUE"; - case 1: - return "VAR_SET_DEFAULT"; - case 2: - return "VAR_SET_CURRENT"; - case 3: - return "VAR_SET_MULTI"; - case 4: - return "VAR_RESET"; - case 5: - return "VAR_RESET_ALL"; - default: - throw new Error("Value not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case 0: - return "CONSTR_NULL"; - case 1: - return "CONSTR_NOTNULL"; - case 2: - return "CONSTR_DEFAULT"; - case 3: - return "CONSTR_IDENTITY"; - case 4: - return "CONSTR_GENERATED"; - case 5: - return "CONSTR_CHECK"; - case 6: - return "CONSTR_PRIMARY"; - case 7: - return "CONSTR_UNIQUE"; - case 8: - return "CONSTR_EXCLUSION"; - case 9: - return "CONSTR_FOREIGN"; - case 10: - return "CONSTR_ATTR_DEFERRABLE"; - case 11: - return "CONSTR_ATTR_NOT_DEFERRABLE"; - case 12: - return "CONSTR_ATTR_DEFERRED"; - case 13: - return "CONSTR_ATTR_IMMEDIATE"; - default: - throw new Error("Value not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case 0: - return "FDW_IMPORT_SCHEMA_ALL"; - case 1: - return "FDW_IMPORT_SCHEMA_LIMIT_TO"; - case 2: - return "FDW_IMPORT_SCHEMA_EXCEPT"; - default: - throw new Error("Value not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case 0: - return "ROLESTMT_ROLE"; - case 1: - return "ROLESTMT_USER"; - case 2: - return "ROLESTMT_GROUP"; - default: - throw new Error("Value not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case 0: - return "FETCH_FORWARD"; - case 1: - return "FETCH_BACKWARD"; - case 2: - return "FETCH_ABSOLUTE"; - case 3: - return "FETCH_RELATIVE"; - default: - throw new Error("Value not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case 0: - return "FUNC_PARAM_IN"; - case 1: - return "FUNC_PARAM_OUT"; - case 2: - return "FUNC_PARAM_INOUT"; - case 3: - return "FUNC_PARAM_VARIADIC"; - case 4: - return "FUNC_PARAM_TABLE"; - default: - throw new Error("Value not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case 0: - return "TRANS_STMT_BEGIN"; - case 1: - return "TRANS_STMT_START"; - case 2: - return "TRANS_STMT_COMMIT"; - case 3: - return "TRANS_STMT_ROLLBACK"; - case 4: - return "TRANS_STMT_SAVEPOINT"; - case 5: - return "TRANS_STMT_RELEASE"; - case 6: - return "TRANS_STMT_ROLLBACK_TO"; - case 7: - return "TRANS_STMT_PREPARE"; - case 8: - return "TRANS_STMT_COMMIT_PREPARED"; - case 9: - return "TRANS_STMT_ROLLBACK_PREPARED"; - default: - throw new Error("Value not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case 0: - return "NO_CHECK_OPTION"; - case 1: - return "LOCAL_CHECK_OPTION"; - case 2: - return "CASCADED_CHECK_OPTION"; - default: - throw new Error("Value not recognized in enum ViewCheckOption"); - } - } - case "ClusterOption": - { - switch (key) { - case 0: - return "CLUOPT_RECHECK"; - case 1: - return "CLUOPT_VERBOSE"; - default: - throw new Error("Value not recognized in enum ClusterOption"); - } - } - case "DiscardMode": - { - switch (key) { - case 0: - return "DISCARD_ALL"; - case 1: - return "DISCARD_PLANS"; - case 2: - return "DISCARD_SEQUENCES"; - case 3: - return "DISCARD_TEMP"; - default: - throw new Error("Value not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case 0: - return "REINDEX_OBJECT_INDEX"; - case 1: - return "REINDEX_OBJECT_TABLE"; - case 2: - return "REINDEX_OBJECT_SCHEMA"; - case 3: - return "REINDEX_OBJECT_SYSTEM"; - case 4: - return "REINDEX_OBJECT_DATABASE"; - default: - throw new Error("Value not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case 0: - return "ALTER_TSCONFIG_ADD_MAPPING"; - case 1: - return "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN"; - case 2: - return "ALTER_TSCONFIG_REPLACE_DICT"; - case 3: - return "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN"; - case 4: - return "ALTER_TSCONFIG_DROP_MAPPING"; - default: - throw new Error("Value not recognized in enum AlterTSConfigType"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case 0: - return "ALTER_SUBSCRIPTION_OPTIONS"; - case 1: - return "ALTER_SUBSCRIPTION_CONNECTION"; - case 2: - return "ALTER_SUBSCRIPTION_PUBLICATION"; - case 3: - return "ALTER_SUBSCRIPTION_REFRESH"; - case 4: - return "ALTER_SUBSCRIPTION_ENABLED"; - default: - throw new Error("Value not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case 0: - return "ONCOMMIT_NOOP"; - case 1: - return "ONCOMMIT_PRESERVE_ROWS"; - case 2: - return "ONCOMMIT_DELETE_ROWS"; - case 3: - return "ONCOMMIT_DROP"; - default: - throw new Error("Value not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case 0: - return "PARAM_EXTERN"; - case 1: - return "PARAM_EXEC"; - case 2: - return "PARAM_SUBLINK"; - case 3: - return "PARAM_MULTIEXPR"; - default: - throw new Error("Value not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case 0: - return "COERCION_IMPLICIT"; - case 1: - return "COERCION_ASSIGNMENT"; - case 2: - return "COERCION_EXPLICIT"; - default: - throw new Error("Value not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case 0: - return "COERCE_EXPLICIT_CALL"; - case 1: - return "COERCE_EXPLICIT_CAST"; - case 2: - return "COERCE_IMPLICIT_CAST"; - default: - throw new Error("Value not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case 0: - return "AND_EXPR"; - case 1: - return "OR_EXPR"; - case 2: - return "NOT_EXPR"; - default: - throw new Error("Value not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case 0: - return "EXISTS_SUBLINK"; - case 1: - return "ALL_SUBLINK"; - case 2: - return "ANY_SUBLINK"; - case 3: - return "ROWCOMPARE_SUBLINK"; - case 4: - return "EXPR_SUBLINK"; - case 5: - return "MULTIEXPR_SUBLINK"; - case 6: - return "ARRAY_SUBLINK"; - case 7: - return "CTE_SUBLINK"; - default: - throw new Error("Value not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case 0: - return "ROWCOMPARE_LT"; - case 1: - return "ROWCOMPARE_LE"; - case 2: - return "ROWCOMPARE_EQ"; - case 3: - return "ROWCOMPARE_GE"; - case 4: - return "ROWCOMPARE_GT"; - case 5: - return "ROWCOMPARE_NE"; - default: - throw new Error("Value not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case 0: - return "IS_GREATEST"; - case 1: - return "IS_LEAST"; - default: - throw new Error("Value not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case 0: - return "SVFOP_CURRENT_DATE"; - case 1: - return "SVFOP_CURRENT_TIME"; - case 2: - return "SVFOP_CURRENT_TIME_N"; - case 3: - return "SVFOP_CURRENT_TIMESTAMP"; - case 4: - return "SVFOP_CURRENT_TIMESTAMP_N"; - case 5: - return "SVFOP_LOCALTIME"; - case 6: - return "SVFOP_LOCALTIME_N"; - case 7: - return "SVFOP_LOCALTIMESTAMP"; - case 8: - return "SVFOP_LOCALTIMESTAMP_N"; - case 9: - return "SVFOP_CURRENT_ROLE"; - case 10: - return "SVFOP_CURRENT_USER"; - case 11: - return "SVFOP_USER"; - case 12: - return "SVFOP_SESSION_USER"; - case 13: - return "SVFOP_CURRENT_CATALOG"; - case 14: - return "SVFOP_CURRENT_SCHEMA"; - default: - throw new Error("Value not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case 0: - return "IS_XMLCONCAT"; - case 1: - return "IS_XMLELEMENT"; - case 2: - return "IS_XMLFOREST"; - case 3: - return "IS_XMLPARSE"; - case 4: - return "IS_XMLPI"; - case 5: - return "IS_XMLROOT"; - case 6: - return "IS_XMLSERIALIZE"; - case 7: - return "IS_DOCUMENT"; - default: - throw new Error("Value not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case 0: - return "XMLOPTION_DOCUMENT"; - case 1: - return "XMLOPTION_CONTENT"; - default: - throw new Error("Value not recognized in enum XmlOptionType"); - } - } - case "NullTestType": - { - switch (key) { - case 0: - return "IS_NULL"; - case 1: - return "IS_NOT_NULL"; - default: - throw new Error("Value not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case 0: - return "IS_TRUE"; - case 1: - return "IS_NOT_TRUE"; - case 2: - return "IS_FALSE"; - case 3: - return "IS_NOT_FALSE"; - case 4: - return "IS_UNKNOWN"; - case 5: - return "IS_NOT_UNKNOWN"; - default: - throw new Error("Value not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case 0: - return "CMD_UNKNOWN"; - case 1: - return "CMD_SELECT"; - case 2: - return "CMD_UPDATE"; - case 3: - return "CMD_INSERT"; - case 4: - return "CMD_DELETE"; - case 5: - return "CMD_UTILITY"; - case 6: - return "CMD_NOTHING"; - default: - throw new Error("Value not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case 0: - return "JOIN_INNER"; - case 1: - return "JOIN_LEFT"; - case 2: - return "JOIN_FULL"; - case 3: - return "JOIN_RIGHT"; - case 4: - return "JOIN_SEMI"; - case 5: - return "JOIN_ANTI"; - case 6: - return "JOIN_UNIQUE_OUTER"; - case 7: - return "JOIN_UNIQUE_INNER"; - default: - throw new Error("Value not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case 0: - return "AGG_PLAIN"; - case 1: - return "AGG_SORTED"; - case 2: - return "AGG_HASHED"; - case 3: - return "AGG_MIXED"; - default: - throw new Error("Value not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case 0: - return "AGGSPLIT_SIMPLE"; - case 1: - return "AGGSPLIT_INITIAL_SERIAL"; - case 2: - return "AGGSPLIT_FINAL_DESERIAL"; - default: - throw new Error("Value not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case 0: - return "SETOPCMD_INTERSECT"; - case 1: - return "SETOPCMD_INTERSECT_ALL"; - case 2: - return "SETOPCMD_EXCEPT"; - case 3: - return "SETOPCMD_EXCEPT_ALL"; - default: - throw new Error("Value not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case 0: - return "SETOP_SORTED"; - case 1: - return "SETOP_HASHED"; - default: - throw new Error("Value not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case 0: - return "ONCONFLICT_NONE"; - case 1: - return "ONCONFLICT_NOTHING"; - case 2: - return "ONCONFLICT_UPDATE"; - default: - throw new Error("Value not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case 0: - return "LIMIT_OPTION_DEFAULT"; - case 1: - return "LIMIT_OPTION_COUNT"; - case 2: - return "LIMIT_OPTION_WITH_TIES"; - default: - throw new Error("Value not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case 0: - return "LCS_NONE"; - case 1: - return "LCS_FORKEYSHARE"; - case 2: - return "LCS_FORSHARE"; - case 3: - return "LCS_FORNOKEYUPDATE"; - case 4: - return "LCS_FORUPDATE"; - default: - throw new Error("Value not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case 0: - return "LockWaitBlock"; - case 1: - return "LockWaitSkip"; - case 2: - return "LockWaitError"; - default: - throw new Error("Value not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case 0: - return "LockTupleKeyShare"; - case 1: - return "LockTupleShare"; - case 2: - return "LockTupleNoKeyExclusive"; - case 3: - return "LockTupleExclusive"; - default: - throw new Error("Value not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case 0: - return "NO_KEYWORD"; - case 1: - return "UNRESERVED_KEYWORD"; - case 2: - return "COL_NAME_KEYWORD"; - case 3: - return "TYPE_FUNC_NAME_KEYWORD"; - case 4: - return "RESERVED_KEYWORD"; - default: - throw new Error("Value not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case 0: - return "NUL"; - case 37: - return "ASCII_37"; - case 40: - return "ASCII_40"; - case 41: - return "ASCII_41"; - case 42: - return "ASCII_42"; - case 43: - return "ASCII_43"; - case 44: - return "ASCII_44"; - case 45: - return "ASCII_45"; - case 46: - return "ASCII_46"; - case 47: - return "ASCII_47"; - case 58: - return "ASCII_58"; - case 59: - return "ASCII_59"; - case 60: - return "ASCII_60"; - case 61: - return "ASCII_61"; - case 62: - return "ASCII_62"; - case 63: - return "ASCII_63"; - case 91: - return "ASCII_91"; - case 92: - return "ASCII_92"; - case 93: - return "ASCII_93"; - case 94: - return "ASCII_94"; - case 258: - return "IDENT"; - case 259: - return "UIDENT"; - case 260: - return "FCONST"; - case 261: - return "SCONST"; - case 262: - return "USCONST"; - case 263: - return "BCONST"; - case 264: - return "XCONST"; - case 265: - return "Op"; - case 266: - return "ICONST"; - case 267: - return "PARAM"; - case 268: - return "TYPECAST"; - case 269: - return "DOT_DOT"; - case 270: - return "COLON_EQUALS"; - case 271: - return "EQUALS_GREATER"; - case 272: - return "LESS_EQUALS"; - case 273: - return "GREATER_EQUALS"; - case 274: - return "NOT_EQUALS"; - case 275: - return "SQL_COMMENT"; - case 276: - return "C_COMMENT"; - case 277: - return "ABORT_P"; - case 278: - return "ABSOLUTE_P"; - case 279: - return "ACCESS"; - case 280: - return "ACTION"; - case 281: - return "ADD_P"; - case 282: - return "ADMIN"; - case 283: - return "AFTER"; - case 284: - return "AGGREGATE"; - case 285: - return "ALL"; - case 286: - return "ALSO"; - case 287: - return "ALTER"; - case 288: - return "ALWAYS"; - case 289: - return "ANALYSE"; - case 290: - return "ANALYZE"; - case 291: - return "AND"; - case 292: - return "ANY"; - case 293: - return "ARRAY"; - case 294: - return "AS"; - case 295: - return "ASC"; - case 296: - return "ASSERTION"; - case 297: - return "ASSIGNMENT"; - case 298: - return "ASYMMETRIC"; - case 299: - return "AT"; - case 300: - return "ATTACH"; - case 301: - return "ATTRIBUTE"; - case 302: - return "AUTHORIZATION"; - case 303: - return "BACKWARD"; - case 304: - return "BEFORE"; - case 305: - return "BEGIN_P"; - case 306: - return "BETWEEN"; - case 307: - return "BIGINT"; - case 308: - return "BINARY"; - case 309: - return "BIT"; - case 310: - return "BOOLEAN_P"; - case 311: - return "BOTH"; - case 312: - return "BY"; - case 313: - return "CACHE"; - case 314: - return "CALL"; - case 315: - return "CALLED"; - case 316: - return "CASCADE"; - case 317: - return "CASCADED"; - case 318: - return "CASE"; - case 319: - return "CAST"; - case 320: - return "CATALOG_P"; - case 321: - return "CHAIN"; - case 322: - return "CHAR_P"; - case 323: - return "CHARACTER"; - case 324: - return "CHARACTERISTICS"; - case 325: - return "CHECK"; - case 326: - return "CHECKPOINT"; - case 327: - return "CLASS"; - case 328: - return "CLOSE"; - case 329: - return "CLUSTER"; - case 330: - return "COALESCE"; - case 331: - return "COLLATE"; - case 332: - return "COLLATION"; - case 333: - return "COLUMN"; - case 334: - return "COLUMNS"; - case 335: - return "COMMENT"; - case 336: - return "COMMENTS"; - case 337: - return "COMMIT"; - case 338: - return "COMMITTED"; - case 339: - return "CONCURRENTLY"; - case 340: - return "CONFIGURATION"; - case 341: - return "CONFLICT"; - case 342: - return "CONNECTION"; - case 343: - return "CONSTRAINT"; - case 344: - return "CONSTRAINTS"; - case 345: - return "CONTENT_P"; - case 346: - return "CONTINUE_P"; - case 347: - return "CONVERSION_P"; - case 348: - return "COPY"; - case 349: - return "COST"; - case 350: - return "CREATE"; - case 351: - return "CROSS"; - case 352: - return "CSV"; - case 353: - return "CUBE"; - case 354: - return "CURRENT_P"; - case 355: - return "CURRENT_CATALOG"; - case 356: - return "CURRENT_DATE"; - case 357: - return "CURRENT_ROLE"; - case 358: - return "CURRENT_SCHEMA"; - case 359: - return "CURRENT_TIME"; - case 360: - return "CURRENT_TIMESTAMP"; - case 361: - return "CURRENT_USER"; - case 362: - return "CURSOR"; - case 363: - return "CYCLE"; - case 364: - return "DATA_P"; - case 365: - return "DATABASE"; - case 366: - return "DAY_P"; - case 367: - return "DEALLOCATE"; - case 368: - return "DEC"; - case 369: - return "DECIMAL_P"; - case 370: - return "DECLARE"; - case 371: - return "DEFAULT"; - case 372: - return "DEFAULTS"; - case 373: - return "DEFERRABLE"; - case 374: - return "DEFERRED"; - case 375: - return "DEFINER"; - case 376: - return "DELETE_P"; - case 377: - return "DELIMITER"; - case 378: - return "DELIMITERS"; - case 379: - return "DEPENDS"; - case 380: - return "DESC"; - case 381: - return "DETACH"; - case 382: - return "DICTIONARY"; - case 383: - return "DISABLE_P"; - case 384: - return "DISCARD"; - case 385: - return "DISTINCT"; - case 386: - return "DO"; - case 387: - return "DOCUMENT_P"; - case 388: - return "DOMAIN_P"; - case 389: - return "DOUBLE_P"; - case 390: - return "DROP"; - case 391: - return "EACH"; - case 392: - return "ELSE"; - case 393: - return "ENABLE_P"; - case 394: - return "ENCODING"; - case 395: - return "ENCRYPTED"; - case 396: - return "END_P"; - case 397: - return "ENUM_P"; - case 398: - return "ESCAPE"; - case 399: - return "EVENT"; - case 400: - return "EXCEPT"; - case 401: - return "EXCLUDE"; - case 402: - return "EXCLUDING"; - case 403: - return "EXCLUSIVE"; - case 404: - return "EXECUTE"; - case 405: - return "EXISTS"; - case 406: - return "EXPLAIN"; - case 407: - return "EXPRESSION"; - case 408: - return "EXTENSION"; - case 409: - return "EXTERNAL"; - case 410: - return "EXTRACT"; - case 411: - return "FALSE_P"; - case 412: - return "FAMILY"; - case 413: - return "FETCH"; - case 414: - return "FILTER"; - case 415: - return "FIRST_P"; - case 416: - return "FLOAT_P"; - case 417: - return "FOLLOWING"; - case 418: - return "FOR"; - case 419: - return "FORCE"; - case 420: - return "FOREIGN"; - case 421: - return "FORWARD"; - case 422: - return "FREEZE"; - case 423: - return "FROM"; - case 424: - return "FULL"; - case 425: - return "FUNCTION"; - case 426: - return "FUNCTIONS"; - case 427: - return "GENERATED"; - case 428: - return "GLOBAL"; - case 429: - return "GRANT"; - case 430: - return "GRANTED"; - case 431: - return "GREATEST"; - case 432: - return "GROUP_P"; - case 433: - return "GROUPING"; - case 434: - return "GROUPS"; - case 435: - return "HANDLER"; - case 436: - return "HAVING"; - case 437: - return "HEADER_P"; - case 438: - return "HOLD"; - case 439: - return "HOUR_P"; - case 440: - return "IDENTITY_P"; - case 441: - return "IF_P"; - case 442: - return "ILIKE"; - case 443: - return "IMMEDIATE"; - case 444: - return "IMMUTABLE"; - case 445: - return "IMPLICIT_P"; - case 446: - return "IMPORT_P"; - case 447: - return "IN_P"; - case 448: - return "INCLUDE"; - case 449: - return "INCLUDING"; - case 450: - return "INCREMENT"; - case 451: - return "INDEX"; - case 452: - return "INDEXES"; - case 453: - return "INHERIT"; - case 454: - return "INHERITS"; - case 455: - return "INITIALLY"; - case 456: - return "INLINE_P"; - case 457: - return "INNER_P"; - case 458: - return "INOUT"; - case 459: - return "INPUT_P"; - case 460: - return "INSENSITIVE"; - case 461: - return "INSERT"; - case 462: - return "INSTEAD"; - case 463: - return "INT_P"; - case 464: - return "INTEGER"; - case 465: - return "INTERSECT"; - case 466: - return "INTERVAL"; - case 467: - return "INTO"; - case 468: - return "INVOKER"; - case 469: - return "IS"; - case 470: - return "ISNULL"; - case 471: - return "ISOLATION"; - case 472: - return "JOIN"; - case 473: - return "KEY"; - case 474: - return "LABEL"; - case 475: - return "LANGUAGE"; - case 476: - return "LARGE_P"; - case 477: - return "LAST_P"; - case 478: - return "LATERAL_P"; - case 479: - return "LEADING"; - case 480: - return "LEAKPROOF"; - case 481: - return "LEAST"; - case 482: - return "LEFT"; - case 483: - return "LEVEL"; - case 484: - return "LIKE"; - case 485: - return "LIMIT"; - case 486: - return "LISTEN"; - case 487: - return "LOAD"; - case 488: - return "LOCAL"; - case 489: - return "LOCALTIME"; - case 490: - return "LOCALTIMESTAMP"; - case 491: - return "LOCATION"; - case 492: - return "LOCK_P"; - case 493: - return "LOCKED"; - case 494: - return "LOGGED"; - case 495: - return "MAPPING"; - case 496: - return "MATCH"; - case 497: - return "MATERIALIZED"; - case 498: - return "MAXVALUE"; - case 499: - return "METHOD"; - case 500: - return "MINUTE_P"; - case 501: - return "MINVALUE"; - case 502: - return "MODE"; - case 503: - return "MONTH_P"; - case 504: - return "MOVE"; - case 505: - return "NAME_P"; - case 506: - return "NAMES"; - case 507: - return "NATIONAL"; - case 508: - return "NATURAL"; - case 509: - return "NCHAR"; - case 510: - return "NEW"; - case 511: - return "NEXT"; - case 512: - return "NFC"; - case 513: - return "NFD"; - case 514: - return "NFKC"; - case 515: - return "NFKD"; - case 516: - return "NO"; - case 517: - return "NONE"; - case 518: - return "NORMALIZE"; - case 519: - return "NORMALIZED"; - case 520: - return "NOT"; - case 521: - return "NOTHING"; - case 522: - return "NOTIFY"; - case 523: - return "NOTNULL"; - case 524: - return "NOWAIT"; - case 525: - return "NULL_P"; - case 526: - return "NULLIF"; - case 527: - return "NULLS_P"; - case 528: - return "NUMERIC"; - case 529: - return "OBJECT_P"; - case 530: - return "OF"; - case 531: - return "OFF"; - case 532: - return "OFFSET"; - case 533: - return "OIDS"; - case 534: - return "OLD"; - case 535: - return "ON"; - case 536: - return "ONLY"; - case 537: - return "OPERATOR"; - case 538: - return "OPTION"; - case 539: - return "OPTIONS"; - case 540: - return "OR"; - case 541: - return "ORDER"; - case 542: - return "ORDINALITY"; - case 543: - return "OTHERS"; - case 544: - return "OUT_P"; - case 545: - return "OUTER_P"; - case 546: - return "OVER"; - case 547: - return "OVERLAPS"; - case 548: - return "OVERLAY"; - case 549: - return "OVERRIDING"; - case 550: - return "OWNED"; - case 551: - return "OWNER"; - case 552: - return "PARALLEL"; - case 553: - return "PARSER"; - case 554: - return "PARTIAL"; - case 555: - return "PARTITION"; - case 556: - return "PASSING"; - case 557: - return "PASSWORD"; - case 558: - return "PLACING"; - case 559: - return "PLANS"; - case 560: - return "POLICY"; - case 561: - return "POSITION"; - case 562: - return "PRECEDING"; - case 563: - return "PRECISION"; - case 564: - return "PRESERVE"; - case 565: - return "PREPARE"; - case 566: - return "PREPARED"; - case 567: - return "PRIMARY"; - case 568: - return "PRIOR"; - case 569: - return "PRIVILEGES"; - case 570: - return "PROCEDURAL"; - case 571: - return "PROCEDURE"; - case 572: - return "PROCEDURES"; - case 573: - return "PROGRAM"; - case 574: - return "PUBLICATION"; - case 575: - return "QUOTE"; - case 576: - return "RANGE"; - case 577: - return "READ"; - case 578: - return "REAL"; - case 579: - return "REASSIGN"; - case 580: - return "RECHECK"; - case 581: - return "RECURSIVE"; - case 582: - return "REF_P"; - case 583: - return "REFERENCES"; - case 584: - return "REFERENCING"; - case 585: - return "REFRESH"; - case 586: - return "REINDEX"; - case 587: - return "RELATIVE_P"; - case 588: - return "RELEASE"; - case 589: - return "RENAME"; - case 590: - return "REPEATABLE"; - case 591: - return "REPLACE"; - case 592: - return "REPLICA"; - case 593: - return "RESET"; - case 594: - return "RESTART"; - case 595: - return "RESTRICT"; - case 596: - return "RETURNING"; - case 597: - return "RETURNS"; - case 598: - return "REVOKE"; - case 599: - return "RIGHT"; - case 600: - return "ROLE"; - case 601: - return "ROLLBACK"; - case 602: - return "ROLLUP"; - case 603: - return "ROUTINE"; - case 604: - return "ROUTINES"; - case 605: - return "ROW"; - case 606: - return "ROWS"; - case 607: - return "RULE"; - case 608: - return "SAVEPOINT"; - case 609: - return "SCHEMA"; - case 610: - return "SCHEMAS"; - case 611: - return "SCROLL"; - case 612: - return "SEARCH"; - case 613: - return "SECOND_P"; - case 614: - return "SECURITY"; - case 615: - return "SELECT"; - case 616: - return "SEQUENCE"; - case 617: - return "SEQUENCES"; - case 618: - return "SERIALIZABLE"; - case 619: - return "SERVER"; - case 620: - return "SESSION"; - case 621: - return "SESSION_USER"; - case 622: - return "SET"; - case 623: - return "SETS"; - case 624: - return "SETOF"; - case 625: - return "SHARE"; - case 626: - return "SHOW"; - case 627: - return "SIMILAR"; - case 628: - return "SIMPLE"; - case 629: - return "SKIP"; - case 630: - return "SMALLINT"; - case 631: - return "SNAPSHOT"; - case 632: - return "SOME"; - case 633: - return "SQL_P"; - case 634: - return "STABLE"; - case 635: - return "STANDALONE_P"; - case 636: - return "START"; - case 637: - return "STATEMENT"; - case 638: - return "STATISTICS"; - case 639: - return "STDIN"; - case 640: - return "STDOUT"; - case 641: - return "STORAGE"; - case 642: - return "STORED"; - case 643: - return "STRICT_P"; - case 644: - return "STRIP_P"; - case 645: - return "SUBSCRIPTION"; - case 646: - return "SUBSTRING"; - case 647: - return "SUPPORT"; - case 648: - return "SYMMETRIC"; - case 649: - return "SYSID"; - case 650: - return "SYSTEM_P"; - case 651: - return "TABLE"; - case 652: - return "TABLES"; - case 653: - return "TABLESAMPLE"; - case 654: - return "TABLESPACE"; - case 655: - return "TEMP"; - case 656: - return "TEMPLATE"; - case 657: - return "TEMPORARY"; - case 658: - return "TEXT_P"; - case 659: - return "THEN"; - case 660: - return "TIES"; - case 661: - return "TIME"; - case 662: - return "TIMESTAMP"; - case 663: - return "TO"; - case 664: - return "TRAILING"; - case 665: - return "TRANSACTION"; - case 666: - return "TRANSFORM"; - case 667: - return "TREAT"; - case 668: - return "TRIGGER"; - case 669: - return "TRIM"; - case 670: - return "TRUE_P"; - case 671: - return "TRUNCATE"; - case 672: - return "TRUSTED"; - case 673: - return "TYPE_P"; - case 674: - return "TYPES_P"; - case 675: - return "UESCAPE"; - case 676: - return "UNBOUNDED"; - case 677: - return "UNCOMMITTED"; - case 678: - return "UNENCRYPTED"; - case 679: - return "UNION"; - case 680: - return "UNIQUE"; - case 681: - return "UNKNOWN"; - case 682: - return "UNLISTEN"; - case 683: - return "UNLOGGED"; - case 684: - return "UNTIL"; - case 685: - return "UPDATE"; - case 686: - return "USER"; - case 687: - return "USING"; - case 688: - return "VACUUM"; - case 689: - return "VALID"; - case 690: - return "VALIDATE"; - case 691: - return "VALIDATOR"; - case 692: - return "VALUE_P"; - case 693: - return "VALUES"; - case 694: - return "VARCHAR"; - case 695: - return "VARIADIC"; - case 696: - return "VARYING"; - case 697: - return "VERBOSE"; - case 698: - return "VERSION_P"; - case 699: - return "VIEW"; - case 700: - return "VIEWS"; - case 701: - return "VOLATILE"; - case 702: - return "WHEN"; - case 703: - return "WHERE"; - case 704: - return "WHITESPACE_P"; - case 705: - return "WINDOW"; - case 706: - return "WITH"; - case 707: - return "WITHIN"; - case 708: - return "WITHOUT"; - case 709: - return "WORK"; - case 710: - return "WRAPPER"; - case 711: - return "WRITE"; - case 712: - return "XML_P"; - case 713: - return "XMLATTRIBUTES"; - case 714: - return "XMLCONCAT"; - case 715: - return "XMLELEMENT"; - case 716: - return "XMLEXISTS"; - case 717: - return "XMLFOREST"; - case 718: - return "XMLNAMESPACES"; - case 719: - return "XMLPARSE"; - case 720: - return "XMLPI"; - case 721: - return "XMLROOT"; - case 722: - return "XMLSERIALIZE"; - case 723: - return "XMLTABLE"; - case 724: - return "YEAR_P"; - case 725: - return "YES_P"; - case 726: - return "ZONE"; - case 727: - return "NOT_LA"; - case 728: - return "NULLS_LA"; - case 729: - return "WITH_LA"; - case 730: - return "POSTFIXOP"; - case 731: - return "UMINUS"; - default: - throw new Error("Value not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/13/runtime-schema.ts b/packages/transform/src/13/runtime-schema.ts deleted file mode 100644 index c67bbcca..00000000 --- a/packages/transform/src/13/runtime-schema.ts +++ /dev/null @@ -1,8440 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export interface FieldSpec { - name: string; - type: string; - isArray: boolean; - optional: boolean; -} -export interface NodeSpec { - name: string; - isNode: boolean; - fields: FieldSpec[]; -} -export const runtimeSchema: NodeSpec[] = [ - { - name: 'A_ArrayExpr', - isNode: true, - fields: [ - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Const', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Expr', - isNode: true, - fields: [ - { - name: 'kind', - type: 'A_Expr_Kind', - isArray: false, - optional: true - }, - { - name: 'lexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indices', - isNode: true, - fields: [ - { - name: 'is_slice', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lidx', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'uidx', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indirection', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'A_Star', - isNode: true, - fields: [ - - ] - }, - { - name: 'AccessPriv', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'priv_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Aggref', - isNode: true, - fields: [ - { - name: 'aggargtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggdirectargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggdistinct', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'aggfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggorder', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggsplit', - type: 'AggSplit', - isArray: false, - optional: true - }, - { - name: 'aggstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'aggtranstype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Alias', - isNode: true, - fields: [ - { - name: 'aliasname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterCollationStmt', - isNode: true, - fields: [ - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDatabaseSetStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterDatabaseStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDefaultPrivilegesStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'GrantStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDomainStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEnumStmt', - isNode: true, - fields: [ - { - name: 'newVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newValIsAfter', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newValNeighbor', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'oldVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'skipIfNewValExists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEventTrigStmt', - isNode: true, - fields: [ - { - name: 'tgenabled', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionContentsStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterForeignServerStmt', - isNode: true, - fields: [ - { - name: 'has_version', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterFunctionStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlternativeSubPlan', - isNode: true, - fields: [ - { - name: 'subplans', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectDependsStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'remove', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectSchemaStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newschema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterOperatorStmt', - isNode: true, - fields: [ - { - name: 'opername', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'isDrop', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOwnerStmt', - isNode: true, - fields: [ - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPolicyStmt', - isNode: true, - fields: [ - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPublicationStmt', - isNode: true, - fields: [ - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'tableAction', - type: 'DefElemAction', - isArray: false, - optional: true - }, - { - name: 'tables', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterRoleSetStmt', - isNode: true, - fields: [ - { - name: 'database', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterRoleStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'stxstattarget', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'AlterSubscriptionType', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSystemStmt', - isNode: true, - fields: [ - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableCmd', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'num', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recurse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'AlterTableType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableMoveAllStmt', - isNode: true, - fields: [ - { - name: 'new_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'orig_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTableSpaceOptionsStmt', - isNode: true, - fields: [ - { - name: 'isReset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableStmt', - isNode: true, - fields: [ - { - name: 'cmds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relkind', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTSConfigurationStmt', - isNode: true, - fields: [ - { - name: 'cfgname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'dicts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'AlterTSConfigType', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tokentype', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTSDictionaryStmt', - isNode: true, - fields: [ - { - name: 'dictname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTypeStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterUserMappingStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayCoerceExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'elemexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayExpr', - isNode: true, - fields: [ - { - name: 'array_collid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'array_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'element_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'multidims', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BitString', - isNode: true, - fields: [ - { - name: 'str', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'BooleanTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'booltesttype', - type: 'BoolTestType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BoolExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'boolop', - type: 'BoolExprType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallContext', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallStmt', - isNode: true, - fields: [ - { - name: 'funccall', - type: 'FuncCall', - isArray: false, - optional: true - }, - { - name: 'funcexpr', - type: 'FuncExpr', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'casecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'casetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'defresult', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseTestExpr', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseWhen', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'result', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CheckPointStmt', - isNode: true, - fields: [ - - ] - }, - { - name: 'ClosePortalStmt', - isNode: true, - fields: [ - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ClusterStmt', - isNode: true, - fields: [ - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoalesceExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coalescecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'coalescetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomain', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coercionformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomainValue', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceViaIO', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateClause', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnDef', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cooked_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fdwoptions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'generated', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identity', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identitySequence', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'inhcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'is_from_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'raw_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'storage', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnRef', - isNode: true, - fields: [ - { - name: 'fields', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommentStmt', - isNode: true, - fields: [ - { - name: 'comment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommonTableExpr', - isNode: true, - fields: [ - { - name: 'aliascolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctematerialized', - type: 'CTEMaterialize', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'ctequery', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cterecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'cterefcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CompositeTypeStmt', - isNode: true, - fields: [ - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typevar', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'Constraint', - isNode: true, - fields: [ - { - name: 'access_method', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'contype', - type: 'ConstrType', - isArray: false, - optional: true - }, - { - name: 'cooked_expr', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'exclusions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_del_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_matchtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_upd_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'generated_when', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'including', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexspace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'initially_valid', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_no_inherit', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'keys', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'old_conpfeqop', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'old_pktable_oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pktable', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'raw_expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'skip_validation', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'where_clause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConstraintsSetStmt', - isNode: true, - fields: [ - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'deferred', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConvertRowtypeExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'convertformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CopyStmt', - isNode: true, - fields: [ - { - name: 'attlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'is_from', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_program', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateAmStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'amtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'handler_name', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateCastStmt', - isNode: true, - fields: [ - { - name: 'context', - type: 'CoercionContext', - isArray: false, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'inout', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sourcetype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'targettype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateConversionStmt', - isNode: true, - fields: [ - { - name: 'conversion_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'def', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'for_encoding_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'to_encoding_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatedbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateDomainStmt', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'domainname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateEnumStmt', - isNode: true, - fields: [ - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'vals', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateEventTrigStmt', - isNode: true, - fields: [ - { - name: 'eventname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenclause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateForeignServerStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'servertype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateForeignTableStmt', - isNode: true, - fields: [ - { - name: 'base', - type: 'CreateStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateFunctionStmt', - isNode: true, - fields: [ - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_procedure', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parameters', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'returnType', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassItem', - isNode: true, - fields: [ - { - name: 'class_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'itemtype', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'order_family', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'storedtype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'datatype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'isDefault', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreatePLangStmt', - isNode: true, - fields: [ - { - name: 'plhandler', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plinline', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pltrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'plvalidator', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePolicyStmt', - isNode: true, - fields: [ - { - name: 'cmd_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'permissive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePublicationStmt', - isNode: true, - fields: [ - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'tables', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRangeStmt', - isNode: true, - fields: [ - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRoleStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'stmt_type', - type: 'RoleStmtType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSchemaStmt', - isNode: true, - fields: [ - { - name: 'authrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'schemaElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ownerId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'exprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stat_types', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stxcomment', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inhRelations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ofTypename', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'oncommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partbound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'partspec', - type: 'PartitionSpec', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'tableElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableAsStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'into', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'is_select_into', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relkind', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'location', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'owner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTransformStmt', - isNode: true, - fields: [ - { - name: 'fromsql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'lang', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tosql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'type_name', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTrigStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'constrrel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'events', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'row', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'timing', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'transitionRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateUserMappingStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'CurrentOfExpr', - isNode: true, - fields: [ - { - name: 'cursor_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'cursor_param', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cvarno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeallocateStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeclareCursorStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefElem', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'defaction', - type: 'DefElemAction', - isArray: false, - optional: true - }, - { - name: 'defname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'defnamespace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefineStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'definition', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'oldstyle', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeleteStmt', - isNode: true, - fields: [ - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'DiscardStmt', - isNode: true, - fields: [ - { - name: 'target', - type: 'DiscardMode', - isArray: false, - optional: true - } - ] - }, - { - name: 'DistinctExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DoStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropdbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropOwnedStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropRoleStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'removeType', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropUserMappingStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ExecuteStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ExplainStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Expr', - isNode: true, - fields: [ - - ] - }, - { - name: 'FetchStmt', - isNode: true, - fields: [ - { - name: 'direction', - type: 'FetchDirection', - isArray: false, - optional: true - }, - { - name: 'howMany', - type: 'int64', - isArray: false, - optional: true - }, - { - name: 'ismove', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldSelect', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnum', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldStore', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'newvals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Float', - isNode: true, - fields: [ - { - name: 'str', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FromExpr', - isNode: true, - fields: [ - { - name: 'fromlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncCall', - isNode: true, - fields: [ - { - name: 'agg_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_filter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'agg_order', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'agg_star', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_within_group', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func_variadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'over', - type: 'WindowDef', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'funcid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FunctionParameter', - isNode: true, - fields: [ - { - name: 'argType', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'defexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'mode', - type: 'FunctionParameterMode', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'GrantRoleStmt', - isNode: true, - fields: [ - { - name: 'admin_opt', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'granted_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantee_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantor', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'GrantStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'grant_option', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'grantees', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'privileges', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targtype', - type: 'GrantTargetType', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingFunc', - isNode: true, - fields: [ - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingSet', - isNode: true, - fields: [ - { - name: 'content', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'GroupingSetKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ImportForeignSchemaStmt', - isNode: true, - fields: [ - { - name: 'list_type', - type: 'ImportForeignSchemaType', - isArray: false, - optional: true - }, - { - name: 'local_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'remote_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'server_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'table_list', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IndexElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indexcolname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nulls_ordering', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassopts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordering', - type: 'SortByDir', - isArray: false, - optional: true - } - ] - }, - { - name: 'IndexStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'excludeOpNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'idxcomment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'idxname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'indexIncludingParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'indexParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'oldCreateSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldFirstRelfilenodeSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldNode', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'primary', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'transformed', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'unique', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferClause', - isNode: true, - fields: [ - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferenceElem', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'infercollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inferopclass', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InlineCodeBlock', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langIsTrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'source_text', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'InsertStmt', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictClause', - type: 'OnConflictClause', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'selectStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'Integer', - isNode: true, - fields: [ - { - name: 'ival', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'IntList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IntoClause', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onCommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpaceName', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'viewQuery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'JoinExpr', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'isNatural', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'List', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ListenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LoadStmt', - isNode: true, - fields: [ - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockingClause', - isNode: true, - fields: [ - { - name: 'lockedRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockStmt', - isNode: true, - fields: [ - { - name: 'mode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MinMaxExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'minmaxcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'minmaxtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'MinMaxOp', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'MultiAssignRef', - isNode: true, - fields: [ - { - name: 'colno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'ncolumns', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'source', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NamedArgExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argnumber', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NextValueExpr', - isNode: true, - fields: [ - { - name: 'seqid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NotifyStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'payload', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Null', - isNode: true, - fields: [ - - ] - }, - { - name: 'NullIfExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NullTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argisrow', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nulltesttype', - type: 'NullTestType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ObjectWithArgs', - isNode: true, - fields: [ - { - name: 'args_unspecified', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OidList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OnConflictClause', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'infer', - type: 'InferClause', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OnConflictExpr', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'arbiterElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'arbiterWhere', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'constraint', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'exclRelIndex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'exclRelTlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictSet', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictWhere', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Param', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramid', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramkind', - type: 'ParamKind', - isArray: false, - optional: true - }, - { - name: 'paramtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramtypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParamRef', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParseResult', - isNode: false, - fields: [ - { - name: 'stmts', - type: 'RawStmt', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionBoundSpec', - isNode: true, - fields: [ - { - name: 'is_default', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'listdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'lowerdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'modulus', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'remainder', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'strategy', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'upperdatums', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionCmd', - isNode: true, - fields: [ - { - name: 'bound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionRangeDatum', - isNode: true, - fields: [ - { - name: 'kind', - type: 'PartitionRangeDatumKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'value', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'partParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strategy', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'PrepareStmt', - isNode: true, - fields: [ - { - name: 'argtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Query', - isNode: true, - fields: [ - { - name: 'canSetTag', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'constraintDeps', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cteList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupingSets', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'hasAggs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasDistinctOn', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasForUpdate', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasModifyingCTE', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRowSecurity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasSubLinks', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasTargetSRFs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasWindowFuncs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'havingQual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'jointree', - type: 'FromExpr', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'onConflict', - type: 'OnConflictExpr', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'querySource', - type: 'QuerySource', - isArray: false, - optional: true - }, - { - name: 'resultRelation', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowMarks', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rtable', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'setOperations', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'utilityStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withCheckOptions', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeFunction', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_rowsfrom', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'ordinality', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeSubselect', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFunc', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'namespaces', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFuncCol', - isNode: true, - fields: [ - { - name: 'coldefexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'for_ordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableSample', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'method', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTblEntry', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'checkAsUser', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctelevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrtuples', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'eref', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'extraUpdatedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'funcordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inFromCl', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'insertedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'joinaliasvars', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinleftcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinmergedcols', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'joinrightcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'rellockmode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'requiredPerms', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'rtekind', - type: 'RTEKind', - isArray: false, - optional: true - }, - { - name: 'security_barrier', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'securityQuals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'selectedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'self_reference', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Query', - isArray: false, - optional: true - }, - { - name: 'tablefunc', - type: 'TableFunc', - isArray: false, - optional: true - }, - { - name: 'tablesample', - type: 'TableSampleClause', - isArray: false, - optional: true - }, - { - name: 'updatedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'values_lists', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblFunction', - isNode: true, - fields: [ - { - name: 'funccolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccolcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funccolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funcexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'funcparams', - type: 'uint64', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblRef', - isNode: true, - fields: [ - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeVar', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'catalogname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'relpersistence', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'RawStmt', - isNode: true, - fields: [ - { - name: 'stmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReassignOwnedStmt', - isNode: true, - fields: [ - { - name: 'newrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RefreshMatViewStmt', - isNode: true, - fields: [ - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReindexStmt', - isNode: true, - fields: [ - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'ReindexObjectType', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'RelabelType', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relabelformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RenameStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'renameType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReplicaIdentityStmt', - isNode: true, - fields: [ - { - name: 'identity_type', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ResTarget', - isNode: true, - fields: [ - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RoleSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rolename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roletype', - type: 'RoleSpecType', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowCompareExpr', - isNode: true, - fields: [ - { - name: 'inputcollids', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'largs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilies', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opnos', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rctype', - type: 'RowCompareType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'row_format', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'row_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowMarkClause', - isNode: true, - fields: [ - { - name: 'pushedDown', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rti', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'RuleStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'event', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'instead', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rulename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScalarArrayOpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'useOr', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanResult', - isNode: false, - fields: [ - { - name: 'tokens', - type: 'ScanToken', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanToken', - isNode: false, - fields: [ - { - name: 'end', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'keywordKind', - type: 'KeywordKind', - isArray: false, - optional: true - }, - { - name: 'start', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'token', - type: 'Token', - isArray: false, - optional: true - } - ] - }, - { - name: 'SecLabelStmt', - isNode: true, - fields: [ - { - name: 'label', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'provider', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SelectStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'havingClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'intoClause', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'lockingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'valuesLists', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetOperationStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'colCollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClauses', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetToDefault', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SortBy', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'node', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortby_dir', - type: 'SortByDir', - isArray: false, - optional: true - }, - { - name: 'sortby_nulls', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'useOp', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'SortGroupClause', - isNode: true, - fields: [ - { - name: 'eqop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'hashable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'nulls_first', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sortop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'tleSortGroupRef', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'SQLValueFunction', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SQLValueFunctionOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'String', - isNode: true, - fields: [ - { - name: 'str', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubLink', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'operName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subLinkId', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'subselect', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubPlan', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'firstColCollation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColType', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColTypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'parallel_safe', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'paramIds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'per_call_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'plan_id', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'plan_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'startup_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'unknownEqFalse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'useHashTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubscriptingRef', - isNode: true, - fields: [ - { - name: 'refassgnexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'refcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refcontainertype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refelemtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reflowerindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'reftypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refupperindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableFunc', - isNode: true, - fields: [ - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coldefexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'notnulls', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'ns_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ns_uris', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordinalitycol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableLikeClause', - isNode: true, - fields: [ - { - name: 'options', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationOid', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableSampleClause', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'tsmhandler', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TargetEntry', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'resjunk', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'resname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'resno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigcol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigtbl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ressortgroupref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TransactionStmt', - isNode: true, - fields: [ - { - name: 'chain', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'gid', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'TransactionStmtKind', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'savepoint_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TriggerTransition', - isNode: true, - fields: [ - { - name: 'isNew', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TruncateStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'restart_seqs', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeCast', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeName', - isNode: true, - fields: [ - { - name: 'arrayBounds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pct_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'setof', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typemod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmods', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'UnlistenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'UpdateStmt', - isNode: true, - fields: [ - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'VacuumRelation', - isNode: true, - fields: [ - { - name: 'oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'va_cols', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'VacuumStmt', - isNode: true, - fields: [ - { - name: 'is_vacuumcmd', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rels', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'Var', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varattno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varattnosyn', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varlevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varnosyn', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'vartype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'vartypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableSetStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'VariableSetKind', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableShowStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ViewStmt', - isNode: true, - fields: [ - { - name: 'aliases', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'view', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'withCheckOption', - type: 'ViewCheckOption', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowClause', - isNode: true, - fields: [ - { - name: 'copiedOrder', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'endInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'inRangeAsc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inRangeColl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inRangeNullsFirst', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'startInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowDef', - isNode: true, - fields: [ - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowFunc', - isNode: true, - fields: [ - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'winagg', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wincollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wintype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithCheckOption', - isNode: true, - fields: [ - { - name: 'cascaded', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'WCOKind', - isArray: false, - optional: true - }, - { - name: 'polname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithClause', - isNode: true, - fields: [ - { - name: 'ctes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recursive', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlExpr', - isNode: true, - fields: [ - { - name: 'arg_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'named_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'XmlExprOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlSerialize', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - } - ] - } -]; \ No newline at end of file diff --git a/packages/transform/src/14/enum-to-int.ts b/packages/transform/src/14/enum-to-int.ts deleted file mode 100644 index 596c2dcc..00000000 --- a/packages/transform/src/14/enum-to-int.ts +++ /dev/null @@ -1,2207 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumInt = (enumType: EnumType, key: string): number => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case "OVERRIDING_NOT_SET": - return 0; - case "OVERRIDING_USER_VALUE": - return 1; - case "OVERRIDING_SYSTEM_VALUE": - return 2; - default: - throw new Error("Key not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case "QSRC_ORIGINAL": - return 0; - case "QSRC_PARSER": - return 1; - case "QSRC_INSTEAD_RULE": - return 2; - case "QSRC_QUAL_INSTEAD_RULE": - return 3; - case "QSRC_NON_INSTEAD_RULE": - return 4; - default: - throw new Error("Key not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case "SORTBY_DEFAULT": - return 0; - case "SORTBY_ASC": - return 1; - case "SORTBY_DESC": - return 2; - case "SORTBY_USING": - return 3; - default: - throw new Error("Key not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case "SORTBY_NULLS_DEFAULT": - return 0; - case "SORTBY_NULLS_FIRST": - return 1; - case "SORTBY_NULLS_LAST": - return 2; - default: - throw new Error("Key not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case "SET_QUANTIFIER_DEFAULT": - return 0; - case "SET_QUANTIFIER_ALL": - return 1; - case "SET_QUANTIFIER_DISTINCT": - return 2; - default: - throw new Error("Key not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case "AEXPR_OP": - return 0; - case "AEXPR_OP_ANY": - return 1; - case "AEXPR_OP_ALL": - return 2; - case "AEXPR_DISTINCT": - return 3; - case "AEXPR_NOT_DISTINCT": - return 4; - case "AEXPR_NULLIF": - return 5; - case "AEXPR_IN": - return 6; - case "AEXPR_LIKE": - return 7; - case "AEXPR_ILIKE": - return 8; - case "AEXPR_SIMILAR": - return 9; - case "AEXPR_BETWEEN": - return 10; - case "AEXPR_NOT_BETWEEN": - return 11; - case "AEXPR_BETWEEN_SYM": - return 12; - case "AEXPR_NOT_BETWEEN_SYM": - return 13; - default: - throw new Error("Key not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case "ROLESPEC_CSTRING": - return 0; - case "ROLESPEC_CURRENT_ROLE": - return 1; - case "ROLESPEC_CURRENT_USER": - return 2; - case "ROLESPEC_SESSION_USER": - return 3; - case "ROLESPEC_PUBLIC": - return 4; - default: - throw new Error("Key not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case "CREATE_TABLE_LIKE_COMMENTS": - return 0; - case "CREATE_TABLE_LIKE_COMPRESSION": - return 1; - case "CREATE_TABLE_LIKE_CONSTRAINTS": - return 2; - case "CREATE_TABLE_LIKE_DEFAULTS": - return 3; - case "CREATE_TABLE_LIKE_GENERATED": - return 4; - case "CREATE_TABLE_LIKE_IDENTITY": - return 5; - case "CREATE_TABLE_LIKE_INDEXES": - return 6; - case "CREATE_TABLE_LIKE_STATISTICS": - return 7; - case "CREATE_TABLE_LIKE_STORAGE": - return 8; - case "CREATE_TABLE_LIKE_ALL": - return 9; - default: - throw new Error("Key not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case "DEFELEM_UNSPEC": - return 0; - case "DEFELEM_SET": - return 1; - case "DEFELEM_ADD": - return 2; - case "DEFELEM_DROP": - return 3; - default: - throw new Error("Key not recognized in enum DefElemAction"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case "PARTITION_RANGE_DATUM_MINVALUE": - return 0; - case "PARTITION_RANGE_DATUM_VALUE": - return 1; - case "PARTITION_RANGE_DATUM_MAXVALUE": - return 2; - default: - throw new Error("Key not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case "RTE_RELATION": - return 0; - case "RTE_SUBQUERY": - return 1; - case "RTE_JOIN": - return 2; - case "RTE_FUNCTION": - return 3; - case "RTE_TABLEFUNC": - return 4; - case "RTE_VALUES": - return 5; - case "RTE_CTE": - return 6; - case "RTE_NAMEDTUPLESTORE": - return 7; - case "RTE_RESULT": - return 8; - default: - throw new Error("Key not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case "WCO_VIEW_CHECK": - return 0; - case "WCO_RLS_INSERT_CHECK": - return 1; - case "WCO_RLS_UPDATE_CHECK": - return 2; - case "WCO_RLS_CONFLICT_CHECK": - return 3; - default: - throw new Error("Key not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case "GROUPING_SET_EMPTY": - return 0; - case "GROUPING_SET_SIMPLE": - return 1; - case "GROUPING_SET_ROLLUP": - return 2; - case "GROUPING_SET_CUBE": - return 3; - case "GROUPING_SET_SETS": - return 4; - default: - throw new Error("Key not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case "CTEMaterializeDefault": - return 0; - case "CTEMaterializeAlways": - return 1; - case "CTEMaterializeNever": - return 2; - default: - throw new Error("Key not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case "SETOP_NONE": - return 0; - case "SETOP_UNION": - return 1; - case "SETOP_INTERSECT": - return 2; - case "SETOP_EXCEPT": - return 3; - default: - throw new Error("Key not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case "OBJECT_ACCESS_METHOD": - return 0; - case "OBJECT_AGGREGATE": - return 1; - case "OBJECT_AMOP": - return 2; - case "OBJECT_AMPROC": - return 3; - case "OBJECT_ATTRIBUTE": - return 4; - case "OBJECT_CAST": - return 5; - case "OBJECT_COLUMN": - return 6; - case "OBJECT_COLLATION": - return 7; - case "OBJECT_CONVERSION": - return 8; - case "OBJECT_DATABASE": - return 9; - case "OBJECT_DEFAULT": - return 10; - case "OBJECT_DEFACL": - return 11; - case "OBJECT_DOMAIN": - return 12; - case "OBJECT_DOMCONSTRAINT": - return 13; - case "OBJECT_EVENT_TRIGGER": - return 14; - case "OBJECT_EXTENSION": - return 15; - case "OBJECT_FDW": - return 16; - case "OBJECT_FOREIGN_SERVER": - return 17; - case "OBJECT_FOREIGN_TABLE": - return 18; - case "OBJECT_FUNCTION": - return 19; - case "OBJECT_INDEX": - return 20; - case "OBJECT_LANGUAGE": - return 21; - case "OBJECT_LARGEOBJECT": - return 22; - case "OBJECT_MATVIEW": - return 23; - case "OBJECT_OPCLASS": - return 24; - case "OBJECT_OPERATOR": - return 25; - case "OBJECT_OPFAMILY": - return 26; - case "OBJECT_POLICY": - return 27; - case "OBJECT_PROCEDURE": - return 28; - case "OBJECT_PUBLICATION": - return 29; - case "OBJECT_PUBLICATION_REL": - return 30; - case "OBJECT_ROLE": - return 31; - case "OBJECT_ROUTINE": - return 32; - case "OBJECT_RULE": - return 33; - case "OBJECT_SCHEMA": - return 34; - case "OBJECT_SEQUENCE": - return 35; - case "OBJECT_SUBSCRIPTION": - return 36; - case "OBJECT_STATISTIC_EXT": - return 37; - case "OBJECT_TABCONSTRAINT": - return 38; - case "OBJECT_TABLE": - return 39; - case "OBJECT_TABLESPACE": - return 40; - case "OBJECT_TRANSFORM": - return 41; - case "OBJECT_TRIGGER": - return 42; - case "OBJECT_TSCONFIGURATION": - return 43; - case "OBJECT_TSDICTIONARY": - return 44; - case "OBJECT_TSPARSER": - return 45; - case "OBJECT_TSTEMPLATE": - return 46; - case "OBJECT_TYPE": - return 47; - case "OBJECT_USER_MAPPING": - return 48; - case "OBJECT_VIEW": - return 49; - default: - throw new Error("Key not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case "DROP_RESTRICT": - return 0; - case "DROP_CASCADE": - return 1; - default: - throw new Error("Key not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case "AT_AddColumn": - return 0; - case "AT_AddColumnRecurse": - return 1; - case "AT_AddColumnToView": - return 2; - case "AT_ColumnDefault": - return 3; - case "AT_CookedColumnDefault": - return 4; - case "AT_DropNotNull": - return 5; - case "AT_SetNotNull": - return 6; - case "AT_DropExpression": - return 7; - case "AT_CheckNotNull": - return 8; - case "AT_SetStatistics": - return 9; - case "AT_SetOptions": - return 10; - case "AT_ResetOptions": - return 11; - case "AT_SetStorage": - return 12; - case "AT_SetCompression": - return 13; - case "AT_DropColumn": - return 14; - case "AT_DropColumnRecurse": - return 15; - case "AT_AddIndex": - return 16; - case "AT_ReAddIndex": - return 17; - case "AT_AddConstraint": - return 18; - case "AT_AddConstraintRecurse": - return 19; - case "AT_ReAddConstraint": - return 20; - case "AT_ReAddDomainConstraint": - return 21; - case "AT_AlterConstraint": - return 22; - case "AT_ValidateConstraint": - return 23; - case "AT_ValidateConstraintRecurse": - return 24; - case "AT_AddIndexConstraint": - return 25; - case "AT_DropConstraint": - return 26; - case "AT_DropConstraintRecurse": - return 27; - case "AT_ReAddComment": - return 28; - case "AT_AlterColumnType": - return 29; - case "AT_AlterColumnGenericOptions": - return 30; - case "AT_ChangeOwner": - return 31; - case "AT_ClusterOn": - return 32; - case "AT_DropCluster": - return 33; - case "AT_SetLogged": - return 34; - case "AT_SetUnLogged": - return 35; - case "AT_DropOids": - return 36; - case "AT_SetTableSpace": - return 37; - case "AT_SetRelOptions": - return 38; - case "AT_ResetRelOptions": - return 39; - case "AT_ReplaceRelOptions": - return 40; - case "AT_EnableTrig": - return 41; - case "AT_EnableAlwaysTrig": - return 42; - case "AT_EnableReplicaTrig": - return 43; - case "AT_DisableTrig": - return 44; - case "AT_EnableTrigAll": - return 45; - case "AT_DisableTrigAll": - return 46; - case "AT_EnableTrigUser": - return 47; - case "AT_DisableTrigUser": - return 48; - case "AT_EnableRule": - return 49; - case "AT_EnableAlwaysRule": - return 50; - case "AT_EnableReplicaRule": - return 51; - case "AT_DisableRule": - return 52; - case "AT_AddInherit": - return 53; - case "AT_DropInherit": - return 54; - case "AT_AddOf": - return 55; - case "AT_DropOf": - return 56; - case "AT_ReplicaIdentity": - return 57; - case "AT_EnableRowSecurity": - return 58; - case "AT_DisableRowSecurity": - return 59; - case "AT_ForceRowSecurity": - return 60; - case "AT_NoForceRowSecurity": - return 61; - case "AT_GenericOptions": - return 62; - case "AT_AttachPartition": - return 63; - case "AT_DetachPartition": - return 64; - case "AT_DetachPartitionFinalize": - return 65; - case "AT_AddIdentity": - return 66; - case "AT_SetIdentity": - return 67; - case "AT_DropIdentity": - return 68; - case "AT_ReAddStatistics": - return 69; - default: - throw new Error("Key not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case "ACL_TARGET_OBJECT": - return 0; - case "ACL_TARGET_ALL_IN_SCHEMA": - return 1; - case "ACL_TARGET_DEFAULTS": - return 2; - default: - throw new Error("Key not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case "VAR_SET_VALUE": - return 0; - case "VAR_SET_DEFAULT": - return 1; - case "VAR_SET_CURRENT": - return 2; - case "VAR_SET_MULTI": - return 3; - case "VAR_RESET": - return 4; - case "VAR_RESET_ALL": - return 5; - default: - throw new Error("Key not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case "CONSTR_NULL": - return 0; - case "CONSTR_NOTNULL": - return 1; - case "CONSTR_DEFAULT": - return 2; - case "CONSTR_IDENTITY": - return 3; - case "CONSTR_GENERATED": - return 4; - case "CONSTR_CHECK": - return 5; - case "CONSTR_PRIMARY": - return 6; - case "CONSTR_UNIQUE": - return 7; - case "CONSTR_EXCLUSION": - return 8; - case "CONSTR_FOREIGN": - return 9; - case "CONSTR_ATTR_DEFERRABLE": - return 10; - case "CONSTR_ATTR_NOT_DEFERRABLE": - return 11; - case "CONSTR_ATTR_DEFERRED": - return 12; - case "CONSTR_ATTR_IMMEDIATE": - return 13; - default: - throw new Error("Key not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case "FDW_IMPORT_SCHEMA_ALL": - return 0; - case "FDW_IMPORT_SCHEMA_LIMIT_TO": - return 1; - case "FDW_IMPORT_SCHEMA_EXCEPT": - return 2; - default: - throw new Error("Key not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case "ROLESTMT_ROLE": - return 0; - case "ROLESTMT_USER": - return 1; - case "ROLESTMT_GROUP": - return 2; - default: - throw new Error("Key not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case "FETCH_FORWARD": - return 0; - case "FETCH_BACKWARD": - return 1; - case "FETCH_ABSOLUTE": - return 2; - case "FETCH_RELATIVE": - return 3; - default: - throw new Error("Key not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case "FUNC_PARAM_IN": - return 0; - case "FUNC_PARAM_OUT": - return 1; - case "FUNC_PARAM_INOUT": - return 2; - case "FUNC_PARAM_VARIADIC": - return 3; - case "FUNC_PARAM_TABLE": - return 4; - case "FUNC_PARAM_DEFAULT": - return 5; - default: - throw new Error("Key not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case "TRANS_STMT_BEGIN": - return 0; - case "TRANS_STMT_START": - return 1; - case "TRANS_STMT_COMMIT": - return 2; - case "TRANS_STMT_ROLLBACK": - return 3; - case "TRANS_STMT_SAVEPOINT": - return 4; - case "TRANS_STMT_RELEASE": - return 5; - case "TRANS_STMT_ROLLBACK_TO": - return 6; - case "TRANS_STMT_PREPARE": - return 7; - case "TRANS_STMT_COMMIT_PREPARED": - return 8; - case "TRANS_STMT_ROLLBACK_PREPARED": - return 9; - default: - throw new Error("Key not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case "NO_CHECK_OPTION": - return 0; - case "LOCAL_CHECK_OPTION": - return 1; - case "CASCADED_CHECK_OPTION": - return 2; - default: - throw new Error("Key not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case "DISCARD_ALL": - return 0; - case "DISCARD_PLANS": - return 1; - case "DISCARD_SEQUENCES": - return 2; - case "DISCARD_TEMP": - return 3; - default: - throw new Error("Key not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case "REINDEX_OBJECT_INDEX": - return 0; - case "REINDEX_OBJECT_TABLE": - return 1; - case "REINDEX_OBJECT_SCHEMA": - return 2; - case "REINDEX_OBJECT_SYSTEM": - return 3; - case "REINDEX_OBJECT_DATABASE": - return 4; - default: - throw new Error("Key not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case "ALTER_TSCONFIG_ADD_MAPPING": - return 0; - case "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN": - return 1; - case "ALTER_TSCONFIG_REPLACE_DICT": - return 2; - case "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN": - return 3; - case "ALTER_TSCONFIG_DROP_MAPPING": - return 4; - default: - throw new Error("Key not recognized in enum AlterTSConfigType"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case "ALTER_SUBSCRIPTION_OPTIONS": - return 0; - case "ALTER_SUBSCRIPTION_CONNECTION": - return 1; - case "ALTER_SUBSCRIPTION_SET_PUBLICATION": - return 2; - case "ALTER_SUBSCRIPTION_ADD_PUBLICATION": - return 3; - case "ALTER_SUBSCRIPTION_DROP_PUBLICATION": - return 4; - case "ALTER_SUBSCRIPTION_REFRESH": - return 5; - case "ALTER_SUBSCRIPTION_ENABLED": - return 6; - default: - throw new Error("Key not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case "ONCOMMIT_NOOP": - return 0; - case "ONCOMMIT_PRESERVE_ROWS": - return 1; - case "ONCOMMIT_DELETE_ROWS": - return 2; - case "ONCOMMIT_DROP": - return 3; - default: - throw new Error("Key not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case "PARAM_EXTERN": - return 0; - case "PARAM_EXEC": - return 1; - case "PARAM_SUBLINK": - return 2; - case "PARAM_MULTIEXPR": - return 3; - default: - throw new Error("Key not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case "COERCION_IMPLICIT": - return 0; - case "COERCION_ASSIGNMENT": - return 1; - case "COERCION_PLPGSQL": - return 2; - case "COERCION_EXPLICIT": - return 3; - default: - throw new Error("Key not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case "COERCE_EXPLICIT_CALL": - return 0; - case "COERCE_EXPLICIT_CAST": - return 1; - case "COERCE_IMPLICIT_CAST": - return 2; - case "COERCE_SQL_SYNTAX": - return 3; - default: - throw new Error("Key not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case "AND_EXPR": - return 0; - case "OR_EXPR": - return 1; - case "NOT_EXPR": - return 2; - default: - throw new Error("Key not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case "EXISTS_SUBLINK": - return 0; - case "ALL_SUBLINK": - return 1; - case "ANY_SUBLINK": - return 2; - case "ROWCOMPARE_SUBLINK": - return 3; - case "EXPR_SUBLINK": - return 4; - case "MULTIEXPR_SUBLINK": - return 5; - case "ARRAY_SUBLINK": - return 6; - case "CTE_SUBLINK": - return 7; - default: - throw new Error("Key not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case "ROWCOMPARE_LT": - return 0; - case "ROWCOMPARE_LE": - return 1; - case "ROWCOMPARE_EQ": - return 2; - case "ROWCOMPARE_GE": - return 3; - case "ROWCOMPARE_GT": - return 4; - case "ROWCOMPARE_NE": - return 5; - default: - throw new Error("Key not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case "IS_GREATEST": - return 0; - case "IS_LEAST": - return 1; - default: - throw new Error("Key not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case "SVFOP_CURRENT_DATE": - return 0; - case "SVFOP_CURRENT_TIME": - return 1; - case "SVFOP_CURRENT_TIME_N": - return 2; - case "SVFOP_CURRENT_TIMESTAMP": - return 3; - case "SVFOP_CURRENT_TIMESTAMP_N": - return 4; - case "SVFOP_LOCALTIME": - return 5; - case "SVFOP_LOCALTIME_N": - return 6; - case "SVFOP_LOCALTIMESTAMP": - return 7; - case "SVFOP_LOCALTIMESTAMP_N": - return 8; - case "SVFOP_CURRENT_ROLE": - return 9; - case "SVFOP_CURRENT_USER": - return 10; - case "SVFOP_USER": - return 11; - case "SVFOP_SESSION_USER": - return 12; - case "SVFOP_CURRENT_CATALOG": - return 13; - case "SVFOP_CURRENT_SCHEMA": - return 14; - default: - throw new Error("Key not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case "IS_XMLCONCAT": - return 0; - case "IS_XMLELEMENT": - return 1; - case "IS_XMLFOREST": - return 2; - case "IS_XMLPARSE": - return 3; - case "IS_XMLPI": - return 4; - case "IS_XMLROOT": - return 5; - case "IS_XMLSERIALIZE": - return 6; - case "IS_DOCUMENT": - return 7; - default: - throw new Error("Key not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case "XMLOPTION_DOCUMENT": - return 0; - case "XMLOPTION_CONTENT": - return 1; - default: - throw new Error("Key not recognized in enum XmlOptionType"); - } - } - case "NullTestType": - { - switch (key) { - case "IS_NULL": - return 0; - case "IS_NOT_NULL": - return 1; - default: - throw new Error("Key not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case "IS_TRUE": - return 0; - case "IS_NOT_TRUE": - return 1; - case "IS_FALSE": - return 2; - case "IS_NOT_FALSE": - return 3; - case "IS_UNKNOWN": - return 4; - case "IS_NOT_UNKNOWN": - return 5; - default: - throw new Error("Key not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case "CMD_UNKNOWN": - return 0; - case "CMD_SELECT": - return 1; - case "CMD_UPDATE": - return 2; - case "CMD_INSERT": - return 3; - case "CMD_DELETE": - return 4; - case "CMD_UTILITY": - return 5; - case "CMD_NOTHING": - return 6; - default: - throw new Error("Key not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case "JOIN_INNER": - return 0; - case "JOIN_LEFT": - return 1; - case "JOIN_FULL": - return 2; - case "JOIN_RIGHT": - return 3; - case "JOIN_SEMI": - return 4; - case "JOIN_ANTI": - return 5; - case "JOIN_UNIQUE_OUTER": - return 6; - case "JOIN_UNIQUE_INNER": - return 7; - default: - throw new Error("Key not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case "AGG_PLAIN": - return 0; - case "AGG_SORTED": - return 1; - case "AGG_HASHED": - return 2; - case "AGG_MIXED": - return 3; - default: - throw new Error("Key not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case "AGGSPLIT_SIMPLE": - return 0; - case "AGGSPLIT_INITIAL_SERIAL": - return 1; - case "AGGSPLIT_FINAL_DESERIAL": - return 2; - default: - throw new Error("Key not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case "SETOPCMD_INTERSECT": - return 0; - case "SETOPCMD_INTERSECT_ALL": - return 1; - case "SETOPCMD_EXCEPT": - return 2; - case "SETOPCMD_EXCEPT_ALL": - return 3; - default: - throw new Error("Key not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case "SETOP_SORTED": - return 0; - case "SETOP_HASHED": - return 1; - default: - throw new Error("Key not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case "ONCONFLICT_NONE": - return 0; - case "ONCONFLICT_NOTHING": - return 1; - case "ONCONFLICT_UPDATE": - return 2; - default: - throw new Error("Key not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case "LIMIT_OPTION_DEFAULT": - return 0; - case "LIMIT_OPTION_COUNT": - return 1; - case "LIMIT_OPTION_WITH_TIES": - return 2; - default: - throw new Error("Key not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case "LCS_NONE": - return 0; - case "LCS_FORKEYSHARE": - return 1; - case "LCS_FORSHARE": - return 2; - case "LCS_FORNOKEYUPDATE": - return 3; - case "LCS_FORUPDATE": - return 4; - default: - throw new Error("Key not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case "LockWaitBlock": - return 0; - case "LockWaitSkip": - return 1; - case "LockWaitError": - return 2; - default: - throw new Error("Key not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case "LockTupleKeyShare": - return 0; - case "LockTupleShare": - return 1; - case "LockTupleNoKeyExclusive": - return 2; - case "LockTupleExclusive": - return 3; - default: - throw new Error("Key not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case "NO_KEYWORD": - return 0; - case "UNRESERVED_KEYWORD": - return 1; - case "COL_NAME_KEYWORD": - return 2; - case "TYPE_FUNC_NAME_KEYWORD": - return 3; - case "RESERVED_KEYWORD": - return 4; - default: - throw new Error("Key not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case "NUL": - return 0; - case "ASCII_37": - return 37; - case "ASCII_40": - return 40; - case "ASCII_41": - return 41; - case "ASCII_42": - return 42; - case "ASCII_43": - return 43; - case "ASCII_44": - return 44; - case "ASCII_45": - return 45; - case "ASCII_46": - return 46; - case "ASCII_47": - return 47; - case "ASCII_58": - return 58; - case "ASCII_59": - return 59; - case "ASCII_60": - return 60; - case "ASCII_61": - return 61; - case "ASCII_62": - return 62; - case "ASCII_63": - return 63; - case "ASCII_91": - return 91; - case "ASCII_92": - return 92; - case "ASCII_93": - return 93; - case "ASCII_94": - return 94; - case "IDENT": - return 258; - case "UIDENT": - return 259; - case "FCONST": - return 260; - case "SCONST": - return 261; - case "USCONST": - return 262; - case "BCONST": - return 263; - case "XCONST": - return 264; - case "Op": - return 265; - case "ICONST": - return 266; - case "PARAM": - return 267; - case "TYPECAST": - return 268; - case "DOT_DOT": - return 269; - case "COLON_EQUALS": - return 270; - case "EQUALS_GREATER": - return 271; - case "LESS_EQUALS": - return 272; - case "GREATER_EQUALS": - return 273; - case "NOT_EQUALS": - return 274; - case "SQL_COMMENT": - return 275; - case "C_COMMENT": - return 276; - case "ABORT_P": - return 277; - case "ABSOLUTE_P": - return 278; - case "ACCESS": - return 279; - case "ACTION": - return 280; - case "ADD_P": - return 281; - case "ADMIN": - return 282; - case "AFTER": - return 283; - case "AGGREGATE": - return 284; - case "ALL": - return 285; - case "ALSO": - return 286; - case "ALTER": - return 287; - case "ALWAYS": - return 288; - case "ANALYSE": - return 289; - case "ANALYZE": - return 290; - case "AND": - return 291; - case "ANY": - return 292; - case "ARRAY": - return 293; - case "AS": - return 294; - case "ASC": - return 295; - case "ASENSITIVE": - return 296; - case "ASSERTION": - return 297; - case "ASSIGNMENT": - return 298; - case "ASYMMETRIC": - return 299; - case "ATOMIC": - return 300; - case "AT": - return 301; - case "ATTACH": - return 302; - case "ATTRIBUTE": - return 303; - case "AUTHORIZATION": - return 304; - case "BACKWARD": - return 305; - case "BEFORE": - return 306; - case "BEGIN_P": - return 307; - case "BETWEEN": - return 308; - case "BIGINT": - return 309; - case "BINARY": - return 310; - case "BIT": - return 311; - case "BOOLEAN_P": - return 312; - case "BOTH": - return 313; - case "BREADTH": - return 314; - case "BY": - return 315; - case "CACHE": - return 316; - case "CALL": - return 317; - case "CALLED": - return 318; - case "CASCADE": - return 319; - case "CASCADED": - return 320; - case "CASE": - return 321; - case "CAST": - return 322; - case "CATALOG_P": - return 323; - case "CHAIN": - return 324; - case "CHAR_P": - return 325; - case "CHARACTER": - return 326; - case "CHARACTERISTICS": - return 327; - case "CHECK": - return 328; - case "CHECKPOINT": - return 329; - case "CLASS": - return 330; - case "CLOSE": - return 331; - case "CLUSTER": - return 332; - case "COALESCE": - return 333; - case "COLLATE": - return 334; - case "COLLATION": - return 335; - case "COLUMN": - return 336; - case "COLUMNS": - return 337; - case "COMMENT": - return 338; - case "COMMENTS": - return 339; - case "COMMIT": - return 340; - case "COMMITTED": - return 341; - case "COMPRESSION": - return 342; - case "CONCURRENTLY": - return 343; - case "CONFIGURATION": - return 344; - case "CONFLICT": - return 345; - case "CONNECTION": - return 346; - case "CONSTRAINT": - return 347; - case "CONSTRAINTS": - return 348; - case "CONTENT_P": - return 349; - case "CONTINUE_P": - return 350; - case "CONVERSION_P": - return 351; - case "COPY": - return 352; - case "COST": - return 353; - case "CREATE": - return 354; - case "CROSS": - return 355; - case "CSV": - return 356; - case "CUBE": - return 357; - case "CURRENT_P": - return 358; - case "CURRENT_CATALOG": - return 359; - case "CURRENT_DATE": - return 360; - case "CURRENT_ROLE": - return 361; - case "CURRENT_SCHEMA": - return 362; - case "CURRENT_TIME": - return 363; - case "CURRENT_TIMESTAMP": - return 364; - case "CURRENT_USER": - return 365; - case "CURSOR": - return 366; - case "CYCLE": - return 367; - case "DATA_P": - return 368; - case "DATABASE": - return 369; - case "DAY_P": - return 370; - case "DEALLOCATE": - return 371; - case "DEC": - return 372; - case "DECIMAL_P": - return 373; - case "DECLARE": - return 374; - case "DEFAULT": - return 375; - case "DEFAULTS": - return 376; - case "DEFERRABLE": - return 377; - case "DEFERRED": - return 378; - case "DEFINER": - return 379; - case "DELETE_P": - return 380; - case "DELIMITER": - return 381; - case "DELIMITERS": - return 382; - case "DEPENDS": - return 383; - case "DEPTH": - return 384; - case "DESC": - return 385; - case "DETACH": - return 386; - case "DICTIONARY": - return 387; - case "DISABLE_P": - return 388; - case "DISCARD": - return 389; - case "DISTINCT": - return 390; - case "DO": - return 391; - case "DOCUMENT_P": - return 392; - case "DOMAIN_P": - return 393; - case "DOUBLE_P": - return 394; - case "DROP": - return 395; - case "EACH": - return 396; - case "ELSE": - return 397; - case "ENABLE_P": - return 398; - case "ENCODING": - return 399; - case "ENCRYPTED": - return 400; - case "END_P": - return 401; - case "ENUM_P": - return 402; - case "ESCAPE": - return 403; - case "EVENT": - return 404; - case "EXCEPT": - return 405; - case "EXCLUDE": - return 406; - case "EXCLUDING": - return 407; - case "EXCLUSIVE": - return 408; - case "EXECUTE": - return 409; - case "EXISTS": - return 410; - case "EXPLAIN": - return 411; - case "EXPRESSION": - return 412; - case "EXTENSION": - return 413; - case "EXTERNAL": - return 414; - case "EXTRACT": - return 415; - case "FALSE_P": - return 416; - case "FAMILY": - return 417; - case "FETCH": - return 418; - case "FILTER": - return 419; - case "FINALIZE": - return 420; - case "FIRST_P": - return 421; - case "FLOAT_P": - return 422; - case "FOLLOWING": - return 423; - case "FOR": - return 424; - case "FORCE": - return 425; - case "FOREIGN": - return 426; - case "FORWARD": - return 427; - case "FREEZE": - return 428; - case "FROM": - return 429; - case "FULL": - return 430; - case "FUNCTION": - return 431; - case "FUNCTIONS": - return 432; - case "GENERATED": - return 433; - case "GLOBAL": - return 434; - case "GRANT": - return 435; - case "GRANTED": - return 436; - case "GREATEST": - return 437; - case "GROUP_P": - return 438; - case "GROUPING": - return 439; - case "GROUPS": - return 440; - case "HANDLER": - return 441; - case "HAVING": - return 442; - case "HEADER_P": - return 443; - case "HOLD": - return 444; - case "HOUR_P": - return 445; - case "IDENTITY_P": - return 446; - case "IF_P": - return 447; - case "ILIKE": - return 448; - case "IMMEDIATE": - return 449; - case "IMMUTABLE": - return 450; - case "IMPLICIT_P": - return 451; - case "IMPORT_P": - return 452; - case "IN_P": - return 453; - case "INCLUDE": - return 454; - case "INCLUDING": - return 455; - case "INCREMENT": - return 456; - case "INDEX": - return 457; - case "INDEXES": - return 458; - case "INHERIT": - return 459; - case "INHERITS": - return 460; - case "INITIALLY": - return 461; - case "INLINE_P": - return 462; - case "INNER_P": - return 463; - case "INOUT": - return 464; - case "INPUT_P": - return 465; - case "INSENSITIVE": - return 466; - case "INSERT": - return 467; - case "INSTEAD": - return 468; - case "INT_P": - return 469; - case "INTEGER": - return 470; - case "INTERSECT": - return 471; - case "INTERVAL": - return 472; - case "INTO": - return 473; - case "INVOKER": - return 474; - case "IS": - return 475; - case "ISNULL": - return 476; - case "ISOLATION": - return 477; - case "JOIN": - return 478; - case "KEY": - return 479; - case "LABEL": - return 480; - case "LANGUAGE": - return 481; - case "LARGE_P": - return 482; - case "LAST_P": - return 483; - case "LATERAL_P": - return 484; - case "LEADING": - return 485; - case "LEAKPROOF": - return 486; - case "LEAST": - return 487; - case "LEFT": - return 488; - case "LEVEL": - return 489; - case "LIKE": - return 490; - case "LIMIT": - return 491; - case "LISTEN": - return 492; - case "LOAD": - return 493; - case "LOCAL": - return 494; - case "LOCALTIME": - return 495; - case "LOCALTIMESTAMP": - return 496; - case "LOCATION": - return 497; - case "LOCK_P": - return 498; - case "LOCKED": - return 499; - case "LOGGED": - return 500; - case "MAPPING": - return 501; - case "MATCH": - return 502; - case "MATERIALIZED": - return 503; - case "MAXVALUE": - return 504; - case "METHOD": - return 505; - case "MINUTE_P": - return 506; - case "MINVALUE": - return 507; - case "MODE": - return 508; - case "MONTH_P": - return 509; - case "MOVE": - return 510; - case "NAME_P": - return 511; - case "NAMES": - return 512; - case "NATIONAL": - return 513; - case "NATURAL": - return 514; - case "NCHAR": - return 515; - case "NEW": - return 516; - case "NEXT": - return 517; - case "NFC": - return 518; - case "NFD": - return 519; - case "NFKC": - return 520; - case "NFKD": - return 521; - case "NO": - return 522; - case "NONE": - return 523; - case "NORMALIZE": - return 524; - case "NORMALIZED": - return 525; - case "NOT": - return 526; - case "NOTHING": - return 527; - case "NOTIFY": - return 528; - case "NOTNULL": - return 529; - case "NOWAIT": - return 530; - case "NULL_P": - return 531; - case "NULLIF": - return 532; - case "NULLS_P": - return 533; - case "NUMERIC": - return 534; - case "OBJECT_P": - return 535; - case "OF": - return 536; - case "OFF": - return 537; - case "OFFSET": - return 538; - case "OIDS": - return 539; - case "OLD": - return 540; - case "ON": - return 541; - case "ONLY": - return 542; - case "OPERATOR": - return 543; - case "OPTION": - return 544; - case "OPTIONS": - return 545; - case "OR": - return 546; - case "ORDER": - return 547; - case "ORDINALITY": - return 548; - case "OTHERS": - return 549; - case "OUT_P": - return 550; - case "OUTER_P": - return 551; - case "OVER": - return 552; - case "OVERLAPS": - return 553; - case "OVERLAY": - return 554; - case "OVERRIDING": - return 555; - case "OWNED": - return 556; - case "OWNER": - return 557; - case "PARALLEL": - return 558; - case "PARSER": - return 559; - case "PARTIAL": - return 560; - case "PARTITION": - return 561; - case "PASSING": - return 562; - case "PASSWORD": - return 563; - case "PLACING": - return 564; - case "PLANS": - return 565; - case "POLICY": - return 566; - case "POSITION": - return 567; - case "PRECEDING": - return 568; - case "PRECISION": - return 569; - case "PRESERVE": - return 570; - case "PREPARE": - return 571; - case "PREPARED": - return 572; - case "PRIMARY": - return 573; - case "PRIOR": - return 574; - case "PRIVILEGES": - return 575; - case "PROCEDURAL": - return 576; - case "PROCEDURE": - return 577; - case "PROCEDURES": - return 578; - case "PROGRAM": - return 579; - case "PUBLICATION": - return 580; - case "QUOTE": - return 581; - case "RANGE": - return 582; - case "READ": - return 583; - case "REAL": - return 584; - case "REASSIGN": - return 585; - case "RECHECK": - return 586; - case "RECURSIVE": - return 587; - case "REF_P": - return 588; - case "REFERENCES": - return 589; - case "REFERENCING": - return 590; - case "REFRESH": - return 591; - case "REINDEX": - return 592; - case "RELATIVE_P": - return 593; - case "RELEASE": - return 594; - case "RENAME": - return 595; - case "REPEATABLE": - return 596; - case "REPLACE": - return 597; - case "REPLICA": - return 598; - case "RESET": - return 599; - case "RESTART": - return 600; - case "RESTRICT": - return 601; - case "RETURN": - return 602; - case "RETURNING": - return 603; - case "RETURNS": - return 604; - case "REVOKE": - return 605; - case "RIGHT": - return 606; - case "ROLE": - return 607; - case "ROLLBACK": - return 608; - case "ROLLUP": - return 609; - case "ROUTINE": - return 610; - case "ROUTINES": - return 611; - case "ROW": - return 612; - case "ROWS": - return 613; - case "RULE": - return 614; - case "SAVEPOINT": - return 615; - case "SCHEMA": - return 616; - case "SCHEMAS": - return 617; - case "SCROLL": - return 618; - case "SEARCH": - return 619; - case "SECOND_P": - return 620; - case "SECURITY": - return 621; - case "SELECT": - return 622; - case "SEQUENCE": - return 623; - case "SEQUENCES": - return 624; - case "SERIALIZABLE": - return 625; - case "SERVER": - return 626; - case "SESSION": - return 627; - case "SESSION_USER": - return 628; - case "SET": - return 629; - case "SETS": - return 630; - case "SETOF": - return 631; - case "SHARE": - return 632; - case "SHOW": - return 633; - case "SIMILAR": - return 634; - case "SIMPLE": - return 635; - case "SKIP": - return 636; - case "SMALLINT": - return 637; - case "SNAPSHOT": - return 638; - case "SOME": - return 639; - case "SQL_P": - return 640; - case "STABLE": - return 641; - case "STANDALONE_P": - return 642; - case "START": - return 643; - case "STATEMENT": - return 644; - case "STATISTICS": - return 645; - case "STDIN": - return 646; - case "STDOUT": - return 647; - case "STORAGE": - return 648; - case "STORED": - return 649; - case "STRICT_P": - return 650; - case "STRIP_P": - return 651; - case "SUBSCRIPTION": - return 652; - case "SUBSTRING": - return 653; - case "SUPPORT": - return 654; - case "SYMMETRIC": - return 655; - case "SYSID": - return 656; - case "SYSTEM_P": - return 657; - case "TABLE": - return 658; - case "TABLES": - return 659; - case "TABLESAMPLE": - return 660; - case "TABLESPACE": - return 661; - case "TEMP": - return 662; - case "TEMPLATE": - return 663; - case "TEMPORARY": - return 664; - case "TEXT_P": - return 665; - case "THEN": - return 666; - case "TIES": - return 667; - case "TIME": - return 668; - case "TIMESTAMP": - return 669; - case "TO": - return 670; - case "TRAILING": - return 671; - case "TRANSACTION": - return 672; - case "TRANSFORM": - return 673; - case "TREAT": - return 674; - case "TRIGGER": - return 675; - case "TRIM": - return 676; - case "TRUE_P": - return 677; - case "TRUNCATE": - return 678; - case "TRUSTED": - return 679; - case "TYPE_P": - return 680; - case "TYPES_P": - return 681; - case "UESCAPE": - return 682; - case "UNBOUNDED": - return 683; - case "UNCOMMITTED": - return 684; - case "UNENCRYPTED": - return 685; - case "UNION": - return 686; - case "UNIQUE": - return 687; - case "UNKNOWN": - return 688; - case "UNLISTEN": - return 689; - case "UNLOGGED": - return 690; - case "UNTIL": - return 691; - case "UPDATE": - return 692; - case "USER": - return 693; - case "USING": - return 694; - case "VACUUM": - return 695; - case "VALID": - return 696; - case "VALIDATE": - return 697; - case "VALIDATOR": - return 698; - case "VALUE_P": - return 699; - case "VALUES": - return 700; - case "VARCHAR": - return 701; - case "VARIADIC": - return 702; - case "VARYING": - return 703; - case "VERBOSE": - return 704; - case "VERSION_P": - return 705; - case "VIEW": - return 706; - case "VIEWS": - return 707; - case "VOLATILE": - return 708; - case "WHEN": - return 709; - case "WHERE": - return 710; - case "WHITESPACE_P": - return 711; - case "WINDOW": - return 712; - case "WITH": - return 713; - case "WITHIN": - return 714; - case "WITHOUT": - return 715; - case "WORK": - return 716; - case "WRAPPER": - return 717; - case "WRITE": - return 718; - case "XML_P": - return 719; - case "XMLATTRIBUTES": - return 720; - case "XMLCONCAT": - return 721; - case "XMLELEMENT": - return 722; - case "XMLEXISTS": - return 723; - case "XMLFOREST": - return 724; - case "XMLNAMESPACES": - return 725; - case "XMLPARSE": - return 726; - case "XMLPI": - return 727; - case "XMLROOT": - return 728; - case "XMLSERIALIZE": - return 729; - case "XMLTABLE": - return 730; - case "YEAR_P": - return 731; - case "YES_P": - return 732; - case "ZONE": - return 733; - case "NOT_LA": - return 734; - case "NULLS_LA": - return 735; - case "WITH_LA": - return 736; - case "MODE_TYPE_NAME": - return 737; - case "MODE_PLPGSQL_EXPR": - return 738; - case "MODE_PLPGSQL_ASSIGN1": - return 739; - case "MODE_PLPGSQL_ASSIGN2": - return 740; - case "MODE_PLPGSQL_ASSIGN3": - return 741; - case "UMINUS": - return 742; - default: - throw new Error("Key not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/14/enum-to-str.ts b/packages/transform/src/14/enum-to-str.ts deleted file mode 100644 index 81b757f9..00000000 --- a/packages/transform/src/14/enum-to-str.ts +++ /dev/null @@ -1,2207 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumString = (enumType: EnumType, key: number): string => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case 0: - return "OVERRIDING_NOT_SET"; - case 1: - return "OVERRIDING_USER_VALUE"; - case 2: - return "OVERRIDING_SYSTEM_VALUE"; - default: - throw new Error("Value not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case 0: - return "QSRC_ORIGINAL"; - case 1: - return "QSRC_PARSER"; - case 2: - return "QSRC_INSTEAD_RULE"; - case 3: - return "QSRC_QUAL_INSTEAD_RULE"; - case 4: - return "QSRC_NON_INSTEAD_RULE"; - default: - throw new Error("Value not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case 0: - return "SORTBY_DEFAULT"; - case 1: - return "SORTBY_ASC"; - case 2: - return "SORTBY_DESC"; - case 3: - return "SORTBY_USING"; - default: - throw new Error("Value not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case 0: - return "SORTBY_NULLS_DEFAULT"; - case 1: - return "SORTBY_NULLS_FIRST"; - case 2: - return "SORTBY_NULLS_LAST"; - default: - throw new Error("Value not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case 0: - return "SET_QUANTIFIER_DEFAULT"; - case 1: - return "SET_QUANTIFIER_ALL"; - case 2: - return "SET_QUANTIFIER_DISTINCT"; - default: - throw new Error("Value not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case 0: - return "AEXPR_OP"; - case 1: - return "AEXPR_OP_ANY"; - case 2: - return "AEXPR_OP_ALL"; - case 3: - return "AEXPR_DISTINCT"; - case 4: - return "AEXPR_NOT_DISTINCT"; - case 5: - return "AEXPR_NULLIF"; - case 6: - return "AEXPR_IN"; - case 7: - return "AEXPR_LIKE"; - case 8: - return "AEXPR_ILIKE"; - case 9: - return "AEXPR_SIMILAR"; - case 10: - return "AEXPR_BETWEEN"; - case 11: - return "AEXPR_NOT_BETWEEN"; - case 12: - return "AEXPR_BETWEEN_SYM"; - case 13: - return "AEXPR_NOT_BETWEEN_SYM"; - default: - throw new Error("Value not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case 0: - return "ROLESPEC_CSTRING"; - case 1: - return "ROLESPEC_CURRENT_ROLE"; - case 2: - return "ROLESPEC_CURRENT_USER"; - case 3: - return "ROLESPEC_SESSION_USER"; - case 4: - return "ROLESPEC_PUBLIC"; - default: - throw new Error("Value not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case 0: - return "CREATE_TABLE_LIKE_COMMENTS"; - case 1: - return "CREATE_TABLE_LIKE_COMPRESSION"; - case 2: - return "CREATE_TABLE_LIKE_CONSTRAINTS"; - case 3: - return "CREATE_TABLE_LIKE_DEFAULTS"; - case 4: - return "CREATE_TABLE_LIKE_GENERATED"; - case 5: - return "CREATE_TABLE_LIKE_IDENTITY"; - case 6: - return "CREATE_TABLE_LIKE_INDEXES"; - case 7: - return "CREATE_TABLE_LIKE_STATISTICS"; - case 8: - return "CREATE_TABLE_LIKE_STORAGE"; - case 9: - return "CREATE_TABLE_LIKE_ALL"; - default: - throw new Error("Value not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case 0: - return "DEFELEM_UNSPEC"; - case 1: - return "DEFELEM_SET"; - case 2: - return "DEFELEM_ADD"; - case 3: - return "DEFELEM_DROP"; - default: - throw new Error("Value not recognized in enum DefElemAction"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case 0: - return "PARTITION_RANGE_DATUM_MINVALUE"; - case 1: - return "PARTITION_RANGE_DATUM_VALUE"; - case 2: - return "PARTITION_RANGE_DATUM_MAXVALUE"; - default: - throw new Error("Value not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case 0: - return "RTE_RELATION"; - case 1: - return "RTE_SUBQUERY"; - case 2: - return "RTE_JOIN"; - case 3: - return "RTE_FUNCTION"; - case 4: - return "RTE_TABLEFUNC"; - case 5: - return "RTE_VALUES"; - case 6: - return "RTE_CTE"; - case 7: - return "RTE_NAMEDTUPLESTORE"; - case 8: - return "RTE_RESULT"; - default: - throw new Error("Value not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case 0: - return "WCO_VIEW_CHECK"; - case 1: - return "WCO_RLS_INSERT_CHECK"; - case 2: - return "WCO_RLS_UPDATE_CHECK"; - case 3: - return "WCO_RLS_CONFLICT_CHECK"; - default: - throw new Error("Value not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case 0: - return "GROUPING_SET_EMPTY"; - case 1: - return "GROUPING_SET_SIMPLE"; - case 2: - return "GROUPING_SET_ROLLUP"; - case 3: - return "GROUPING_SET_CUBE"; - case 4: - return "GROUPING_SET_SETS"; - default: - throw new Error("Value not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case 0: - return "CTEMaterializeDefault"; - case 1: - return "CTEMaterializeAlways"; - case 2: - return "CTEMaterializeNever"; - default: - throw new Error("Value not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case 0: - return "SETOP_NONE"; - case 1: - return "SETOP_UNION"; - case 2: - return "SETOP_INTERSECT"; - case 3: - return "SETOP_EXCEPT"; - default: - throw new Error("Value not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case 0: - return "OBJECT_ACCESS_METHOD"; - case 1: - return "OBJECT_AGGREGATE"; - case 2: - return "OBJECT_AMOP"; - case 3: - return "OBJECT_AMPROC"; - case 4: - return "OBJECT_ATTRIBUTE"; - case 5: - return "OBJECT_CAST"; - case 6: - return "OBJECT_COLUMN"; - case 7: - return "OBJECT_COLLATION"; - case 8: - return "OBJECT_CONVERSION"; - case 9: - return "OBJECT_DATABASE"; - case 10: - return "OBJECT_DEFAULT"; - case 11: - return "OBJECT_DEFACL"; - case 12: - return "OBJECT_DOMAIN"; - case 13: - return "OBJECT_DOMCONSTRAINT"; - case 14: - return "OBJECT_EVENT_TRIGGER"; - case 15: - return "OBJECT_EXTENSION"; - case 16: - return "OBJECT_FDW"; - case 17: - return "OBJECT_FOREIGN_SERVER"; - case 18: - return "OBJECT_FOREIGN_TABLE"; - case 19: - return "OBJECT_FUNCTION"; - case 20: - return "OBJECT_INDEX"; - case 21: - return "OBJECT_LANGUAGE"; - case 22: - return "OBJECT_LARGEOBJECT"; - case 23: - return "OBJECT_MATVIEW"; - case 24: - return "OBJECT_OPCLASS"; - case 25: - return "OBJECT_OPERATOR"; - case 26: - return "OBJECT_OPFAMILY"; - case 27: - return "OBJECT_POLICY"; - case 28: - return "OBJECT_PROCEDURE"; - case 29: - return "OBJECT_PUBLICATION"; - case 30: - return "OBJECT_PUBLICATION_REL"; - case 31: - return "OBJECT_ROLE"; - case 32: - return "OBJECT_ROUTINE"; - case 33: - return "OBJECT_RULE"; - case 34: - return "OBJECT_SCHEMA"; - case 35: - return "OBJECT_SEQUENCE"; - case 36: - return "OBJECT_SUBSCRIPTION"; - case 37: - return "OBJECT_STATISTIC_EXT"; - case 38: - return "OBJECT_TABCONSTRAINT"; - case 39: - return "OBJECT_TABLE"; - case 40: - return "OBJECT_TABLESPACE"; - case 41: - return "OBJECT_TRANSFORM"; - case 42: - return "OBJECT_TRIGGER"; - case 43: - return "OBJECT_TSCONFIGURATION"; - case 44: - return "OBJECT_TSDICTIONARY"; - case 45: - return "OBJECT_TSPARSER"; - case 46: - return "OBJECT_TSTEMPLATE"; - case 47: - return "OBJECT_TYPE"; - case 48: - return "OBJECT_USER_MAPPING"; - case 49: - return "OBJECT_VIEW"; - default: - throw new Error("Value not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case 0: - return "DROP_RESTRICT"; - case 1: - return "DROP_CASCADE"; - default: - throw new Error("Value not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case 0: - return "AT_AddColumn"; - case 1: - return "AT_AddColumnRecurse"; - case 2: - return "AT_AddColumnToView"; - case 3: - return "AT_ColumnDefault"; - case 4: - return "AT_CookedColumnDefault"; - case 5: - return "AT_DropNotNull"; - case 6: - return "AT_SetNotNull"; - case 7: - return "AT_DropExpression"; - case 8: - return "AT_CheckNotNull"; - case 9: - return "AT_SetStatistics"; - case 10: - return "AT_SetOptions"; - case 11: - return "AT_ResetOptions"; - case 12: - return "AT_SetStorage"; - case 13: - return "AT_SetCompression"; - case 14: - return "AT_DropColumn"; - case 15: - return "AT_DropColumnRecurse"; - case 16: - return "AT_AddIndex"; - case 17: - return "AT_ReAddIndex"; - case 18: - return "AT_AddConstraint"; - case 19: - return "AT_AddConstraintRecurse"; - case 20: - return "AT_ReAddConstraint"; - case 21: - return "AT_ReAddDomainConstraint"; - case 22: - return "AT_AlterConstraint"; - case 23: - return "AT_ValidateConstraint"; - case 24: - return "AT_ValidateConstraintRecurse"; - case 25: - return "AT_AddIndexConstraint"; - case 26: - return "AT_DropConstraint"; - case 27: - return "AT_DropConstraintRecurse"; - case 28: - return "AT_ReAddComment"; - case 29: - return "AT_AlterColumnType"; - case 30: - return "AT_AlterColumnGenericOptions"; - case 31: - return "AT_ChangeOwner"; - case 32: - return "AT_ClusterOn"; - case 33: - return "AT_DropCluster"; - case 34: - return "AT_SetLogged"; - case 35: - return "AT_SetUnLogged"; - case 36: - return "AT_DropOids"; - case 37: - return "AT_SetTableSpace"; - case 38: - return "AT_SetRelOptions"; - case 39: - return "AT_ResetRelOptions"; - case 40: - return "AT_ReplaceRelOptions"; - case 41: - return "AT_EnableTrig"; - case 42: - return "AT_EnableAlwaysTrig"; - case 43: - return "AT_EnableReplicaTrig"; - case 44: - return "AT_DisableTrig"; - case 45: - return "AT_EnableTrigAll"; - case 46: - return "AT_DisableTrigAll"; - case 47: - return "AT_EnableTrigUser"; - case 48: - return "AT_DisableTrigUser"; - case 49: - return "AT_EnableRule"; - case 50: - return "AT_EnableAlwaysRule"; - case 51: - return "AT_EnableReplicaRule"; - case 52: - return "AT_DisableRule"; - case 53: - return "AT_AddInherit"; - case 54: - return "AT_DropInherit"; - case 55: - return "AT_AddOf"; - case 56: - return "AT_DropOf"; - case 57: - return "AT_ReplicaIdentity"; - case 58: - return "AT_EnableRowSecurity"; - case 59: - return "AT_DisableRowSecurity"; - case 60: - return "AT_ForceRowSecurity"; - case 61: - return "AT_NoForceRowSecurity"; - case 62: - return "AT_GenericOptions"; - case 63: - return "AT_AttachPartition"; - case 64: - return "AT_DetachPartition"; - case 65: - return "AT_DetachPartitionFinalize"; - case 66: - return "AT_AddIdentity"; - case 67: - return "AT_SetIdentity"; - case 68: - return "AT_DropIdentity"; - case 69: - return "AT_ReAddStatistics"; - default: - throw new Error("Value not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case 0: - return "ACL_TARGET_OBJECT"; - case 1: - return "ACL_TARGET_ALL_IN_SCHEMA"; - case 2: - return "ACL_TARGET_DEFAULTS"; - default: - throw new Error("Value not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case 0: - return "VAR_SET_VALUE"; - case 1: - return "VAR_SET_DEFAULT"; - case 2: - return "VAR_SET_CURRENT"; - case 3: - return "VAR_SET_MULTI"; - case 4: - return "VAR_RESET"; - case 5: - return "VAR_RESET_ALL"; - default: - throw new Error("Value not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case 0: - return "CONSTR_NULL"; - case 1: - return "CONSTR_NOTNULL"; - case 2: - return "CONSTR_DEFAULT"; - case 3: - return "CONSTR_IDENTITY"; - case 4: - return "CONSTR_GENERATED"; - case 5: - return "CONSTR_CHECK"; - case 6: - return "CONSTR_PRIMARY"; - case 7: - return "CONSTR_UNIQUE"; - case 8: - return "CONSTR_EXCLUSION"; - case 9: - return "CONSTR_FOREIGN"; - case 10: - return "CONSTR_ATTR_DEFERRABLE"; - case 11: - return "CONSTR_ATTR_NOT_DEFERRABLE"; - case 12: - return "CONSTR_ATTR_DEFERRED"; - case 13: - return "CONSTR_ATTR_IMMEDIATE"; - default: - throw new Error("Value not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case 0: - return "FDW_IMPORT_SCHEMA_ALL"; - case 1: - return "FDW_IMPORT_SCHEMA_LIMIT_TO"; - case 2: - return "FDW_IMPORT_SCHEMA_EXCEPT"; - default: - throw new Error("Value not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case 0: - return "ROLESTMT_ROLE"; - case 1: - return "ROLESTMT_USER"; - case 2: - return "ROLESTMT_GROUP"; - default: - throw new Error("Value not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case 0: - return "FETCH_FORWARD"; - case 1: - return "FETCH_BACKWARD"; - case 2: - return "FETCH_ABSOLUTE"; - case 3: - return "FETCH_RELATIVE"; - default: - throw new Error("Value not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case 0: - return "FUNC_PARAM_IN"; - case 1: - return "FUNC_PARAM_OUT"; - case 2: - return "FUNC_PARAM_INOUT"; - case 3: - return "FUNC_PARAM_VARIADIC"; - case 4: - return "FUNC_PARAM_TABLE"; - case 5: - return "FUNC_PARAM_DEFAULT"; - default: - throw new Error("Value not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case 0: - return "TRANS_STMT_BEGIN"; - case 1: - return "TRANS_STMT_START"; - case 2: - return "TRANS_STMT_COMMIT"; - case 3: - return "TRANS_STMT_ROLLBACK"; - case 4: - return "TRANS_STMT_SAVEPOINT"; - case 5: - return "TRANS_STMT_RELEASE"; - case 6: - return "TRANS_STMT_ROLLBACK_TO"; - case 7: - return "TRANS_STMT_PREPARE"; - case 8: - return "TRANS_STMT_COMMIT_PREPARED"; - case 9: - return "TRANS_STMT_ROLLBACK_PREPARED"; - default: - throw new Error("Value not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case 0: - return "NO_CHECK_OPTION"; - case 1: - return "LOCAL_CHECK_OPTION"; - case 2: - return "CASCADED_CHECK_OPTION"; - default: - throw new Error("Value not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case 0: - return "DISCARD_ALL"; - case 1: - return "DISCARD_PLANS"; - case 2: - return "DISCARD_SEQUENCES"; - case 3: - return "DISCARD_TEMP"; - default: - throw new Error("Value not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case 0: - return "REINDEX_OBJECT_INDEX"; - case 1: - return "REINDEX_OBJECT_TABLE"; - case 2: - return "REINDEX_OBJECT_SCHEMA"; - case 3: - return "REINDEX_OBJECT_SYSTEM"; - case 4: - return "REINDEX_OBJECT_DATABASE"; - default: - throw new Error("Value not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case 0: - return "ALTER_TSCONFIG_ADD_MAPPING"; - case 1: - return "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN"; - case 2: - return "ALTER_TSCONFIG_REPLACE_DICT"; - case 3: - return "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN"; - case 4: - return "ALTER_TSCONFIG_DROP_MAPPING"; - default: - throw new Error("Value not recognized in enum AlterTSConfigType"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case 0: - return "ALTER_SUBSCRIPTION_OPTIONS"; - case 1: - return "ALTER_SUBSCRIPTION_CONNECTION"; - case 2: - return "ALTER_SUBSCRIPTION_SET_PUBLICATION"; - case 3: - return "ALTER_SUBSCRIPTION_ADD_PUBLICATION"; - case 4: - return "ALTER_SUBSCRIPTION_DROP_PUBLICATION"; - case 5: - return "ALTER_SUBSCRIPTION_REFRESH"; - case 6: - return "ALTER_SUBSCRIPTION_ENABLED"; - default: - throw new Error("Value not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case 0: - return "ONCOMMIT_NOOP"; - case 1: - return "ONCOMMIT_PRESERVE_ROWS"; - case 2: - return "ONCOMMIT_DELETE_ROWS"; - case 3: - return "ONCOMMIT_DROP"; - default: - throw new Error("Value not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case 0: - return "PARAM_EXTERN"; - case 1: - return "PARAM_EXEC"; - case 2: - return "PARAM_SUBLINK"; - case 3: - return "PARAM_MULTIEXPR"; - default: - throw new Error("Value not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case 0: - return "COERCION_IMPLICIT"; - case 1: - return "COERCION_ASSIGNMENT"; - case 2: - return "COERCION_PLPGSQL"; - case 3: - return "COERCION_EXPLICIT"; - default: - throw new Error("Value not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case 0: - return "COERCE_EXPLICIT_CALL"; - case 1: - return "COERCE_EXPLICIT_CAST"; - case 2: - return "COERCE_IMPLICIT_CAST"; - case 3: - return "COERCE_SQL_SYNTAX"; - default: - throw new Error("Value not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case 0: - return "AND_EXPR"; - case 1: - return "OR_EXPR"; - case 2: - return "NOT_EXPR"; - default: - throw new Error("Value not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case 0: - return "EXISTS_SUBLINK"; - case 1: - return "ALL_SUBLINK"; - case 2: - return "ANY_SUBLINK"; - case 3: - return "ROWCOMPARE_SUBLINK"; - case 4: - return "EXPR_SUBLINK"; - case 5: - return "MULTIEXPR_SUBLINK"; - case 6: - return "ARRAY_SUBLINK"; - case 7: - return "CTE_SUBLINK"; - default: - throw new Error("Value not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case 0: - return "ROWCOMPARE_LT"; - case 1: - return "ROWCOMPARE_LE"; - case 2: - return "ROWCOMPARE_EQ"; - case 3: - return "ROWCOMPARE_GE"; - case 4: - return "ROWCOMPARE_GT"; - case 5: - return "ROWCOMPARE_NE"; - default: - throw new Error("Value not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case 0: - return "IS_GREATEST"; - case 1: - return "IS_LEAST"; - default: - throw new Error("Value not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case 0: - return "SVFOP_CURRENT_DATE"; - case 1: - return "SVFOP_CURRENT_TIME"; - case 2: - return "SVFOP_CURRENT_TIME_N"; - case 3: - return "SVFOP_CURRENT_TIMESTAMP"; - case 4: - return "SVFOP_CURRENT_TIMESTAMP_N"; - case 5: - return "SVFOP_LOCALTIME"; - case 6: - return "SVFOP_LOCALTIME_N"; - case 7: - return "SVFOP_LOCALTIMESTAMP"; - case 8: - return "SVFOP_LOCALTIMESTAMP_N"; - case 9: - return "SVFOP_CURRENT_ROLE"; - case 10: - return "SVFOP_CURRENT_USER"; - case 11: - return "SVFOP_USER"; - case 12: - return "SVFOP_SESSION_USER"; - case 13: - return "SVFOP_CURRENT_CATALOG"; - case 14: - return "SVFOP_CURRENT_SCHEMA"; - default: - throw new Error("Value not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case 0: - return "IS_XMLCONCAT"; - case 1: - return "IS_XMLELEMENT"; - case 2: - return "IS_XMLFOREST"; - case 3: - return "IS_XMLPARSE"; - case 4: - return "IS_XMLPI"; - case 5: - return "IS_XMLROOT"; - case 6: - return "IS_XMLSERIALIZE"; - case 7: - return "IS_DOCUMENT"; - default: - throw new Error("Value not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case 0: - return "XMLOPTION_DOCUMENT"; - case 1: - return "XMLOPTION_CONTENT"; - default: - throw new Error("Value not recognized in enum XmlOptionType"); - } - } - case "NullTestType": - { - switch (key) { - case 0: - return "IS_NULL"; - case 1: - return "IS_NOT_NULL"; - default: - throw new Error("Value not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case 0: - return "IS_TRUE"; - case 1: - return "IS_NOT_TRUE"; - case 2: - return "IS_FALSE"; - case 3: - return "IS_NOT_FALSE"; - case 4: - return "IS_UNKNOWN"; - case 5: - return "IS_NOT_UNKNOWN"; - default: - throw new Error("Value not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case 0: - return "CMD_UNKNOWN"; - case 1: - return "CMD_SELECT"; - case 2: - return "CMD_UPDATE"; - case 3: - return "CMD_INSERT"; - case 4: - return "CMD_DELETE"; - case 5: - return "CMD_UTILITY"; - case 6: - return "CMD_NOTHING"; - default: - throw new Error("Value not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case 0: - return "JOIN_INNER"; - case 1: - return "JOIN_LEFT"; - case 2: - return "JOIN_FULL"; - case 3: - return "JOIN_RIGHT"; - case 4: - return "JOIN_SEMI"; - case 5: - return "JOIN_ANTI"; - case 6: - return "JOIN_UNIQUE_OUTER"; - case 7: - return "JOIN_UNIQUE_INNER"; - default: - throw new Error("Value not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case 0: - return "AGG_PLAIN"; - case 1: - return "AGG_SORTED"; - case 2: - return "AGG_HASHED"; - case 3: - return "AGG_MIXED"; - default: - throw new Error("Value not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case 0: - return "AGGSPLIT_SIMPLE"; - case 1: - return "AGGSPLIT_INITIAL_SERIAL"; - case 2: - return "AGGSPLIT_FINAL_DESERIAL"; - default: - throw new Error("Value not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case 0: - return "SETOPCMD_INTERSECT"; - case 1: - return "SETOPCMD_INTERSECT_ALL"; - case 2: - return "SETOPCMD_EXCEPT"; - case 3: - return "SETOPCMD_EXCEPT_ALL"; - default: - throw new Error("Value not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case 0: - return "SETOP_SORTED"; - case 1: - return "SETOP_HASHED"; - default: - throw new Error("Value not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case 0: - return "ONCONFLICT_NONE"; - case 1: - return "ONCONFLICT_NOTHING"; - case 2: - return "ONCONFLICT_UPDATE"; - default: - throw new Error("Value not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case 0: - return "LIMIT_OPTION_DEFAULT"; - case 1: - return "LIMIT_OPTION_COUNT"; - case 2: - return "LIMIT_OPTION_WITH_TIES"; - default: - throw new Error("Value not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case 0: - return "LCS_NONE"; - case 1: - return "LCS_FORKEYSHARE"; - case 2: - return "LCS_FORSHARE"; - case 3: - return "LCS_FORNOKEYUPDATE"; - case 4: - return "LCS_FORUPDATE"; - default: - throw new Error("Value not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case 0: - return "LockWaitBlock"; - case 1: - return "LockWaitSkip"; - case 2: - return "LockWaitError"; - default: - throw new Error("Value not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case 0: - return "LockTupleKeyShare"; - case 1: - return "LockTupleShare"; - case 2: - return "LockTupleNoKeyExclusive"; - case 3: - return "LockTupleExclusive"; - default: - throw new Error("Value not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case 0: - return "NO_KEYWORD"; - case 1: - return "UNRESERVED_KEYWORD"; - case 2: - return "COL_NAME_KEYWORD"; - case 3: - return "TYPE_FUNC_NAME_KEYWORD"; - case 4: - return "RESERVED_KEYWORD"; - default: - throw new Error("Value not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case 0: - return "NUL"; - case 37: - return "ASCII_37"; - case 40: - return "ASCII_40"; - case 41: - return "ASCII_41"; - case 42: - return "ASCII_42"; - case 43: - return "ASCII_43"; - case 44: - return "ASCII_44"; - case 45: - return "ASCII_45"; - case 46: - return "ASCII_46"; - case 47: - return "ASCII_47"; - case 58: - return "ASCII_58"; - case 59: - return "ASCII_59"; - case 60: - return "ASCII_60"; - case 61: - return "ASCII_61"; - case 62: - return "ASCII_62"; - case 63: - return "ASCII_63"; - case 91: - return "ASCII_91"; - case 92: - return "ASCII_92"; - case 93: - return "ASCII_93"; - case 94: - return "ASCII_94"; - case 258: - return "IDENT"; - case 259: - return "UIDENT"; - case 260: - return "FCONST"; - case 261: - return "SCONST"; - case 262: - return "USCONST"; - case 263: - return "BCONST"; - case 264: - return "XCONST"; - case 265: - return "Op"; - case 266: - return "ICONST"; - case 267: - return "PARAM"; - case 268: - return "TYPECAST"; - case 269: - return "DOT_DOT"; - case 270: - return "COLON_EQUALS"; - case 271: - return "EQUALS_GREATER"; - case 272: - return "LESS_EQUALS"; - case 273: - return "GREATER_EQUALS"; - case 274: - return "NOT_EQUALS"; - case 275: - return "SQL_COMMENT"; - case 276: - return "C_COMMENT"; - case 277: - return "ABORT_P"; - case 278: - return "ABSOLUTE_P"; - case 279: - return "ACCESS"; - case 280: - return "ACTION"; - case 281: - return "ADD_P"; - case 282: - return "ADMIN"; - case 283: - return "AFTER"; - case 284: - return "AGGREGATE"; - case 285: - return "ALL"; - case 286: - return "ALSO"; - case 287: - return "ALTER"; - case 288: - return "ALWAYS"; - case 289: - return "ANALYSE"; - case 290: - return "ANALYZE"; - case 291: - return "AND"; - case 292: - return "ANY"; - case 293: - return "ARRAY"; - case 294: - return "AS"; - case 295: - return "ASC"; - case 296: - return "ASENSITIVE"; - case 297: - return "ASSERTION"; - case 298: - return "ASSIGNMENT"; - case 299: - return "ASYMMETRIC"; - case 300: - return "ATOMIC"; - case 301: - return "AT"; - case 302: - return "ATTACH"; - case 303: - return "ATTRIBUTE"; - case 304: - return "AUTHORIZATION"; - case 305: - return "BACKWARD"; - case 306: - return "BEFORE"; - case 307: - return "BEGIN_P"; - case 308: - return "BETWEEN"; - case 309: - return "BIGINT"; - case 310: - return "BINARY"; - case 311: - return "BIT"; - case 312: - return "BOOLEAN_P"; - case 313: - return "BOTH"; - case 314: - return "BREADTH"; - case 315: - return "BY"; - case 316: - return "CACHE"; - case 317: - return "CALL"; - case 318: - return "CALLED"; - case 319: - return "CASCADE"; - case 320: - return "CASCADED"; - case 321: - return "CASE"; - case 322: - return "CAST"; - case 323: - return "CATALOG_P"; - case 324: - return "CHAIN"; - case 325: - return "CHAR_P"; - case 326: - return "CHARACTER"; - case 327: - return "CHARACTERISTICS"; - case 328: - return "CHECK"; - case 329: - return "CHECKPOINT"; - case 330: - return "CLASS"; - case 331: - return "CLOSE"; - case 332: - return "CLUSTER"; - case 333: - return "COALESCE"; - case 334: - return "COLLATE"; - case 335: - return "COLLATION"; - case 336: - return "COLUMN"; - case 337: - return "COLUMNS"; - case 338: - return "COMMENT"; - case 339: - return "COMMENTS"; - case 340: - return "COMMIT"; - case 341: - return "COMMITTED"; - case 342: - return "COMPRESSION"; - case 343: - return "CONCURRENTLY"; - case 344: - return "CONFIGURATION"; - case 345: - return "CONFLICT"; - case 346: - return "CONNECTION"; - case 347: - return "CONSTRAINT"; - case 348: - return "CONSTRAINTS"; - case 349: - return "CONTENT_P"; - case 350: - return "CONTINUE_P"; - case 351: - return "CONVERSION_P"; - case 352: - return "COPY"; - case 353: - return "COST"; - case 354: - return "CREATE"; - case 355: - return "CROSS"; - case 356: - return "CSV"; - case 357: - return "CUBE"; - case 358: - return "CURRENT_P"; - case 359: - return "CURRENT_CATALOG"; - case 360: - return "CURRENT_DATE"; - case 361: - return "CURRENT_ROLE"; - case 362: - return "CURRENT_SCHEMA"; - case 363: - return "CURRENT_TIME"; - case 364: - return "CURRENT_TIMESTAMP"; - case 365: - return "CURRENT_USER"; - case 366: - return "CURSOR"; - case 367: - return "CYCLE"; - case 368: - return "DATA_P"; - case 369: - return "DATABASE"; - case 370: - return "DAY_P"; - case 371: - return "DEALLOCATE"; - case 372: - return "DEC"; - case 373: - return "DECIMAL_P"; - case 374: - return "DECLARE"; - case 375: - return "DEFAULT"; - case 376: - return "DEFAULTS"; - case 377: - return "DEFERRABLE"; - case 378: - return "DEFERRED"; - case 379: - return "DEFINER"; - case 380: - return "DELETE_P"; - case 381: - return "DELIMITER"; - case 382: - return "DELIMITERS"; - case 383: - return "DEPENDS"; - case 384: - return "DEPTH"; - case 385: - return "DESC"; - case 386: - return "DETACH"; - case 387: - return "DICTIONARY"; - case 388: - return "DISABLE_P"; - case 389: - return "DISCARD"; - case 390: - return "DISTINCT"; - case 391: - return "DO"; - case 392: - return "DOCUMENT_P"; - case 393: - return "DOMAIN_P"; - case 394: - return "DOUBLE_P"; - case 395: - return "DROP"; - case 396: - return "EACH"; - case 397: - return "ELSE"; - case 398: - return "ENABLE_P"; - case 399: - return "ENCODING"; - case 400: - return "ENCRYPTED"; - case 401: - return "END_P"; - case 402: - return "ENUM_P"; - case 403: - return "ESCAPE"; - case 404: - return "EVENT"; - case 405: - return "EXCEPT"; - case 406: - return "EXCLUDE"; - case 407: - return "EXCLUDING"; - case 408: - return "EXCLUSIVE"; - case 409: - return "EXECUTE"; - case 410: - return "EXISTS"; - case 411: - return "EXPLAIN"; - case 412: - return "EXPRESSION"; - case 413: - return "EXTENSION"; - case 414: - return "EXTERNAL"; - case 415: - return "EXTRACT"; - case 416: - return "FALSE_P"; - case 417: - return "FAMILY"; - case 418: - return "FETCH"; - case 419: - return "FILTER"; - case 420: - return "FINALIZE"; - case 421: - return "FIRST_P"; - case 422: - return "FLOAT_P"; - case 423: - return "FOLLOWING"; - case 424: - return "FOR"; - case 425: - return "FORCE"; - case 426: - return "FOREIGN"; - case 427: - return "FORWARD"; - case 428: - return "FREEZE"; - case 429: - return "FROM"; - case 430: - return "FULL"; - case 431: - return "FUNCTION"; - case 432: - return "FUNCTIONS"; - case 433: - return "GENERATED"; - case 434: - return "GLOBAL"; - case 435: - return "GRANT"; - case 436: - return "GRANTED"; - case 437: - return "GREATEST"; - case 438: - return "GROUP_P"; - case 439: - return "GROUPING"; - case 440: - return "GROUPS"; - case 441: - return "HANDLER"; - case 442: - return "HAVING"; - case 443: - return "HEADER_P"; - case 444: - return "HOLD"; - case 445: - return "HOUR_P"; - case 446: - return "IDENTITY_P"; - case 447: - return "IF_P"; - case 448: - return "ILIKE"; - case 449: - return "IMMEDIATE"; - case 450: - return "IMMUTABLE"; - case 451: - return "IMPLICIT_P"; - case 452: - return "IMPORT_P"; - case 453: - return "IN_P"; - case 454: - return "INCLUDE"; - case 455: - return "INCLUDING"; - case 456: - return "INCREMENT"; - case 457: - return "INDEX"; - case 458: - return "INDEXES"; - case 459: - return "INHERIT"; - case 460: - return "INHERITS"; - case 461: - return "INITIALLY"; - case 462: - return "INLINE_P"; - case 463: - return "INNER_P"; - case 464: - return "INOUT"; - case 465: - return "INPUT_P"; - case 466: - return "INSENSITIVE"; - case 467: - return "INSERT"; - case 468: - return "INSTEAD"; - case 469: - return "INT_P"; - case 470: - return "INTEGER"; - case 471: - return "INTERSECT"; - case 472: - return "INTERVAL"; - case 473: - return "INTO"; - case 474: - return "INVOKER"; - case 475: - return "IS"; - case 476: - return "ISNULL"; - case 477: - return "ISOLATION"; - case 478: - return "JOIN"; - case 479: - return "KEY"; - case 480: - return "LABEL"; - case 481: - return "LANGUAGE"; - case 482: - return "LARGE_P"; - case 483: - return "LAST_P"; - case 484: - return "LATERAL_P"; - case 485: - return "LEADING"; - case 486: - return "LEAKPROOF"; - case 487: - return "LEAST"; - case 488: - return "LEFT"; - case 489: - return "LEVEL"; - case 490: - return "LIKE"; - case 491: - return "LIMIT"; - case 492: - return "LISTEN"; - case 493: - return "LOAD"; - case 494: - return "LOCAL"; - case 495: - return "LOCALTIME"; - case 496: - return "LOCALTIMESTAMP"; - case 497: - return "LOCATION"; - case 498: - return "LOCK_P"; - case 499: - return "LOCKED"; - case 500: - return "LOGGED"; - case 501: - return "MAPPING"; - case 502: - return "MATCH"; - case 503: - return "MATERIALIZED"; - case 504: - return "MAXVALUE"; - case 505: - return "METHOD"; - case 506: - return "MINUTE_P"; - case 507: - return "MINVALUE"; - case 508: - return "MODE"; - case 509: - return "MONTH_P"; - case 510: - return "MOVE"; - case 511: - return "NAME_P"; - case 512: - return "NAMES"; - case 513: - return "NATIONAL"; - case 514: - return "NATURAL"; - case 515: - return "NCHAR"; - case 516: - return "NEW"; - case 517: - return "NEXT"; - case 518: - return "NFC"; - case 519: - return "NFD"; - case 520: - return "NFKC"; - case 521: - return "NFKD"; - case 522: - return "NO"; - case 523: - return "NONE"; - case 524: - return "NORMALIZE"; - case 525: - return "NORMALIZED"; - case 526: - return "NOT"; - case 527: - return "NOTHING"; - case 528: - return "NOTIFY"; - case 529: - return "NOTNULL"; - case 530: - return "NOWAIT"; - case 531: - return "NULL_P"; - case 532: - return "NULLIF"; - case 533: - return "NULLS_P"; - case 534: - return "NUMERIC"; - case 535: - return "OBJECT_P"; - case 536: - return "OF"; - case 537: - return "OFF"; - case 538: - return "OFFSET"; - case 539: - return "OIDS"; - case 540: - return "OLD"; - case 541: - return "ON"; - case 542: - return "ONLY"; - case 543: - return "OPERATOR"; - case 544: - return "OPTION"; - case 545: - return "OPTIONS"; - case 546: - return "OR"; - case 547: - return "ORDER"; - case 548: - return "ORDINALITY"; - case 549: - return "OTHERS"; - case 550: - return "OUT_P"; - case 551: - return "OUTER_P"; - case 552: - return "OVER"; - case 553: - return "OVERLAPS"; - case 554: - return "OVERLAY"; - case 555: - return "OVERRIDING"; - case 556: - return "OWNED"; - case 557: - return "OWNER"; - case 558: - return "PARALLEL"; - case 559: - return "PARSER"; - case 560: - return "PARTIAL"; - case 561: - return "PARTITION"; - case 562: - return "PASSING"; - case 563: - return "PASSWORD"; - case 564: - return "PLACING"; - case 565: - return "PLANS"; - case 566: - return "POLICY"; - case 567: - return "POSITION"; - case 568: - return "PRECEDING"; - case 569: - return "PRECISION"; - case 570: - return "PRESERVE"; - case 571: - return "PREPARE"; - case 572: - return "PREPARED"; - case 573: - return "PRIMARY"; - case 574: - return "PRIOR"; - case 575: - return "PRIVILEGES"; - case 576: - return "PROCEDURAL"; - case 577: - return "PROCEDURE"; - case 578: - return "PROCEDURES"; - case 579: - return "PROGRAM"; - case 580: - return "PUBLICATION"; - case 581: - return "QUOTE"; - case 582: - return "RANGE"; - case 583: - return "READ"; - case 584: - return "REAL"; - case 585: - return "REASSIGN"; - case 586: - return "RECHECK"; - case 587: - return "RECURSIVE"; - case 588: - return "REF_P"; - case 589: - return "REFERENCES"; - case 590: - return "REFERENCING"; - case 591: - return "REFRESH"; - case 592: - return "REINDEX"; - case 593: - return "RELATIVE_P"; - case 594: - return "RELEASE"; - case 595: - return "RENAME"; - case 596: - return "REPEATABLE"; - case 597: - return "REPLACE"; - case 598: - return "REPLICA"; - case 599: - return "RESET"; - case 600: - return "RESTART"; - case 601: - return "RESTRICT"; - case 602: - return "RETURN"; - case 603: - return "RETURNING"; - case 604: - return "RETURNS"; - case 605: - return "REVOKE"; - case 606: - return "RIGHT"; - case 607: - return "ROLE"; - case 608: - return "ROLLBACK"; - case 609: - return "ROLLUP"; - case 610: - return "ROUTINE"; - case 611: - return "ROUTINES"; - case 612: - return "ROW"; - case 613: - return "ROWS"; - case 614: - return "RULE"; - case 615: - return "SAVEPOINT"; - case 616: - return "SCHEMA"; - case 617: - return "SCHEMAS"; - case 618: - return "SCROLL"; - case 619: - return "SEARCH"; - case 620: - return "SECOND_P"; - case 621: - return "SECURITY"; - case 622: - return "SELECT"; - case 623: - return "SEQUENCE"; - case 624: - return "SEQUENCES"; - case 625: - return "SERIALIZABLE"; - case 626: - return "SERVER"; - case 627: - return "SESSION"; - case 628: - return "SESSION_USER"; - case 629: - return "SET"; - case 630: - return "SETS"; - case 631: - return "SETOF"; - case 632: - return "SHARE"; - case 633: - return "SHOW"; - case 634: - return "SIMILAR"; - case 635: - return "SIMPLE"; - case 636: - return "SKIP"; - case 637: - return "SMALLINT"; - case 638: - return "SNAPSHOT"; - case 639: - return "SOME"; - case 640: - return "SQL_P"; - case 641: - return "STABLE"; - case 642: - return "STANDALONE_P"; - case 643: - return "START"; - case 644: - return "STATEMENT"; - case 645: - return "STATISTICS"; - case 646: - return "STDIN"; - case 647: - return "STDOUT"; - case 648: - return "STORAGE"; - case 649: - return "STORED"; - case 650: - return "STRICT_P"; - case 651: - return "STRIP_P"; - case 652: - return "SUBSCRIPTION"; - case 653: - return "SUBSTRING"; - case 654: - return "SUPPORT"; - case 655: - return "SYMMETRIC"; - case 656: - return "SYSID"; - case 657: - return "SYSTEM_P"; - case 658: - return "TABLE"; - case 659: - return "TABLES"; - case 660: - return "TABLESAMPLE"; - case 661: - return "TABLESPACE"; - case 662: - return "TEMP"; - case 663: - return "TEMPLATE"; - case 664: - return "TEMPORARY"; - case 665: - return "TEXT_P"; - case 666: - return "THEN"; - case 667: - return "TIES"; - case 668: - return "TIME"; - case 669: - return "TIMESTAMP"; - case 670: - return "TO"; - case 671: - return "TRAILING"; - case 672: - return "TRANSACTION"; - case 673: - return "TRANSFORM"; - case 674: - return "TREAT"; - case 675: - return "TRIGGER"; - case 676: - return "TRIM"; - case 677: - return "TRUE_P"; - case 678: - return "TRUNCATE"; - case 679: - return "TRUSTED"; - case 680: - return "TYPE_P"; - case 681: - return "TYPES_P"; - case 682: - return "UESCAPE"; - case 683: - return "UNBOUNDED"; - case 684: - return "UNCOMMITTED"; - case 685: - return "UNENCRYPTED"; - case 686: - return "UNION"; - case 687: - return "UNIQUE"; - case 688: - return "UNKNOWN"; - case 689: - return "UNLISTEN"; - case 690: - return "UNLOGGED"; - case 691: - return "UNTIL"; - case 692: - return "UPDATE"; - case 693: - return "USER"; - case 694: - return "USING"; - case 695: - return "VACUUM"; - case 696: - return "VALID"; - case 697: - return "VALIDATE"; - case 698: - return "VALIDATOR"; - case 699: - return "VALUE_P"; - case 700: - return "VALUES"; - case 701: - return "VARCHAR"; - case 702: - return "VARIADIC"; - case 703: - return "VARYING"; - case 704: - return "VERBOSE"; - case 705: - return "VERSION_P"; - case 706: - return "VIEW"; - case 707: - return "VIEWS"; - case 708: - return "VOLATILE"; - case 709: - return "WHEN"; - case 710: - return "WHERE"; - case 711: - return "WHITESPACE_P"; - case 712: - return "WINDOW"; - case 713: - return "WITH"; - case 714: - return "WITHIN"; - case 715: - return "WITHOUT"; - case 716: - return "WORK"; - case 717: - return "WRAPPER"; - case 718: - return "WRITE"; - case 719: - return "XML_P"; - case 720: - return "XMLATTRIBUTES"; - case 721: - return "XMLCONCAT"; - case 722: - return "XMLELEMENT"; - case 723: - return "XMLEXISTS"; - case 724: - return "XMLFOREST"; - case 725: - return "XMLNAMESPACES"; - case 726: - return "XMLPARSE"; - case 727: - return "XMLPI"; - case 728: - return "XMLROOT"; - case 729: - return "XMLSERIALIZE"; - case 730: - return "XMLTABLE"; - case 731: - return "YEAR_P"; - case 732: - return "YES_P"; - case 733: - return "ZONE"; - case 734: - return "NOT_LA"; - case 735: - return "NULLS_LA"; - case 736: - return "WITH_LA"; - case 737: - return "MODE_TYPE_NAME"; - case 738: - return "MODE_PLPGSQL_EXPR"; - case 739: - return "MODE_PLPGSQL_ASSIGN1"; - case 740: - return "MODE_PLPGSQL_ASSIGN2"; - case 741: - return "MODE_PLPGSQL_ASSIGN3"; - case 742: - return "UMINUS"; - default: - throw new Error("Value not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/14/runtime-schema.ts b/packages/transform/src/14/runtime-schema.ts deleted file mode 100644 index 6966dce2..00000000 --- a/packages/transform/src/14/runtime-schema.ts +++ /dev/null @@ -1,8716 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export interface FieldSpec { - name: string; - type: string; - isArray: boolean; - optional: boolean; -} -export interface NodeSpec { - name: string; - isNode: boolean; - fields: FieldSpec[]; -} -export const runtimeSchema: NodeSpec[] = [ - { - name: 'A_ArrayExpr', - isNode: true, - fields: [ - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Const', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Expr', - isNode: true, - fields: [ - { - name: 'kind', - type: 'A_Expr_Kind', - isArray: false, - optional: true - }, - { - name: 'lexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indices', - isNode: true, - fields: [ - { - name: 'is_slice', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lidx', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'uidx', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indirection', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'A_Star', - isNode: true, - fields: [ - - ] - }, - { - name: 'AccessPriv', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'priv_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Aggref', - isNode: true, - fields: [ - { - name: 'aggargtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggdirectargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggdistinct', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'aggfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'aggorder', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggsplit', - type: 'AggSplit', - isArray: false, - optional: true - }, - { - name: 'aggstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'aggtransno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'aggtranstype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Alias', - isNode: true, - fields: [ - { - name: 'aliasname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterCollationStmt', - isNode: true, - fields: [ - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDatabaseSetStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterDatabaseStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDefaultPrivilegesStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'GrantStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDomainStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEnumStmt', - isNode: true, - fields: [ - { - name: 'newVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newValIsAfter', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newValNeighbor', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'oldVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'skipIfNewValExists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEventTrigStmt', - isNode: true, - fields: [ - { - name: 'tgenabled', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionContentsStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterForeignServerStmt', - isNode: true, - fields: [ - { - name: 'has_version', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterFunctionStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlternativeSubPlan', - isNode: true, - fields: [ - { - name: 'subplans', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectDependsStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'remove', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectSchemaStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newschema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterOperatorStmt', - isNode: true, - fields: [ - { - name: 'opername', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'isDrop', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOwnerStmt', - isNode: true, - fields: [ - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPolicyStmt', - isNode: true, - fields: [ - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPublicationStmt', - isNode: true, - fields: [ - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'tableAction', - type: 'DefElemAction', - isArray: false, - optional: true - }, - { - name: 'tables', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterRoleSetStmt', - isNode: true, - fields: [ - { - name: 'database', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterRoleStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'stxstattarget', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'AlterSubscriptionType', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSystemStmt', - isNode: true, - fields: [ - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableCmd', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'num', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recurse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'AlterTableType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableMoveAllStmt', - isNode: true, - fields: [ - { - name: 'new_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'orig_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTableSpaceOptionsStmt', - isNode: true, - fields: [ - { - name: 'isReset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableStmt', - isNode: true, - fields: [ - { - name: 'cmds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTSConfigurationStmt', - isNode: true, - fields: [ - { - name: 'cfgname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'dicts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'AlterTSConfigType', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tokentype', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTSDictionaryStmt', - isNode: true, - fields: [ - { - name: 'dictname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTypeStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterUserMappingStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayCoerceExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'elemexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayExpr', - isNode: true, - fields: [ - { - name: 'array_collid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'array_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'element_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'multidims', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BitString', - isNode: true, - fields: [ - { - name: 'str', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'BooleanTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'booltesttype', - type: 'BoolTestType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BoolExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'boolop', - type: 'BoolExprType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallContext', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallStmt', - isNode: true, - fields: [ - { - name: 'funccall', - type: 'FuncCall', - isArray: false, - optional: true - }, - { - name: 'funcexpr', - type: 'FuncExpr', - isArray: false, - optional: true - }, - { - name: 'outargs', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CaseExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'casecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'casetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'defresult', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseTestExpr', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseWhen', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'result', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CheckPointStmt', - isNode: true, - fields: [ - - ] - }, - { - name: 'ClosePortalStmt', - isNode: true, - fields: [ - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ClusterStmt', - isNode: true, - fields: [ - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoalesceExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coalescecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'coalescetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomain', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coercionformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomainValue', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceViaIO', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateClause', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnDef', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'compression', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cooked_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fdwoptions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'generated', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identity', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identitySequence', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'inhcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'is_from_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'raw_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'storage', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnRef', - isNode: true, - fields: [ - { - name: 'fields', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommentStmt', - isNode: true, - fields: [ - { - name: 'comment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommonTableExpr', - isNode: true, - fields: [ - { - name: 'aliascolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctematerialized', - type: 'CTEMaterialize', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'ctequery', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cterecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'cterefcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cycle_clause', - type: 'CTECycleClause', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'search_clause', - type: 'CTESearchClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'CompositeTypeStmt', - isNode: true, - fields: [ - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typevar', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'Constraint', - isNode: true, - fields: [ - { - name: 'access_method', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'contype', - type: 'ConstrType', - isArray: false, - optional: true - }, - { - name: 'cooked_expr', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'exclusions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_del_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_matchtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_upd_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'generated_when', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'including', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexspace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'initially_valid', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_no_inherit', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'keys', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'old_conpfeqop', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'old_pktable_oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pktable', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'raw_expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'skip_validation', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'where_clause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConstraintsSetStmt', - isNode: true, - fields: [ - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'deferred', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConvertRowtypeExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'convertformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CopyStmt', - isNode: true, - fields: [ - { - name: 'attlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'is_from', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_program', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateAmStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'amtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'handler_name', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateCastStmt', - isNode: true, - fields: [ - { - name: 'context', - type: 'CoercionContext', - isArray: false, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'inout', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sourcetype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'targettype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateConversionStmt', - isNode: true, - fields: [ - { - name: 'conversion_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'def', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'for_encoding_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'to_encoding_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatedbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateDomainStmt', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'domainname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateEnumStmt', - isNode: true, - fields: [ - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'vals', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateEventTrigStmt', - isNode: true, - fields: [ - { - name: 'eventname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenclause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateForeignServerStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'servertype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateForeignTableStmt', - isNode: true, - fields: [ - { - name: 'base', - type: 'CreateStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateFunctionStmt', - isNode: true, - fields: [ - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_procedure', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parameters', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'returnType', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'sql_body', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassItem', - isNode: true, - fields: [ - { - name: 'class_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'itemtype', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'order_family', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'storedtype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'datatype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'isDefault', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreatePLangStmt', - isNode: true, - fields: [ - { - name: 'plhandler', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plinline', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pltrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'plvalidator', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePolicyStmt', - isNode: true, - fields: [ - { - name: 'cmd_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'permissive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePublicationStmt', - isNode: true, - fields: [ - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'tables', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRangeStmt', - isNode: true, - fields: [ - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRoleStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'stmt_type', - type: 'RoleStmtType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSchemaStmt', - isNode: true, - fields: [ - { - name: 'authrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'schemaElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ownerId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'exprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stat_types', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stxcomment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'transformed', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inhRelations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ofTypename', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'oncommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partbound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'partspec', - type: 'PartitionSpec', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'tableElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableAsStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'into', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'is_select_into', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'location', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'owner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTransformStmt', - isNode: true, - fields: [ - { - name: 'fromsql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'lang', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tosql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'type_name', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTrigStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'constrrel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'events', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'row', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'timing', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'transitionRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateUserMappingStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'CTECycleClause', - isNode: true, - fields: [ - { - name: 'cycle_col_list', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cycle_mark_collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_column', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_neop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_value', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cycle_path_column', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CTESearchClause', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'search_breadth_first', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'search_col_list', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'search_seq_column', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CurrentOfExpr', - isNode: true, - fields: [ - { - name: 'cursor_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'cursor_param', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cvarno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeallocateStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeclareCursorStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefElem', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'defaction', - type: 'DefElemAction', - isArray: false, - optional: true - }, - { - name: 'defname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'defnamespace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefineStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'definition', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'oldstyle', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeleteStmt', - isNode: true, - fields: [ - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'DiscardStmt', - isNode: true, - fields: [ - { - name: 'target', - type: 'DiscardMode', - isArray: false, - optional: true - } - ] - }, - { - name: 'DistinctExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DoStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropdbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropOwnedStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropRoleStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'removeType', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropUserMappingStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ExecuteStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ExplainStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Expr', - isNode: true, - fields: [ - - ] - }, - { - name: 'FetchStmt', - isNode: true, - fields: [ - { - name: 'direction', - type: 'FetchDirection', - isArray: false, - optional: true - }, - { - name: 'howMany', - type: 'int64', - isArray: false, - optional: true - }, - { - name: 'ismove', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldSelect', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnum', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldStore', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'newvals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Float', - isNode: true, - fields: [ - { - name: 'str', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FromExpr', - isNode: true, - fields: [ - { - name: 'fromlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncCall', - isNode: true, - fields: [ - { - name: 'agg_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_filter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'agg_order', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'agg_star', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_within_group', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func_variadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'over', - type: 'WindowDef', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'funcid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FunctionParameter', - isNode: true, - fields: [ - { - name: 'argType', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'defexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'mode', - type: 'FunctionParameterMode', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'GrantRoleStmt', - isNode: true, - fields: [ - { - name: 'admin_opt', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'granted_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantee_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantor', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'GrantStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'grant_option', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'grantees', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantor', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'privileges', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targtype', - type: 'GrantTargetType', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingFunc', - isNode: true, - fields: [ - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingSet', - isNode: true, - fields: [ - { - name: 'content', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'GroupingSetKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ImportForeignSchemaStmt', - isNode: true, - fields: [ - { - name: 'list_type', - type: 'ImportForeignSchemaType', - isArray: false, - optional: true - }, - { - name: 'local_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'remote_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'server_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'table_list', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IndexElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indexcolname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nulls_ordering', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassopts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordering', - type: 'SortByDir', - isArray: false, - optional: true - } - ] - }, - { - name: 'IndexStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'excludeOpNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'idxcomment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'idxname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'indexIncludingParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'indexParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'oldCreateSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldFirstRelfilenodeSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldNode', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'primary', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'transformed', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'unique', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferClause', - isNode: true, - fields: [ - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferenceElem', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'infercollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inferopclass', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InlineCodeBlock', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langIsTrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'source_text', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'InsertStmt', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictClause', - type: 'OnConflictClause', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'selectStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'Integer', - isNode: true, - fields: [ - { - name: 'ival', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'IntList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IntoClause', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onCommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpaceName', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'viewQuery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'JoinExpr', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'isNatural', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'join_using_alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'List', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ListenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LoadStmt', - isNode: true, - fields: [ - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockingClause', - isNode: true, - fields: [ - { - name: 'lockedRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockStmt', - isNode: true, - fields: [ - { - name: 'mode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MinMaxExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'minmaxcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'minmaxtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'MinMaxOp', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'MultiAssignRef', - isNode: true, - fields: [ - { - name: 'colno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'ncolumns', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'source', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NamedArgExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argnumber', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NextValueExpr', - isNode: true, - fields: [ - { - name: 'seqid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NotifyStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'payload', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Null', - isNode: true, - fields: [ - - ] - }, - { - name: 'NullIfExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NullTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argisrow', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nulltesttype', - type: 'NullTestType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ObjectWithArgs', - isNode: true, - fields: [ - { - name: 'args_unspecified', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objfuncargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OidList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OnConflictClause', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'infer', - type: 'InferClause', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OnConflictExpr', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'arbiterElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'arbiterWhere', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'constraint', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'exclRelIndex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'exclRelTlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictSet', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictWhere', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Param', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramid', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramkind', - type: 'ParamKind', - isArray: false, - optional: true - }, - { - name: 'paramtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramtypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParamRef', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParseResult', - isNode: false, - fields: [ - { - name: 'stmts', - type: 'RawStmt', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionBoundSpec', - isNode: true, - fields: [ - { - name: 'is_default', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'listdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'lowerdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'modulus', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'remainder', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'strategy', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'upperdatums', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionCmd', - isNode: true, - fields: [ - { - name: 'bound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionRangeDatum', - isNode: true, - fields: [ - { - name: 'kind', - type: 'PartitionRangeDatumKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'value', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'partParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strategy', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'PLAssignStmt', - isNode: true, - fields: [ - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nnames', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'SelectStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'PrepareStmt', - isNode: true, - fields: [ - { - name: 'argtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Query', - isNode: true, - fields: [ - { - name: 'canSetTag', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'constraintDeps', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cteList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupDistinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'groupingSets', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'hasAggs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasDistinctOn', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasForUpdate', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasModifyingCTE', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRowSecurity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasSubLinks', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasTargetSRFs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasWindowFuncs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'havingQual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'isReturn', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'jointree', - type: 'FromExpr', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'onConflict', - type: 'OnConflictExpr', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'querySource', - type: 'QuerySource', - isArray: false, - optional: true - }, - { - name: 'resultRelation', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowMarks', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rtable', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'setOperations', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'utilityStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withCheckOptions', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeFunction', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_rowsfrom', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'ordinality', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeSubselect', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFunc', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'namespaces', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFuncCol', - isNode: true, - fields: [ - { - name: 'coldefexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'for_ordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableSample', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'method', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTblEntry', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'checkAsUser', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctelevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrtuples', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'eref', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'extraUpdatedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'funcordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inFromCl', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'insertedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'join_using_alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'joinaliasvars', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinleftcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinmergedcols', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'joinrightcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'rellockmode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'requiredPerms', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'rtekind', - type: 'RTEKind', - isArray: false, - optional: true - }, - { - name: 'security_barrier', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'securityQuals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'selectedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'self_reference', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Query', - isArray: false, - optional: true - }, - { - name: 'tablefunc', - type: 'TableFunc', - isArray: false, - optional: true - }, - { - name: 'tablesample', - type: 'TableSampleClause', - isArray: false, - optional: true - }, - { - name: 'updatedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'values_lists', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblFunction', - isNode: true, - fields: [ - { - name: 'funccolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccolcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funccolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funcexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'funcparams', - type: 'uint64', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblRef', - isNode: true, - fields: [ - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeVar', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'catalogname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'relpersistence', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'RawStmt', - isNode: true, - fields: [ - { - name: 'stmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReassignOwnedStmt', - isNode: true, - fields: [ - { - name: 'newrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RefreshMatViewStmt', - isNode: true, - fields: [ - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReindexStmt', - isNode: true, - fields: [ - { - name: 'kind', - type: 'ReindexObjectType', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'RelabelType', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relabelformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RenameStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'renameType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReplicaIdentityStmt', - isNode: true, - fields: [ - { - name: 'identity_type', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ResTarget', - isNode: true, - fields: [ - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReturnStmt', - isNode: true, - fields: [ - { - name: 'returnval', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RoleSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rolename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roletype', - type: 'RoleSpecType', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowCompareExpr', - isNode: true, - fields: [ - { - name: 'inputcollids', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'largs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilies', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opnos', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rctype', - type: 'RowCompareType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'row_format', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'row_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowMarkClause', - isNode: true, - fields: [ - { - name: 'pushedDown', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rti', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'RuleStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'event', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'instead', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rulename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScalarArrayOpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'hashfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'useOr', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanResult', - isNode: false, - fields: [ - { - name: 'tokens', - type: 'ScanToken', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanToken', - isNode: false, - fields: [ - { - name: 'end', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'keywordKind', - type: 'KeywordKind', - isArray: false, - optional: true - }, - { - name: 'start', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'token', - type: 'Token', - isArray: false, - optional: true - } - ] - }, - { - name: 'SecLabelStmt', - isNode: true, - fields: [ - { - name: 'label', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'provider', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SelectStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupDistinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'havingClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'intoClause', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'lockingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'valuesLists', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetOperationStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'colCollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClauses', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetToDefault', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SortBy', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'node', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortby_dir', - type: 'SortByDir', - isArray: false, - optional: true - }, - { - name: 'sortby_nulls', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'useOp', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'SortGroupClause', - isNode: true, - fields: [ - { - name: 'eqop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'hashable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'nulls_first', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sortop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'tleSortGroupRef', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'SQLValueFunction', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SQLValueFunctionOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'StatsElem', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'String', - isNode: true, - fields: [ - { - name: 'str', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubLink', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'operName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subLinkId', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'subselect', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubPlan', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'firstColCollation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColType', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColTypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'parallel_safe', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'paramIds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'per_call_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'plan_id', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'plan_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'startup_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'unknownEqFalse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'useHashTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubscriptingRef', - isNode: true, - fields: [ - { - name: 'refassgnexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'refcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refcontainertype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refelemtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reflowerindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refrestype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'reftypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refupperindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableFunc', - isNode: true, - fields: [ - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coldefexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'notnulls', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'ns_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ns_uris', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordinalitycol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableLikeClause', - isNode: true, - fields: [ - { - name: 'options', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationOid', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableSampleClause', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'tsmhandler', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TargetEntry', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'resjunk', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'resname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'resno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigcol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigtbl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ressortgroupref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TransactionStmt', - isNode: true, - fields: [ - { - name: 'chain', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'gid', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'TransactionStmtKind', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'savepoint_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TriggerTransition', - isNode: true, - fields: [ - { - name: 'isNew', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TruncateStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'restart_seqs', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeCast', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeName', - isNode: true, - fields: [ - { - name: 'arrayBounds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pct_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'setof', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typemod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmods', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'UnlistenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'UpdateStmt', - isNode: true, - fields: [ - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'VacuumRelation', - isNode: true, - fields: [ - { - name: 'oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'va_cols', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'VacuumStmt', - isNode: true, - fields: [ - { - name: 'is_vacuumcmd', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rels', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'Var', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varattno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varattnosyn', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varlevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varnosyn', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'vartype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'vartypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableSetStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'VariableSetKind', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableShowStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ViewStmt', - isNode: true, - fields: [ - { - name: 'aliases', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'view', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'withCheckOption', - type: 'ViewCheckOption', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowClause', - isNode: true, - fields: [ - { - name: 'copiedOrder', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'endInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'inRangeAsc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inRangeColl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inRangeNullsFirst', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'startInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowDef', - isNode: true, - fields: [ - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowFunc', - isNode: true, - fields: [ - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'winagg', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wincollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wintype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithCheckOption', - isNode: true, - fields: [ - { - name: 'cascaded', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'WCOKind', - isArray: false, - optional: true - }, - { - name: 'polname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithClause', - isNode: true, - fields: [ - { - name: 'ctes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recursive', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlExpr', - isNode: true, - fields: [ - { - name: 'arg_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'named_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'XmlExprOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlSerialize', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - } - ] - } -]; \ No newline at end of file diff --git a/packages/transform/src/15/enum-to-int.ts b/packages/transform/src/15/enum-to-int.ts deleted file mode 100644 index 8d6db58f..00000000 --- a/packages/transform/src/15/enum-to-int.ts +++ /dev/null @@ -1,2257 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "PublicationObjSpecType" | "AlterPublicationAction" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumInt = (enumType: EnumType, key: string): number => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case "OVERRIDING_NOT_SET": - return 0; - case "OVERRIDING_USER_VALUE": - return 1; - case "OVERRIDING_SYSTEM_VALUE": - return 2; - default: - throw new Error("Key not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case "QSRC_ORIGINAL": - return 0; - case "QSRC_PARSER": - return 1; - case "QSRC_INSTEAD_RULE": - return 2; - case "QSRC_QUAL_INSTEAD_RULE": - return 3; - case "QSRC_NON_INSTEAD_RULE": - return 4; - default: - throw new Error("Key not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case "SORTBY_DEFAULT": - return 0; - case "SORTBY_ASC": - return 1; - case "SORTBY_DESC": - return 2; - case "SORTBY_USING": - return 3; - default: - throw new Error("Key not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case "SORTBY_NULLS_DEFAULT": - return 0; - case "SORTBY_NULLS_FIRST": - return 1; - case "SORTBY_NULLS_LAST": - return 2; - default: - throw new Error("Key not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case "SET_QUANTIFIER_DEFAULT": - return 0; - case "SET_QUANTIFIER_ALL": - return 1; - case "SET_QUANTIFIER_DISTINCT": - return 2; - default: - throw new Error("Key not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case "AEXPR_OP": - return 0; - case "AEXPR_OP_ANY": - return 1; - case "AEXPR_OP_ALL": - return 2; - case "AEXPR_DISTINCT": - return 3; - case "AEXPR_NOT_DISTINCT": - return 4; - case "AEXPR_NULLIF": - return 5; - case "AEXPR_IN": - return 6; - case "AEXPR_LIKE": - return 7; - case "AEXPR_ILIKE": - return 8; - case "AEXPR_SIMILAR": - return 9; - case "AEXPR_BETWEEN": - return 10; - case "AEXPR_NOT_BETWEEN": - return 11; - case "AEXPR_BETWEEN_SYM": - return 12; - case "AEXPR_NOT_BETWEEN_SYM": - return 13; - default: - throw new Error("Key not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case "ROLESPEC_CSTRING": - return 0; - case "ROLESPEC_CURRENT_ROLE": - return 1; - case "ROLESPEC_CURRENT_USER": - return 2; - case "ROLESPEC_SESSION_USER": - return 3; - case "ROLESPEC_PUBLIC": - return 4; - default: - throw new Error("Key not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case "CREATE_TABLE_LIKE_COMMENTS": - return 0; - case "CREATE_TABLE_LIKE_COMPRESSION": - return 1; - case "CREATE_TABLE_LIKE_CONSTRAINTS": - return 2; - case "CREATE_TABLE_LIKE_DEFAULTS": - return 3; - case "CREATE_TABLE_LIKE_GENERATED": - return 4; - case "CREATE_TABLE_LIKE_IDENTITY": - return 5; - case "CREATE_TABLE_LIKE_INDEXES": - return 6; - case "CREATE_TABLE_LIKE_STATISTICS": - return 7; - case "CREATE_TABLE_LIKE_STORAGE": - return 8; - case "CREATE_TABLE_LIKE_ALL": - return 9; - default: - throw new Error("Key not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case "DEFELEM_UNSPEC": - return 0; - case "DEFELEM_SET": - return 1; - case "DEFELEM_ADD": - return 2; - case "DEFELEM_DROP": - return 3; - default: - throw new Error("Key not recognized in enum DefElemAction"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case "PARTITION_RANGE_DATUM_MINVALUE": - return 0; - case "PARTITION_RANGE_DATUM_VALUE": - return 1; - case "PARTITION_RANGE_DATUM_MAXVALUE": - return 2; - default: - throw new Error("Key not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case "RTE_RELATION": - return 0; - case "RTE_SUBQUERY": - return 1; - case "RTE_JOIN": - return 2; - case "RTE_FUNCTION": - return 3; - case "RTE_TABLEFUNC": - return 4; - case "RTE_VALUES": - return 5; - case "RTE_CTE": - return 6; - case "RTE_NAMEDTUPLESTORE": - return 7; - case "RTE_RESULT": - return 8; - default: - throw new Error("Key not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case "WCO_VIEW_CHECK": - return 0; - case "WCO_RLS_INSERT_CHECK": - return 1; - case "WCO_RLS_UPDATE_CHECK": - return 2; - case "WCO_RLS_CONFLICT_CHECK": - return 3; - case "WCO_RLS_MERGE_UPDATE_CHECK": - return 4; - case "WCO_RLS_MERGE_DELETE_CHECK": - return 5; - default: - throw new Error("Key not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case "GROUPING_SET_EMPTY": - return 0; - case "GROUPING_SET_SIMPLE": - return 1; - case "GROUPING_SET_ROLLUP": - return 2; - case "GROUPING_SET_CUBE": - return 3; - case "GROUPING_SET_SETS": - return 4; - default: - throw new Error("Key not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case "CTEMaterializeDefault": - return 0; - case "CTEMaterializeAlways": - return 1; - case "CTEMaterializeNever": - return 2; - default: - throw new Error("Key not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case "SETOP_NONE": - return 0; - case "SETOP_UNION": - return 1; - case "SETOP_INTERSECT": - return 2; - case "SETOP_EXCEPT": - return 3; - default: - throw new Error("Key not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case "OBJECT_ACCESS_METHOD": - return 0; - case "OBJECT_AGGREGATE": - return 1; - case "OBJECT_AMOP": - return 2; - case "OBJECT_AMPROC": - return 3; - case "OBJECT_ATTRIBUTE": - return 4; - case "OBJECT_CAST": - return 5; - case "OBJECT_COLUMN": - return 6; - case "OBJECT_COLLATION": - return 7; - case "OBJECT_CONVERSION": - return 8; - case "OBJECT_DATABASE": - return 9; - case "OBJECT_DEFAULT": - return 10; - case "OBJECT_DEFACL": - return 11; - case "OBJECT_DOMAIN": - return 12; - case "OBJECT_DOMCONSTRAINT": - return 13; - case "OBJECT_EVENT_TRIGGER": - return 14; - case "OBJECT_EXTENSION": - return 15; - case "OBJECT_FDW": - return 16; - case "OBJECT_FOREIGN_SERVER": - return 17; - case "OBJECT_FOREIGN_TABLE": - return 18; - case "OBJECT_FUNCTION": - return 19; - case "OBJECT_INDEX": - return 20; - case "OBJECT_LANGUAGE": - return 21; - case "OBJECT_LARGEOBJECT": - return 22; - case "OBJECT_MATVIEW": - return 23; - case "OBJECT_OPCLASS": - return 24; - case "OBJECT_OPERATOR": - return 25; - case "OBJECT_OPFAMILY": - return 26; - case "OBJECT_PARAMETER_ACL": - return 27; - case "OBJECT_POLICY": - return 28; - case "OBJECT_PROCEDURE": - return 29; - case "OBJECT_PUBLICATION": - return 30; - case "OBJECT_PUBLICATION_NAMESPACE": - return 31; - case "OBJECT_PUBLICATION_REL": - return 32; - case "OBJECT_ROLE": - return 33; - case "OBJECT_ROUTINE": - return 34; - case "OBJECT_RULE": - return 35; - case "OBJECT_SCHEMA": - return 36; - case "OBJECT_SEQUENCE": - return 37; - case "OBJECT_SUBSCRIPTION": - return 38; - case "OBJECT_STATISTIC_EXT": - return 39; - case "OBJECT_TABCONSTRAINT": - return 40; - case "OBJECT_TABLE": - return 41; - case "OBJECT_TABLESPACE": - return 42; - case "OBJECT_TRANSFORM": - return 43; - case "OBJECT_TRIGGER": - return 44; - case "OBJECT_TSCONFIGURATION": - return 45; - case "OBJECT_TSDICTIONARY": - return 46; - case "OBJECT_TSPARSER": - return 47; - case "OBJECT_TSTEMPLATE": - return 48; - case "OBJECT_TYPE": - return 49; - case "OBJECT_USER_MAPPING": - return 50; - case "OBJECT_VIEW": - return 51; - default: - throw new Error("Key not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case "DROP_RESTRICT": - return 0; - case "DROP_CASCADE": - return 1; - default: - throw new Error("Key not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case "AT_AddColumn": - return 0; - case "AT_AddColumnRecurse": - return 1; - case "AT_AddColumnToView": - return 2; - case "AT_ColumnDefault": - return 3; - case "AT_CookedColumnDefault": - return 4; - case "AT_DropNotNull": - return 5; - case "AT_SetNotNull": - return 6; - case "AT_DropExpression": - return 7; - case "AT_CheckNotNull": - return 8; - case "AT_SetStatistics": - return 9; - case "AT_SetOptions": - return 10; - case "AT_ResetOptions": - return 11; - case "AT_SetStorage": - return 12; - case "AT_SetCompression": - return 13; - case "AT_DropColumn": - return 14; - case "AT_DropColumnRecurse": - return 15; - case "AT_AddIndex": - return 16; - case "AT_ReAddIndex": - return 17; - case "AT_AddConstraint": - return 18; - case "AT_AddConstraintRecurse": - return 19; - case "AT_ReAddConstraint": - return 20; - case "AT_ReAddDomainConstraint": - return 21; - case "AT_AlterConstraint": - return 22; - case "AT_ValidateConstraint": - return 23; - case "AT_ValidateConstraintRecurse": - return 24; - case "AT_AddIndexConstraint": - return 25; - case "AT_DropConstraint": - return 26; - case "AT_DropConstraintRecurse": - return 27; - case "AT_ReAddComment": - return 28; - case "AT_AlterColumnType": - return 29; - case "AT_AlterColumnGenericOptions": - return 30; - case "AT_ChangeOwner": - return 31; - case "AT_ClusterOn": - return 32; - case "AT_DropCluster": - return 33; - case "AT_SetLogged": - return 34; - case "AT_SetUnLogged": - return 35; - case "AT_DropOids": - return 36; - case "AT_SetAccessMethod": - return 37; - case "AT_SetTableSpace": - return 38; - case "AT_SetRelOptions": - return 39; - case "AT_ResetRelOptions": - return 40; - case "AT_ReplaceRelOptions": - return 41; - case "AT_EnableTrig": - return 42; - case "AT_EnableAlwaysTrig": - return 43; - case "AT_EnableReplicaTrig": - return 44; - case "AT_DisableTrig": - return 45; - case "AT_EnableTrigAll": - return 46; - case "AT_DisableTrigAll": - return 47; - case "AT_EnableTrigUser": - return 48; - case "AT_DisableTrigUser": - return 49; - case "AT_EnableRule": - return 50; - case "AT_EnableAlwaysRule": - return 51; - case "AT_EnableReplicaRule": - return 52; - case "AT_DisableRule": - return 53; - case "AT_AddInherit": - return 54; - case "AT_DropInherit": - return 55; - case "AT_AddOf": - return 56; - case "AT_DropOf": - return 57; - case "AT_ReplicaIdentity": - return 58; - case "AT_EnableRowSecurity": - return 59; - case "AT_DisableRowSecurity": - return 60; - case "AT_ForceRowSecurity": - return 61; - case "AT_NoForceRowSecurity": - return 62; - case "AT_GenericOptions": - return 63; - case "AT_AttachPartition": - return 64; - case "AT_DetachPartition": - return 65; - case "AT_DetachPartitionFinalize": - return 66; - case "AT_AddIdentity": - return 67; - case "AT_SetIdentity": - return 68; - case "AT_DropIdentity": - return 69; - case "AT_ReAddStatistics": - return 70; - default: - throw new Error("Key not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case "ACL_TARGET_OBJECT": - return 0; - case "ACL_TARGET_ALL_IN_SCHEMA": - return 1; - case "ACL_TARGET_DEFAULTS": - return 2; - default: - throw new Error("Key not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case "VAR_SET_VALUE": - return 0; - case "VAR_SET_DEFAULT": - return 1; - case "VAR_SET_CURRENT": - return 2; - case "VAR_SET_MULTI": - return 3; - case "VAR_RESET": - return 4; - case "VAR_RESET_ALL": - return 5; - default: - throw new Error("Key not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case "CONSTR_NULL": - return 0; - case "CONSTR_NOTNULL": - return 1; - case "CONSTR_DEFAULT": - return 2; - case "CONSTR_IDENTITY": - return 3; - case "CONSTR_GENERATED": - return 4; - case "CONSTR_CHECK": - return 5; - case "CONSTR_PRIMARY": - return 6; - case "CONSTR_UNIQUE": - return 7; - case "CONSTR_EXCLUSION": - return 8; - case "CONSTR_FOREIGN": - return 9; - case "CONSTR_ATTR_DEFERRABLE": - return 10; - case "CONSTR_ATTR_NOT_DEFERRABLE": - return 11; - case "CONSTR_ATTR_DEFERRED": - return 12; - case "CONSTR_ATTR_IMMEDIATE": - return 13; - default: - throw new Error("Key not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case "FDW_IMPORT_SCHEMA_ALL": - return 0; - case "FDW_IMPORT_SCHEMA_LIMIT_TO": - return 1; - case "FDW_IMPORT_SCHEMA_EXCEPT": - return 2; - default: - throw new Error("Key not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case "ROLESTMT_ROLE": - return 0; - case "ROLESTMT_USER": - return 1; - case "ROLESTMT_GROUP": - return 2; - default: - throw new Error("Key not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case "FETCH_FORWARD": - return 0; - case "FETCH_BACKWARD": - return 1; - case "FETCH_ABSOLUTE": - return 2; - case "FETCH_RELATIVE": - return 3; - default: - throw new Error("Key not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case "FUNC_PARAM_IN": - return 0; - case "FUNC_PARAM_OUT": - return 1; - case "FUNC_PARAM_INOUT": - return 2; - case "FUNC_PARAM_VARIADIC": - return 3; - case "FUNC_PARAM_TABLE": - return 4; - case "FUNC_PARAM_DEFAULT": - return 5; - default: - throw new Error("Key not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case "TRANS_STMT_BEGIN": - return 0; - case "TRANS_STMT_START": - return 1; - case "TRANS_STMT_COMMIT": - return 2; - case "TRANS_STMT_ROLLBACK": - return 3; - case "TRANS_STMT_SAVEPOINT": - return 4; - case "TRANS_STMT_RELEASE": - return 5; - case "TRANS_STMT_ROLLBACK_TO": - return 6; - case "TRANS_STMT_PREPARE": - return 7; - case "TRANS_STMT_COMMIT_PREPARED": - return 8; - case "TRANS_STMT_ROLLBACK_PREPARED": - return 9; - default: - throw new Error("Key not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case "NO_CHECK_OPTION": - return 0; - case "LOCAL_CHECK_OPTION": - return 1; - case "CASCADED_CHECK_OPTION": - return 2; - default: - throw new Error("Key not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case "DISCARD_ALL": - return 0; - case "DISCARD_PLANS": - return 1; - case "DISCARD_SEQUENCES": - return 2; - case "DISCARD_TEMP": - return 3; - default: - throw new Error("Key not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case "REINDEX_OBJECT_INDEX": - return 0; - case "REINDEX_OBJECT_TABLE": - return 1; - case "REINDEX_OBJECT_SCHEMA": - return 2; - case "REINDEX_OBJECT_SYSTEM": - return 3; - case "REINDEX_OBJECT_DATABASE": - return 4; - default: - throw new Error("Key not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case "ALTER_TSCONFIG_ADD_MAPPING": - return 0; - case "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN": - return 1; - case "ALTER_TSCONFIG_REPLACE_DICT": - return 2; - case "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN": - return 3; - case "ALTER_TSCONFIG_DROP_MAPPING": - return 4; - default: - throw new Error("Key not recognized in enum AlterTSConfigType"); - } - } - case "PublicationObjSpecType": - { - switch (key) { - case "PUBLICATIONOBJ_TABLE": - return 0; - case "PUBLICATIONOBJ_TABLES_IN_SCHEMA": - return 1; - case "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA": - return 2; - case "PUBLICATIONOBJ_CONTINUATION": - return 3; - default: - throw new Error("Key not recognized in enum PublicationObjSpecType"); - } - } - case "AlterPublicationAction": - { - switch (key) { - case "AP_AddObjects": - return 0; - case "AP_DropObjects": - return 1; - case "AP_SetObjects": - return 2; - default: - throw new Error("Key not recognized in enum AlterPublicationAction"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case "ALTER_SUBSCRIPTION_OPTIONS": - return 0; - case "ALTER_SUBSCRIPTION_CONNECTION": - return 1; - case "ALTER_SUBSCRIPTION_SET_PUBLICATION": - return 2; - case "ALTER_SUBSCRIPTION_ADD_PUBLICATION": - return 3; - case "ALTER_SUBSCRIPTION_DROP_PUBLICATION": - return 4; - case "ALTER_SUBSCRIPTION_REFRESH": - return 5; - case "ALTER_SUBSCRIPTION_ENABLED": - return 6; - case "ALTER_SUBSCRIPTION_SKIP": - return 7; - default: - throw new Error("Key not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case "ONCOMMIT_NOOP": - return 0; - case "ONCOMMIT_PRESERVE_ROWS": - return 1; - case "ONCOMMIT_DELETE_ROWS": - return 2; - case "ONCOMMIT_DROP": - return 3; - default: - throw new Error("Key not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case "PARAM_EXTERN": - return 0; - case "PARAM_EXEC": - return 1; - case "PARAM_SUBLINK": - return 2; - case "PARAM_MULTIEXPR": - return 3; - default: - throw new Error("Key not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case "COERCION_IMPLICIT": - return 0; - case "COERCION_ASSIGNMENT": - return 1; - case "COERCION_PLPGSQL": - return 2; - case "COERCION_EXPLICIT": - return 3; - default: - throw new Error("Key not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case "COERCE_EXPLICIT_CALL": - return 0; - case "COERCE_EXPLICIT_CAST": - return 1; - case "COERCE_IMPLICIT_CAST": - return 2; - case "COERCE_SQL_SYNTAX": - return 3; - default: - throw new Error("Key not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case "AND_EXPR": - return 0; - case "OR_EXPR": - return 1; - case "NOT_EXPR": - return 2; - default: - throw new Error("Key not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case "EXISTS_SUBLINK": - return 0; - case "ALL_SUBLINK": - return 1; - case "ANY_SUBLINK": - return 2; - case "ROWCOMPARE_SUBLINK": - return 3; - case "EXPR_SUBLINK": - return 4; - case "MULTIEXPR_SUBLINK": - return 5; - case "ARRAY_SUBLINK": - return 6; - case "CTE_SUBLINK": - return 7; - default: - throw new Error("Key not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case "ROWCOMPARE_LT": - return 0; - case "ROWCOMPARE_LE": - return 1; - case "ROWCOMPARE_EQ": - return 2; - case "ROWCOMPARE_GE": - return 3; - case "ROWCOMPARE_GT": - return 4; - case "ROWCOMPARE_NE": - return 5; - default: - throw new Error("Key not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case "IS_GREATEST": - return 0; - case "IS_LEAST": - return 1; - default: - throw new Error("Key not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case "SVFOP_CURRENT_DATE": - return 0; - case "SVFOP_CURRENT_TIME": - return 1; - case "SVFOP_CURRENT_TIME_N": - return 2; - case "SVFOP_CURRENT_TIMESTAMP": - return 3; - case "SVFOP_CURRENT_TIMESTAMP_N": - return 4; - case "SVFOP_LOCALTIME": - return 5; - case "SVFOP_LOCALTIME_N": - return 6; - case "SVFOP_LOCALTIMESTAMP": - return 7; - case "SVFOP_LOCALTIMESTAMP_N": - return 8; - case "SVFOP_CURRENT_ROLE": - return 9; - case "SVFOP_CURRENT_USER": - return 10; - case "SVFOP_USER": - return 11; - case "SVFOP_SESSION_USER": - return 12; - case "SVFOP_CURRENT_CATALOG": - return 13; - case "SVFOP_CURRENT_SCHEMA": - return 14; - default: - throw new Error("Key not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case "IS_XMLCONCAT": - return 0; - case "IS_XMLELEMENT": - return 1; - case "IS_XMLFOREST": - return 2; - case "IS_XMLPARSE": - return 3; - case "IS_XMLPI": - return 4; - case "IS_XMLROOT": - return 5; - case "IS_XMLSERIALIZE": - return 6; - case "IS_DOCUMENT": - return 7; - default: - throw new Error("Key not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case "XMLOPTION_DOCUMENT": - return 0; - case "XMLOPTION_CONTENT": - return 1; - default: - throw new Error("Key not recognized in enum XmlOptionType"); - } - } - case "NullTestType": - { - switch (key) { - case "IS_NULL": - return 0; - case "IS_NOT_NULL": - return 1; - default: - throw new Error("Key not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case "IS_TRUE": - return 0; - case "IS_NOT_TRUE": - return 1; - case "IS_FALSE": - return 2; - case "IS_NOT_FALSE": - return 3; - case "IS_UNKNOWN": - return 4; - case "IS_NOT_UNKNOWN": - return 5; - default: - throw new Error("Key not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case "CMD_UNKNOWN": - return 0; - case "CMD_SELECT": - return 1; - case "CMD_UPDATE": - return 2; - case "CMD_INSERT": - return 3; - case "CMD_DELETE": - return 4; - case "CMD_MERGE": - return 5; - case "CMD_UTILITY": - return 6; - case "CMD_NOTHING": - return 7; - default: - throw new Error("Key not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case "JOIN_INNER": - return 0; - case "JOIN_LEFT": - return 1; - case "JOIN_FULL": - return 2; - case "JOIN_RIGHT": - return 3; - case "JOIN_SEMI": - return 4; - case "JOIN_ANTI": - return 5; - case "JOIN_UNIQUE_OUTER": - return 6; - case "JOIN_UNIQUE_INNER": - return 7; - default: - throw new Error("Key not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case "AGG_PLAIN": - return 0; - case "AGG_SORTED": - return 1; - case "AGG_HASHED": - return 2; - case "AGG_MIXED": - return 3; - default: - throw new Error("Key not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case "AGGSPLIT_SIMPLE": - return 0; - case "AGGSPLIT_INITIAL_SERIAL": - return 1; - case "AGGSPLIT_FINAL_DESERIAL": - return 2; - default: - throw new Error("Key not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case "SETOPCMD_INTERSECT": - return 0; - case "SETOPCMD_INTERSECT_ALL": - return 1; - case "SETOPCMD_EXCEPT": - return 2; - case "SETOPCMD_EXCEPT_ALL": - return 3; - default: - throw new Error("Key not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case "SETOP_SORTED": - return 0; - case "SETOP_HASHED": - return 1; - default: - throw new Error("Key not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case "ONCONFLICT_NONE": - return 0; - case "ONCONFLICT_NOTHING": - return 1; - case "ONCONFLICT_UPDATE": - return 2; - default: - throw new Error("Key not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case "LIMIT_OPTION_DEFAULT": - return 0; - case "LIMIT_OPTION_COUNT": - return 1; - case "LIMIT_OPTION_WITH_TIES": - return 2; - default: - throw new Error("Key not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case "LCS_NONE": - return 0; - case "LCS_FORKEYSHARE": - return 1; - case "LCS_FORSHARE": - return 2; - case "LCS_FORNOKEYUPDATE": - return 3; - case "LCS_FORUPDATE": - return 4; - default: - throw new Error("Key not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case "LockWaitBlock": - return 0; - case "LockWaitSkip": - return 1; - case "LockWaitError": - return 2; - default: - throw new Error("Key not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case "LockTupleKeyShare": - return 0; - case "LockTupleShare": - return 1; - case "LockTupleNoKeyExclusive": - return 2; - case "LockTupleExclusive": - return 3; - default: - throw new Error("Key not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case "NO_KEYWORD": - return 0; - case "UNRESERVED_KEYWORD": - return 1; - case "COL_NAME_KEYWORD": - return 2; - case "TYPE_FUNC_NAME_KEYWORD": - return 3; - case "RESERVED_KEYWORD": - return 4; - default: - throw new Error("Key not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case "NUL": - return 0; - case "ASCII_36": - return 36; - case "ASCII_37": - return 37; - case "ASCII_40": - return 40; - case "ASCII_41": - return 41; - case "ASCII_42": - return 42; - case "ASCII_43": - return 43; - case "ASCII_44": - return 44; - case "ASCII_45": - return 45; - case "ASCII_46": - return 46; - case "ASCII_47": - return 47; - case "ASCII_58": - return 58; - case "ASCII_59": - return 59; - case "ASCII_60": - return 60; - case "ASCII_61": - return 61; - case "ASCII_62": - return 62; - case "ASCII_63": - return 63; - case "ASCII_91": - return 91; - case "ASCII_92": - return 92; - case "ASCII_93": - return 93; - case "ASCII_94": - return 94; - case "IDENT": - return 258; - case "UIDENT": - return 259; - case "FCONST": - return 260; - case "SCONST": - return 261; - case "USCONST": - return 262; - case "BCONST": - return 263; - case "XCONST": - return 264; - case "Op": - return 265; - case "ICONST": - return 266; - case "PARAM": - return 267; - case "TYPECAST": - return 268; - case "DOT_DOT": - return 269; - case "COLON_EQUALS": - return 270; - case "EQUALS_GREATER": - return 271; - case "LESS_EQUALS": - return 272; - case "GREATER_EQUALS": - return 273; - case "NOT_EQUALS": - return 274; - case "SQL_COMMENT": - return 275; - case "C_COMMENT": - return 276; - case "ABORT_P": - return 277; - case "ABSOLUTE_P": - return 278; - case "ACCESS": - return 279; - case "ACTION": - return 280; - case "ADD_P": - return 281; - case "ADMIN": - return 282; - case "AFTER": - return 283; - case "AGGREGATE": - return 284; - case "ALL": - return 285; - case "ALSO": - return 286; - case "ALTER": - return 287; - case "ALWAYS": - return 288; - case "ANALYSE": - return 289; - case "ANALYZE": - return 290; - case "AND": - return 291; - case "ANY": - return 292; - case "ARRAY": - return 293; - case "AS": - return 294; - case "ASC": - return 295; - case "ASENSITIVE": - return 296; - case "ASSERTION": - return 297; - case "ASSIGNMENT": - return 298; - case "ASYMMETRIC": - return 299; - case "ATOMIC": - return 300; - case "AT": - return 301; - case "ATTACH": - return 302; - case "ATTRIBUTE": - return 303; - case "AUTHORIZATION": - return 304; - case "BACKWARD": - return 305; - case "BEFORE": - return 306; - case "BEGIN_P": - return 307; - case "BETWEEN": - return 308; - case "BIGINT": - return 309; - case "BINARY": - return 310; - case "BIT": - return 311; - case "BOOLEAN_P": - return 312; - case "BOTH": - return 313; - case "BREADTH": - return 314; - case "BY": - return 315; - case "CACHE": - return 316; - case "CALL": - return 317; - case "CALLED": - return 318; - case "CASCADE": - return 319; - case "CASCADED": - return 320; - case "CASE": - return 321; - case "CAST": - return 322; - case "CATALOG_P": - return 323; - case "CHAIN": - return 324; - case "CHAR_P": - return 325; - case "CHARACTER": - return 326; - case "CHARACTERISTICS": - return 327; - case "CHECK": - return 328; - case "CHECKPOINT": - return 329; - case "CLASS": - return 330; - case "CLOSE": - return 331; - case "CLUSTER": - return 332; - case "COALESCE": - return 333; - case "COLLATE": - return 334; - case "COLLATION": - return 335; - case "COLUMN": - return 336; - case "COLUMNS": - return 337; - case "COMMENT": - return 338; - case "COMMENTS": - return 339; - case "COMMIT": - return 340; - case "COMMITTED": - return 341; - case "COMPRESSION": - return 342; - case "CONCURRENTLY": - return 343; - case "CONFIGURATION": - return 344; - case "CONFLICT": - return 345; - case "CONNECTION": - return 346; - case "CONSTRAINT": - return 347; - case "CONSTRAINTS": - return 348; - case "CONTENT_P": - return 349; - case "CONTINUE_P": - return 350; - case "CONVERSION_P": - return 351; - case "COPY": - return 352; - case "COST": - return 353; - case "CREATE": - return 354; - case "CROSS": - return 355; - case "CSV": - return 356; - case "CUBE": - return 357; - case "CURRENT_P": - return 358; - case "CURRENT_CATALOG": - return 359; - case "CURRENT_DATE": - return 360; - case "CURRENT_ROLE": - return 361; - case "CURRENT_SCHEMA": - return 362; - case "CURRENT_TIME": - return 363; - case "CURRENT_TIMESTAMP": - return 364; - case "CURRENT_USER": - return 365; - case "CURSOR": - return 366; - case "CYCLE": - return 367; - case "DATA_P": - return 368; - case "DATABASE": - return 369; - case "DAY_P": - return 370; - case "DEALLOCATE": - return 371; - case "DEC": - return 372; - case "DECIMAL_P": - return 373; - case "DECLARE": - return 374; - case "DEFAULT": - return 375; - case "DEFAULTS": - return 376; - case "DEFERRABLE": - return 377; - case "DEFERRED": - return 378; - case "DEFINER": - return 379; - case "DELETE_P": - return 380; - case "DELIMITER": - return 381; - case "DELIMITERS": - return 382; - case "DEPENDS": - return 383; - case "DEPTH": - return 384; - case "DESC": - return 385; - case "DETACH": - return 386; - case "DICTIONARY": - return 387; - case "DISABLE_P": - return 388; - case "DISCARD": - return 389; - case "DISTINCT": - return 390; - case "DO": - return 391; - case "DOCUMENT_P": - return 392; - case "DOMAIN_P": - return 393; - case "DOUBLE_P": - return 394; - case "DROP": - return 395; - case "EACH": - return 396; - case "ELSE": - return 397; - case "ENABLE_P": - return 398; - case "ENCODING": - return 399; - case "ENCRYPTED": - return 400; - case "END_P": - return 401; - case "ENUM_P": - return 402; - case "ESCAPE": - return 403; - case "EVENT": - return 404; - case "EXCEPT": - return 405; - case "EXCLUDE": - return 406; - case "EXCLUDING": - return 407; - case "EXCLUSIVE": - return 408; - case "EXECUTE": - return 409; - case "EXISTS": - return 410; - case "EXPLAIN": - return 411; - case "EXPRESSION": - return 412; - case "EXTENSION": - return 413; - case "EXTERNAL": - return 414; - case "EXTRACT": - return 415; - case "FALSE_P": - return 416; - case "FAMILY": - return 417; - case "FETCH": - return 418; - case "FILTER": - return 419; - case "FINALIZE": - return 420; - case "FIRST_P": - return 421; - case "FLOAT_P": - return 422; - case "FOLLOWING": - return 423; - case "FOR": - return 424; - case "FORCE": - return 425; - case "FOREIGN": - return 426; - case "FORWARD": - return 427; - case "FREEZE": - return 428; - case "FROM": - return 429; - case "FULL": - return 430; - case "FUNCTION": - return 431; - case "FUNCTIONS": - return 432; - case "GENERATED": - return 433; - case "GLOBAL": - return 434; - case "GRANT": - return 435; - case "GRANTED": - return 436; - case "GREATEST": - return 437; - case "GROUP_P": - return 438; - case "GROUPING": - return 439; - case "GROUPS": - return 440; - case "HANDLER": - return 441; - case "HAVING": - return 442; - case "HEADER_P": - return 443; - case "HOLD": - return 444; - case "HOUR_P": - return 445; - case "IDENTITY_P": - return 446; - case "IF_P": - return 447; - case "ILIKE": - return 448; - case "IMMEDIATE": - return 449; - case "IMMUTABLE": - return 450; - case "IMPLICIT_P": - return 451; - case "IMPORT_P": - return 452; - case "IN_P": - return 453; - case "INCLUDE": - return 454; - case "INCLUDING": - return 455; - case "INCREMENT": - return 456; - case "INDEX": - return 457; - case "INDEXES": - return 458; - case "INHERIT": - return 459; - case "INHERITS": - return 460; - case "INITIALLY": - return 461; - case "INLINE_P": - return 462; - case "INNER_P": - return 463; - case "INOUT": - return 464; - case "INPUT_P": - return 465; - case "INSENSITIVE": - return 466; - case "INSERT": - return 467; - case "INSTEAD": - return 468; - case "INT_P": - return 469; - case "INTEGER": - return 470; - case "INTERSECT": - return 471; - case "INTERVAL": - return 472; - case "INTO": - return 473; - case "INVOKER": - return 474; - case "IS": - return 475; - case "ISNULL": - return 476; - case "ISOLATION": - return 477; - case "JOIN": - return 478; - case "KEY": - return 479; - case "LABEL": - return 480; - case "LANGUAGE": - return 481; - case "LARGE_P": - return 482; - case "LAST_P": - return 483; - case "LATERAL_P": - return 484; - case "LEADING": - return 485; - case "LEAKPROOF": - return 486; - case "LEAST": - return 487; - case "LEFT": - return 488; - case "LEVEL": - return 489; - case "LIKE": - return 490; - case "LIMIT": - return 491; - case "LISTEN": - return 492; - case "LOAD": - return 493; - case "LOCAL": - return 494; - case "LOCALTIME": - return 495; - case "LOCALTIMESTAMP": - return 496; - case "LOCATION": - return 497; - case "LOCK_P": - return 498; - case "LOCKED": - return 499; - case "LOGGED": - return 500; - case "MAPPING": - return 501; - case "MATCH": - return 502; - case "MATCHED": - return 503; - case "MATERIALIZED": - return 504; - case "MAXVALUE": - return 505; - case "MERGE": - return 506; - case "METHOD": - return 507; - case "MINUTE_P": - return 508; - case "MINVALUE": - return 509; - case "MODE": - return 510; - case "MONTH_P": - return 511; - case "MOVE": - return 512; - case "NAME_P": - return 513; - case "NAMES": - return 514; - case "NATIONAL": - return 515; - case "NATURAL": - return 516; - case "NCHAR": - return 517; - case "NEW": - return 518; - case "NEXT": - return 519; - case "NFC": - return 520; - case "NFD": - return 521; - case "NFKC": - return 522; - case "NFKD": - return 523; - case "NO": - return 524; - case "NONE": - return 525; - case "NORMALIZE": - return 526; - case "NORMALIZED": - return 527; - case "NOT": - return 528; - case "NOTHING": - return 529; - case "NOTIFY": - return 530; - case "NOTNULL": - return 531; - case "NOWAIT": - return 532; - case "NULL_P": - return 533; - case "NULLIF": - return 534; - case "NULLS_P": - return 535; - case "NUMERIC": - return 536; - case "OBJECT_P": - return 537; - case "OF": - return 538; - case "OFF": - return 539; - case "OFFSET": - return 540; - case "OIDS": - return 541; - case "OLD": - return 542; - case "ON": - return 543; - case "ONLY": - return 544; - case "OPERATOR": - return 545; - case "OPTION": - return 546; - case "OPTIONS": - return 547; - case "OR": - return 548; - case "ORDER": - return 549; - case "ORDINALITY": - return 550; - case "OTHERS": - return 551; - case "OUT_P": - return 552; - case "OUTER_P": - return 553; - case "OVER": - return 554; - case "OVERLAPS": - return 555; - case "OVERLAY": - return 556; - case "OVERRIDING": - return 557; - case "OWNED": - return 558; - case "OWNER": - return 559; - case "PARALLEL": - return 560; - case "PARAMETER": - return 561; - case "PARSER": - return 562; - case "PARTIAL": - return 563; - case "PARTITION": - return 564; - case "PASSING": - return 565; - case "PASSWORD": - return 566; - case "PLACING": - return 567; - case "PLANS": - return 568; - case "POLICY": - return 569; - case "POSITION": - return 570; - case "PRECEDING": - return 571; - case "PRECISION": - return 572; - case "PRESERVE": - return 573; - case "PREPARE": - return 574; - case "PREPARED": - return 575; - case "PRIMARY": - return 576; - case "PRIOR": - return 577; - case "PRIVILEGES": - return 578; - case "PROCEDURAL": - return 579; - case "PROCEDURE": - return 580; - case "PROCEDURES": - return 581; - case "PROGRAM": - return 582; - case "PUBLICATION": - return 583; - case "QUOTE": - return 584; - case "RANGE": - return 585; - case "READ": - return 586; - case "REAL": - return 587; - case "REASSIGN": - return 588; - case "RECHECK": - return 589; - case "RECURSIVE": - return 590; - case "REF_P": - return 591; - case "REFERENCES": - return 592; - case "REFERENCING": - return 593; - case "REFRESH": - return 594; - case "REINDEX": - return 595; - case "RELATIVE_P": - return 596; - case "RELEASE": - return 597; - case "RENAME": - return 598; - case "REPEATABLE": - return 599; - case "REPLACE": - return 600; - case "REPLICA": - return 601; - case "RESET": - return 602; - case "RESTART": - return 603; - case "RESTRICT": - return 604; - case "RETURN": - return 605; - case "RETURNING": - return 606; - case "RETURNS": - return 607; - case "REVOKE": - return 608; - case "RIGHT": - return 609; - case "ROLE": - return 610; - case "ROLLBACK": - return 611; - case "ROLLUP": - return 612; - case "ROUTINE": - return 613; - case "ROUTINES": - return 614; - case "ROW": - return 615; - case "ROWS": - return 616; - case "RULE": - return 617; - case "SAVEPOINT": - return 618; - case "SCHEMA": - return 619; - case "SCHEMAS": - return 620; - case "SCROLL": - return 621; - case "SEARCH": - return 622; - case "SECOND_P": - return 623; - case "SECURITY": - return 624; - case "SELECT": - return 625; - case "SEQUENCE": - return 626; - case "SEQUENCES": - return 627; - case "SERIALIZABLE": - return 628; - case "SERVER": - return 629; - case "SESSION": - return 630; - case "SESSION_USER": - return 631; - case "SET": - return 632; - case "SETS": - return 633; - case "SETOF": - return 634; - case "SHARE": - return 635; - case "SHOW": - return 636; - case "SIMILAR": - return 637; - case "SIMPLE": - return 638; - case "SKIP": - return 639; - case "SMALLINT": - return 640; - case "SNAPSHOT": - return 641; - case "SOME": - return 642; - case "SQL_P": - return 643; - case "STABLE": - return 644; - case "STANDALONE_P": - return 645; - case "START": - return 646; - case "STATEMENT": - return 647; - case "STATISTICS": - return 648; - case "STDIN": - return 649; - case "STDOUT": - return 650; - case "STORAGE": - return 651; - case "STORED": - return 652; - case "STRICT_P": - return 653; - case "STRIP_P": - return 654; - case "SUBSCRIPTION": - return 655; - case "SUBSTRING": - return 656; - case "SUPPORT": - return 657; - case "SYMMETRIC": - return 658; - case "SYSID": - return 659; - case "SYSTEM_P": - return 660; - case "TABLE": - return 661; - case "TABLES": - return 662; - case "TABLESAMPLE": - return 663; - case "TABLESPACE": - return 664; - case "TEMP": - return 665; - case "TEMPLATE": - return 666; - case "TEMPORARY": - return 667; - case "TEXT_P": - return 668; - case "THEN": - return 669; - case "TIES": - return 670; - case "TIME": - return 671; - case "TIMESTAMP": - return 672; - case "TO": - return 673; - case "TRAILING": - return 674; - case "TRANSACTION": - return 675; - case "TRANSFORM": - return 676; - case "TREAT": - return 677; - case "TRIGGER": - return 678; - case "TRIM": - return 679; - case "TRUE_P": - return 680; - case "TRUNCATE": - return 681; - case "TRUSTED": - return 682; - case "TYPE_P": - return 683; - case "TYPES_P": - return 684; - case "UESCAPE": - return 685; - case "UNBOUNDED": - return 686; - case "UNCOMMITTED": - return 687; - case "UNENCRYPTED": - return 688; - case "UNION": - return 689; - case "UNIQUE": - return 690; - case "UNKNOWN": - return 691; - case "UNLISTEN": - return 692; - case "UNLOGGED": - return 693; - case "UNTIL": - return 694; - case "UPDATE": - return 695; - case "USER": - return 696; - case "USING": - return 697; - case "VACUUM": - return 698; - case "VALID": - return 699; - case "VALIDATE": - return 700; - case "VALIDATOR": - return 701; - case "VALUE_P": - return 702; - case "VALUES": - return 703; - case "VARCHAR": - return 704; - case "VARIADIC": - return 705; - case "VARYING": - return 706; - case "VERBOSE": - return 707; - case "VERSION_P": - return 708; - case "VIEW": - return 709; - case "VIEWS": - return 710; - case "VOLATILE": - return 711; - case "WHEN": - return 712; - case "WHERE": - return 713; - case "WHITESPACE_P": - return 714; - case "WINDOW": - return 715; - case "WITH": - return 716; - case "WITHIN": - return 717; - case "WITHOUT": - return 718; - case "WORK": - return 719; - case "WRAPPER": - return 720; - case "WRITE": - return 721; - case "XML_P": - return 722; - case "XMLATTRIBUTES": - return 723; - case "XMLCONCAT": - return 724; - case "XMLELEMENT": - return 725; - case "XMLEXISTS": - return 726; - case "XMLFOREST": - return 727; - case "XMLNAMESPACES": - return 728; - case "XMLPARSE": - return 729; - case "XMLPI": - return 730; - case "XMLROOT": - return 731; - case "XMLSERIALIZE": - return 732; - case "XMLTABLE": - return 733; - case "YEAR_P": - return 734; - case "YES_P": - return 735; - case "ZONE": - return 736; - case "NOT_LA": - return 737; - case "NULLS_LA": - return 738; - case "WITH_LA": - return 739; - case "MODE_TYPE_NAME": - return 740; - case "MODE_PLPGSQL_EXPR": - return 741; - case "MODE_PLPGSQL_ASSIGN1": - return 742; - case "MODE_PLPGSQL_ASSIGN2": - return 743; - case "MODE_PLPGSQL_ASSIGN3": - return 744; - case "UMINUS": - return 745; - default: - throw new Error("Key not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/15/enum-to-str.ts b/packages/transform/src/15/enum-to-str.ts deleted file mode 100644 index beac562f..00000000 --- a/packages/transform/src/15/enum-to-str.ts +++ /dev/null @@ -1,2257 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "PublicationObjSpecType" | "AlterPublicationAction" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumString = (enumType: EnumType, key: number): string => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case 0: - return "OVERRIDING_NOT_SET"; - case 1: - return "OVERRIDING_USER_VALUE"; - case 2: - return "OVERRIDING_SYSTEM_VALUE"; - default: - throw new Error("Value not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case 0: - return "QSRC_ORIGINAL"; - case 1: - return "QSRC_PARSER"; - case 2: - return "QSRC_INSTEAD_RULE"; - case 3: - return "QSRC_QUAL_INSTEAD_RULE"; - case 4: - return "QSRC_NON_INSTEAD_RULE"; - default: - throw new Error("Value not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case 0: - return "SORTBY_DEFAULT"; - case 1: - return "SORTBY_ASC"; - case 2: - return "SORTBY_DESC"; - case 3: - return "SORTBY_USING"; - default: - throw new Error("Value not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case 0: - return "SORTBY_NULLS_DEFAULT"; - case 1: - return "SORTBY_NULLS_FIRST"; - case 2: - return "SORTBY_NULLS_LAST"; - default: - throw new Error("Value not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case 0: - return "SET_QUANTIFIER_DEFAULT"; - case 1: - return "SET_QUANTIFIER_ALL"; - case 2: - return "SET_QUANTIFIER_DISTINCT"; - default: - throw new Error("Value not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case 0: - return "AEXPR_OP"; - case 1: - return "AEXPR_OP_ANY"; - case 2: - return "AEXPR_OP_ALL"; - case 3: - return "AEXPR_DISTINCT"; - case 4: - return "AEXPR_NOT_DISTINCT"; - case 5: - return "AEXPR_NULLIF"; - case 6: - return "AEXPR_IN"; - case 7: - return "AEXPR_LIKE"; - case 8: - return "AEXPR_ILIKE"; - case 9: - return "AEXPR_SIMILAR"; - case 10: - return "AEXPR_BETWEEN"; - case 11: - return "AEXPR_NOT_BETWEEN"; - case 12: - return "AEXPR_BETWEEN_SYM"; - case 13: - return "AEXPR_NOT_BETWEEN_SYM"; - default: - throw new Error("Value not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case 0: - return "ROLESPEC_CSTRING"; - case 1: - return "ROLESPEC_CURRENT_ROLE"; - case 2: - return "ROLESPEC_CURRENT_USER"; - case 3: - return "ROLESPEC_SESSION_USER"; - case 4: - return "ROLESPEC_PUBLIC"; - default: - throw new Error("Value not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case 0: - return "CREATE_TABLE_LIKE_COMMENTS"; - case 1: - return "CREATE_TABLE_LIKE_COMPRESSION"; - case 2: - return "CREATE_TABLE_LIKE_CONSTRAINTS"; - case 3: - return "CREATE_TABLE_LIKE_DEFAULTS"; - case 4: - return "CREATE_TABLE_LIKE_GENERATED"; - case 5: - return "CREATE_TABLE_LIKE_IDENTITY"; - case 6: - return "CREATE_TABLE_LIKE_INDEXES"; - case 7: - return "CREATE_TABLE_LIKE_STATISTICS"; - case 8: - return "CREATE_TABLE_LIKE_STORAGE"; - case 9: - return "CREATE_TABLE_LIKE_ALL"; - default: - throw new Error("Value not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case 0: - return "DEFELEM_UNSPEC"; - case 1: - return "DEFELEM_SET"; - case 2: - return "DEFELEM_ADD"; - case 3: - return "DEFELEM_DROP"; - default: - throw new Error("Value not recognized in enum DefElemAction"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case 0: - return "PARTITION_RANGE_DATUM_MINVALUE"; - case 1: - return "PARTITION_RANGE_DATUM_VALUE"; - case 2: - return "PARTITION_RANGE_DATUM_MAXVALUE"; - default: - throw new Error("Value not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case 0: - return "RTE_RELATION"; - case 1: - return "RTE_SUBQUERY"; - case 2: - return "RTE_JOIN"; - case 3: - return "RTE_FUNCTION"; - case 4: - return "RTE_TABLEFUNC"; - case 5: - return "RTE_VALUES"; - case 6: - return "RTE_CTE"; - case 7: - return "RTE_NAMEDTUPLESTORE"; - case 8: - return "RTE_RESULT"; - default: - throw new Error("Value not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case 0: - return "WCO_VIEW_CHECK"; - case 1: - return "WCO_RLS_INSERT_CHECK"; - case 2: - return "WCO_RLS_UPDATE_CHECK"; - case 3: - return "WCO_RLS_CONFLICT_CHECK"; - case 4: - return "WCO_RLS_MERGE_UPDATE_CHECK"; - case 5: - return "WCO_RLS_MERGE_DELETE_CHECK"; - default: - throw new Error("Value not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case 0: - return "GROUPING_SET_EMPTY"; - case 1: - return "GROUPING_SET_SIMPLE"; - case 2: - return "GROUPING_SET_ROLLUP"; - case 3: - return "GROUPING_SET_CUBE"; - case 4: - return "GROUPING_SET_SETS"; - default: - throw new Error("Value not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case 0: - return "CTEMaterializeDefault"; - case 1: - return "CTEMaterializeAlways"; - case 2: - return "CTEMaterializeNever"; - default: - throw new Error("Value not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case 0: - return "SETOP_NONE"; - case 1: - return "SETOP_UNION"; - case 2: - return "SETOP_INTERSECT"; - case 3: - return "SETOP_EXCEPT"; - default: - throw new Error("Value not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case 0: - return "OBJECT_ACCESS_METHOD"; - case 1: - return "OBJECT_AGGREGATE"; - case 2: - return "OBJECT_AMOP"; - case 3: - return "OBJECT_AMPROC"; - case 4: - return "OBJECT_ATTRIBUTE"; - case 5: - return "OBJECT_CAST"; - case 6: - return "OBJECT_COLUMN"; - case 7: - return "OBJECT_COLLATION"; - case 8: - return "OBJECT_CONVERSION"; - case 9: - return "OBJECT_DATABASE"; - case 10: - return "OBJECT_DEFAULT"; - case 11: - return "OBJECT_DEFACL"; - case 12: - return "OBJECT_DOMAIN"; - case 13: - return "OBJECT_DOMCONSTRAINT"; - case 14: - return "OBJECT_EVENT_TRIGGER"; - case 15: - return "OBJECT_EXTENSION"; - case 16: - return "OBJECT_FDW"; - case 17: - return "OBJECT_FOREIGN_SERVER"; - case 18: - return "OBJECT_FOREIGN_TABLE"; - case 19: - return "OBJECT_FUNCTION"; - case 20: - return "OBJECT_INDEX"; - case 21: - return "OBJECT_LANGUAGE"; - case 22: - return "OBJECT_LARGEOBJECT"; - case 23: - return "OBJECT_MATVIEW"; - case 24: - return "OBJECT_OPCLASS"; - case 25: - return "OBJECT_OPERATOR"; - case 26: - return "OBJECT_OPFAMILY"; - case 27: - return "OBJECT_PARAMETER_ACL"; - case 28: - return "OBJECT_POLICY"; - case 29: - return "OBJECT_PROCEDURE"; - case 30: - return "OBJECT_PUBLICATION"; - case 31: - return "OBJECT_PUBLICATION_NAMESPACE"; - case 32: - return "OBJECT_PUBLICATION_REL"; - case 33: - return "OBJECT_ROLE"; - case 34: - return "OBJECT_ROUTINE"; - case 35: - return "OBJECT_RULE"; - case 36: - return "OBJECT_SCHEMA"; - case 37: - return "OBJECT_SEQUENCE"; - case 38: - return "OBJECT_SUBSCRIPTION"; - case 39: - return "OBJECT_STATISTIC_EXT"; - case 40: - return "OBJECT_TABCONSTRAINT"; - case 41: - return "OBJECT_TABLE"; - case 42: - return "OBJECT_TABLESPACE"; - case 43: - return "OBJECT_TRANSFORM"; - case 44: - return "OBJECT_TRIGGER"; - case 45: - return "OBJECT_TSCONFIGURATION"; - case 46: - return "OBJECT_TSDICTIONARY"; - case 47: - return "OBJECT_TSPARSER"; - case 48: - return "OBJECT_TSTEMPLATE"; - case 49: - return "OBJECT_TYPE"; - case 50: - return "OBJECT_USER_MAPPING"; - case 51: - return "OBJECT_VIEW"; - default: - throw new Error("Value not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case 0: - return "DROP_RESTRICT"; - case 1: - return "DROP_CASCADE"; - default: - throw new Error("Value not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case 0: - return "AT_AddColumn"; - case 1: - return "AT_AddColumnRecurse"; - case 2: - return "AT_AddColumnToView"; - case 3: - return "AT_ColumnDefault"; - case 4: - return "AT_CookedColumnDefault"; - case 5: - return "AT_DropNotNull"; - case 6: - return "AT_SetNotNull"; - case 7: - return "AT_DropExpression"; - case 8: - return "AT_CheckNotNull"; - case 9: - return "AT_SetStatistics"; - case 10: - return "AT_SetOptions"; - case 11: - return "AT_ResetOptions"; - case 12: - return "AT_SetStorage"; - case 13: - return "AT_SetCompression"; - case 14: - return "AT_DropColumn"; - case 15: - return "AT_DropColumnRecurse"; - case 16: - return "AT_AddIndex"; - case 17: - return "AT_ReAddIndex"; - case 18: - return "AT_AddConstraint"; - case 19: - return "AT_AddConstraintRecurse"; - case 20: - return "AT_ReAddConstraint"; - case 21: - return "AT_ReAddDomainConstraint"; - case 22: - return "AT_AlterConstraint"; - case 23: - return "AT_ValidateConstraint"; - case 24: - return "AT_ValidateConstraintRecurse"; - case 25: - return "AT_AddIndexConstraint"; - case 26: - return "AT_DropConstraint"; - case 27: - return "AT_DropConstraintRecurse"; - case 28: - return "AT_ReAddComment"; - case 29: - return "AT_AlterColumnType"; - case 30: - return "AT_AlterColumnGenericOptions"; - case 31: - return "AT_ChangeOwner"; - case 32: - return "AT_ClusterOn"; - case 33: - return "AT_DropCluster"; - case 34: - return "AT_SetLogged"; - case 35: - return "AT_SetUnLogged"; - case 36: - return "AT_DropOids"; - case 37: - return "AT_SetAccessMethod"; - case 38: - return "AT_SetTableSpace"; - case 39: - return "AT_SetRelOptions"; - case 40: - return "AT_ResetRelOptions"; - case 41: - return "AT_ReplaceRelOptions"; - case 42: - return "AT_EnableTrig"; - case 43: - return "AT_EnableAlwaysTrig"; - case 44: - return "AT_EnableReplicaTrig"; - case 45: - return "AT_DisableTrig"; - case 46: - return "AT_EnableTrigAll"; - case 47: - return "AT_DisableTrigAll"; - case 48: - return "AT_EnableTrigUser"; - case 49: - return "AT_DisableTrigUser"; - case 50: - return "AT_EnableRule"; - case 51: - return "AT_EnableAlwaysRule"; - case 52: - return "AT_EnableReplicaRule"; - case 53: - return "AT_DisableRule"; - case 54: - return "AT_AddInherit"; - case 55: - return "AT_DropInherit"; - case 56: - return "AT_AddOf"; - case 57: - return "AT_DropOf"; - case 58: - return "AT_ReplicaIdentity"; - case 59: - return "AT_EnableRowSecurity"; - case 60: - return "AT_DisableRowSecurity"; - case 61: - return "AT_ForceRowSecurity"; - case 62: - return "AT_NoForceRowSecurity"; - case 63: - return "AT_GenericOptions"; - case 64: - return "AT_AttachPartition"; - case 65: - return "AT_DetachPartition"; - case 66: - return "AT_DetachPartitionFinalize"; - case 67: - return "AT_AddIdentity"; - case 68: - return "AT_SetIdentity"; - case 69: - return "AT_DropIdentity"; - case 70: - return "AT_ReAddStatistics"; - default: - throw new Error("Value not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case 0: - return "ACL_TARGET_OBJECT"; - case 1: - return "ACL_TARGET_ALL_IN_SCHEMA"; - case 2: - return "ACL_TARGET_DEFAULTS"; - default: - throw new Error("Value not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case 0: - return "VAR_SET_VALUE"; - case 1: - return "VAR_SET_DEFAULT"; - case 2: - return "VAR_SET_CURRENT"; - case 3: - return "VAR_SET_MULTI"; - case 4: - return "VAR_RESET"; - case 5: - return "VAR_RESET_ALL"; - default: - throw new Error("Value not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case 0: - return "CONSTR_NULL"; - case 1: - return "CONSTR_NOTNULL"; - case 2: - return "CONSTR_DEFAULT"; - case 3: - return "CONSTR_IDENTITY"; - case 4: - return "CONSTR_GENERATED"; - case 5: - return "CONSTR_CHECK"; - case 6: - return "CONSTR_PRIMARY"; - case 7: - return "CONSTR_UNIQUE"; - case 8: - return "CONSTR_EXCLUSION"; - case 9: - return "CONSTR_FOREIGN"; - case 10: - return "CONSTR_ATTR_DEFERRABLE"; - case 11: - return "CONSTR_ATTR_NOT_DEFERRABLE"; - case 12: - return "CONSTR_ATTR_DEFERRED"; - case 13: - return "CONSTR_ATTR_IMMEDIATE"; - default: - throw new Error("Value not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case 0: - return "FDW_IMPORT_SCHEMA_ALL"; - case 1: - return "FDW_IMPORT_SCHEMA_LIMIT_TO"; - case 2: - return "FDW_IMPORT_SCHEMA_EXCEPT"; - default: - throw new Error("Value not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case 0: - return "ROLESTMT_ROLE"; - case 1: - return "ROLESTMT_USER"; - case 2: - return "ROLESTMT_GROUP"; - default: - throw new Error("Value not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case 0: - return "FETCH_FORWARD"; - case 1: - return "FETCH_BACKWARD"; - case 2: - return "FETCH_ABSOLUTE"; - case 3: - return "FETCH_RELATIVE"; - default: - throw new Error("Value not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case 0: - return "FUNC_PARAM_IN"; - case 1: - return "FUNC_PARAM_OUT"; - case 2: - return "FUNC_PARAM_INOUT"; - case 3: - return "FUNC_PARAM_VARIADIC"; - case 4: - return "FUNC_PARAM_TABLE"; - case 5: - return "FUNC_PARAM_DEFAULT"; - default: - throw new Error("Value not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case 0: - return "TRANS_STMT_BEGIN"; - case 1: - return "TRANS_STMT_START"; - case 2: - return "TRANS_STMT_COMMIT"; - case 3: - return "TRANS_STMT_ROLLBACK"; - case 4: - return "TRANS_STMT_SAVEPOINT"; - case 5: - return "TRANS_STMT_RELEASE"; - case 6: - return "TRANS_STMT_ROLLBACK_TO"; - case 7: - return "TRANS_STMT_PREPARE"; - case 8: - return "TRANS_STMT_COMMIT_PREPARED"; - case 9: - return "TRANS_STMT_ROLLBACK_PREPARED"; - default: - throw new Error("Value not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case 0: - return "NO_CHECK_OPTION"; - case 1: - return "LOCAL_CHECK_OPTION"; - case 2: - return "CASCADED_CHECK_OPTION"; - default: - throw new Error("Value not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case 0: - return "DISCARD_ALL"; - case 1: - return "DISCARD_PLANS"; - case 2: - return "DISCARD_SEQUENCES"; - case 3: - return "DISCARD_TEMP"; - default: - throw new Error("Value not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case 0: - return "REINDEX_OBJECT_INDEX"; - case 1: - return "REINDEX_OBJECT_TABLE"; - case 2: - return "REINDEX_OBJECT_SCHEMA"; - case 3: - return "REINDEX_OBJECT_SYSTEM"; - case 4: - return "REINDEX_OBJECT_DATABASE"; - default: - throw new Error("Value not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case 0: - return "ALTER_TSCONFIG_ADD_MAPPING"; - case 1: - return "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN"; - case 2: - return "ALTER_TSCONFIG_REPLACE_DICT"; - case 3: - return "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN"; - case 4: - return "ALTER_TSCONFIG_DROP_MAPPING"; - default: - throw new Error("Value not recognized in enum AlterTSConfigType"); - } - } - case "PublicationObjSpecType": - { - switch (key) { - case 0: - return "PUBLICATIONOBJ_TABLE"; - case 1: - return "PUBLICATIONOBJ_TABLES_IN_SCHEMA"; - case 2: - return "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA"; - case 3: - return "PUBLICATIONOBJ_CONTINUATION"; - default: - throw new Error("Value not recognized in enum PublicationObjSpecType"); - } - } - case "AlterPublicationAction": - { - switch (key) { - case 0: - return "AP_AddObjects"; - case 1: - return "AP_DropObjects"; - case 2: - return "AP_SetObjects"; - default: - throw new Error("Value not recognized in enum AlterPublicationAction"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case 0: - return "ALTER_SUBSCRIPTION_OPTIONS"; - case 1: - return "ALTER_SUBSCRIPTION_CONNECTION"; - case 2: - return "ALTER_SUBSCRIPTION_SET_PUBLICATION"; - case 3: - return "ALTER_SUBSCRIPTION_ADD_PUBLICATION"; - case 4: - return "ALTER_SUBSCRIPTION_DROP_PUBLICATION"; - case 5: - return "ALTER_SUBSCRIPTION_REFRESH"; - case 6: - return "ALTER_SUBSCRIPTION_ENABLED"; - case 7: - return "ALTER_SUBSCRIPTION_SKIP"; - default: - throw new Error("Value not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case 0: - return "ONCOMMIT_NOOP"; - case 1: - return "ONCOMMIT_PRESERVE_ROWS"; - case 2: - return "ONCOMMIT_DELETE_ROWS"; - case 3: - return "ONCOMMIT_DROP"; - default: - throw new Error("Value not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case 0: - return "PARAM_EXTERN"; - case 1: - return "PARAM_EXEC"; - case 2: - return "PARAM_SUBLINK"; - case 3: - return "PARAM_MULTIEXPR"; - default: - throw new Error("Value not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case 0: - return "COERCION_IMPLICIT"; - case 1: - return "COERCION_ASSIGNMENT"; - case 2: - return "COERCION_PLPGSQL"; - case 3: - return "COERCION_EXPLICIT"; - default: - throw new Error("Value not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case 0: - return "COERCE_EXPLICIT_CALL"; - case 1: - return "COERCE_EXPLICIT_CAST"; - case 2: - return "COERCE_IMPLICIT_CAST"; - case 3: - return "COERCE_SQL_SYNTAX"; - default: - throw new Error("Value not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case 0: - return "AND_EXPR"; - case 1: - return "OR_EXPR"; - case 2: - return "NOT_EXPR"; - default: - throw new Error("Value not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case 0: - return "EXISTS_SUBLINK"; - case 1: - return "ALL_SUBLINK"; - case 2: - return "ANY_SUBLINK"; - case 3: - return "ROWCOMPARE_SUBLINK"; - case 4: - return "EXPR_SUBLINK"; - case 5: - return "MULTIEXPR_SUBLINK"; - case 6: - return "ARRAY_SUBLINK"; - case 7: - return "CTE_SUBLINK"; - default: - throw new Error("Value not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case 0: - return "ROWCOMPARE_LT"; - case 1: - return "ROWCOMPARE_LE"; - case 2: - return "ROWCOMPARE_EQ"; - case 3: - return "ROWCOMPARE_GE"; - case 4: - return "ROWCOMPARE_GT"; - case 5: - return "ROWCOMPARE_NE"; - default: - throw new Error("Value not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case 0: - return "IS_GREATEST"; - case 1: - return "IS_LEAST"; - default: - throw new Error("Value not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case 0: - return "SVFOP_CURRENT_DATE"; - case 1: - return "SVFOP_CURRENT_TIME"; - case 2: - return "SVFOP_CURRENT_TIME_N"; - case 3: - return "SVFOP_CURRENT_TIMESTAMP"; - case 4: - return "SVFOP_CURRENT_TIMESTAMP_N"; - case 5: - return "SVFOP_LOCALTIME"; - case 6: - return "SVFOP_LOCALTIME_N"; - case 7: - return "SVFOP_LOCALTIMESTAMP"; - case 8: - return "SVFOP_LOCALTIMESTAMP_N"; - case 9: - return "SVFOP_CURRENT_ROLE"; - case 10: - return "SVFOP_CURRENT_USER"; - case 11: - return "SVFOP_USER"; - case 12: - return "SVFOP_SESSION_USER"; - case 13: - return "SVFOP_CURRENT_CATALOG"; - case 14: - return "SVFOP_CURRENT_SCHEMA"; - default: - throw new Error("Value not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case 0: - return "IS_XMLCONCAT"; - case 1: - return "IS_XMLELEMENT"; - case 2: - return "IS_XMLFOREST"; - case 3: - return "IS_XMLPARSE"; - case 4: - return "IS_XMLPI"; - case 5: - return "IS_XMLROOT"; - case 6: - return "IS_XMLSERIALIZE"; - case 7: - return "IS_DOCUMENT"; - default: - throw new Error("Value not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case 0: - return "XMLOPTION_DOCUMENT"; - case 1: - return "XMLOPTION_CONTENT"; - default: - throw new Error("Value not recognized in enum XmlOptionType"); - } - } - case "NullTestType": - { - switch (key) { - case 0: - return "IS_NULL"; - case 1: - return "IS_NOT_NULL"; - default: - throw new Error("Value not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case 0: - return "IS_TRUE"; - case 1: - return "IS_NOT_TRUE"; - case 2: - return "IS_FALSE"; - case 3: - return "IS_NOT_FALSE"; - case 4: - return "IS_UNKNOWN"; - case 5: - return "IS_NOT_UNKNOWN"; - default: - throw new Error("Value not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case 0: - return "CMD_UNKNOWN"; - case 1: - return "CMD_SELECT"; - case 2: - return "CMD_UPDATE"; - case 3: - return "CMD_INSERT"; - case 4: - return "CMD_DELETE"; - case 5: - return "CMD_MERGE"; - case 6: - return "CMD_UTILITY"; - case 7: - return "CMD_NOTHING"; - default: - throw new Error("Value not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case 0: - return "JOIN_INNER"; - case 1: - return "JOIN_LEFT"; - case 2: - return "JOIN_FULL"; - case 3: - return "JOIN_RIGHT"; - case 4: - return "JOIN_SEMI"; - case 5: - return "JOIN_ANTI"; - case 6: - return "JOIN_UNIQUE_OUTER"; - case 7: - return "JOIN_UNIQUE_INNER"; - default: - throw new Error("Value not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case 0: - return "AGG_PLAIN"; - case 1: - return "AGG_SORTED"; - case 2: - return "AGG_HASHED"; - case 3: - return "AGG_MIXED"; - default: - throw new Error("Value not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case 0: - return "AGGSPLIT_SIMPLE"; - case 1: - return "AGGSPLIT_INITIAL_SERIAL"; - case 2: - return "AGGSPLIT_FINAL_DESERIAL"; - default: - throw new Error("Value not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case 0: - return "SETOPCMD_INTERSECT"; - case 1: - return "SETOPCMD_INTERSECT_ALL"; - case 2: - return "SETOPCMD_EXCEPT"; - case 3: - return "SETOPCMD_EXCEPT_ALL"; - default: - throw new Error("Value not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case 0: - return "SETOP_SORTED"; - case 1: - return "SETOP_HASHED"; - default: - throw new Error("Value not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case 0: - return "ONCONFLICT_NONE"; - case 1: - return "ONCONFLICT_NOTHING"; - case 2: - return "ONCONFLICT_UPDATE"; - default: - throw new Error("Value not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case 0: - return "LIMIT_OPTION_DEFAULT"; - case 1: - return "LIMIT_OPTION_COUNT"; - case 2: - return "LIMIT_OPTION_WITH_TIES"; - default: - throw new Error("Value not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case 0: - return "LCS_NONE"; - case 1: - return "LCS_FORKEYSHARE"; - case 2: - return "LCS_FORSHARE"; - case 3: - return "LCS_FORNOKEYUPDATE"; - case 4: - return "LCS_FORUPDATE"; - default: - throw new Error("Value not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case 0: - return "LockWaitBlock"; - case 1: - return "LockWaitSkip"; - case 2: - return "LockWaitError"; - default: - throw new Error("Value not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case 0: - return "LockTupleKeyShare"; - case 1: - return "LockTupleShare"; - case 2: - return "LockTupleNoKeyExclusive"; - case 3: - return "LockTupleExclusive"; - default: - throw new Error("Value not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case 0: - return "NO_KEYWORD"; - case 1: - return "UNRESERVED_KEYWORD"; - case 2: - return "COL_NAME_KEYWORD"; - case 3: - return "TYPE_FUNC_NAME_KEYWORD"; - case 4: - return "RESERVED_KEYWORD"; - default: - throw new Error("Value not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case 0: - return "NUL"; - case 36: - return "ASCII_36"; - case 37: - return "ASCII_37"; - case 40: - return "ASCII_40"; - case 41: - return "ASCII_41"; - case 42: - return "ASCII_42"; - case 43: - return "ASCII_43"; - case 44: - return "ASCII_44"; - case 45: - return "ASCII_45"; - case 46: - return "ASCII_46"; - case 47: - return "ASCII_47"; - case 58: - return "ASCII_58"; - case 59: - return "ASCII_59"; - case 60: - return "ASCII_60"; - case 61: - return "ASCII_61"; - case 62: - return "ASCII_62"; - case 63: - return "ASCII_63"; - case 91: - return "ASCII_91"; - case 92: - return "ASCII_92"; - case 93: - return "ASCII_93"; - case 94: - return "ASCII_94"; - case 258: - return "IDENT"; - case 259: - return "UIDENT"; - case 260: - return "FCONST"; - case 261: - return "SCONST"; - case 262: - return "USCONST"; - case 263: - return "BCONST"; - case 264: - return "XCONST"; - case 265: - return "Op"; - case 266: - return "ICONST"; - case 267: - return "PARAM"; - case 268: - return "TYPECAST"; - case 269: - return "DOT_DOT"; - case 270: - return "COLON_EQUALS"; - case 271: - return "EQUALS_GREATER"; - case 272: - return "LESS_EQUALS"; - case 273: - return "GREATER_EQUALS"; - case 274: - return "NOT_EQUALS"; - case 275: - return "SQL_COMMENT"; - case 276: - return "C_COMMENT"; - case 277: - return "ABORT_P"; - case 278: - return "ABSOLUTE_P"; - case 279: - return "ACCESS"; - case 280: - return "ACTION"; - case 281: - return "ADD_P"; - case 282: - return "ADMIN"; - case 283: - return "AFTER"; - case 284: - return "AGGREGATE"; - case 285: - return "ALL"; - case 286: - return "ALSO"; - case 287: - return "ALTER"; - case 288: - return "ALWAYS"; - case 289: - return "ANALYSE"; - case 290: - return "ANALYZE"; - case 291: - return "AND"; - case 292: - return "ANY"; - case 293: - return "ARRAY"; - case 294: - return "AS"; - case 295: - return "ASC"; - case 296: - return "ASENSITIVE"; - case 297: - return "ASSERTION"; - case 298: - return "ASSIGNMENT"; - case 299: - return "ASYMMETRIC"; - case 300: - return "ATOMIC"; - case 301: - return "AT"; - case 302: - return "ATTACH"; - case 303: - return "ATTRIBUTE"; - case 304: - return "AUTHORIZATION"; - case 305: - return "BACKWARD"; - case 306: - return "BEFORE"; - case 307: - return "BEGIN_P"; - case 308: - return "BETWEEN"; - case 309: - return "BIGINT"; - case 310: - return "BINARY"; - case 311: - return "BIT"; - case 312: - return "BOOLEAN_P"; - case 313: - return "BOTH"; - case 314: - return "BREADTH"; - case 315: - return "BY"; - case 316: - return "CACHE"; - case 317: - return "CALL"; - case 318: - return "CALLED"; - case 319: - return "CASCADE"; - case 320: - return "CASCADED"; - case 321: - return "CASE"; - case 322: - return "CAST"; - case 323: - return "CATALOG_P"; - case 324: - return "CHAIN"; - case 325: - return "CHAR_P"; - case 326: - return "CHARACTER"; - case 327: - return "CHARACTERISTICS"; - case 328: - return "CHECK"; - case 329: - return "CHECKPOINT"; - case 330: - return "CLASS"; - case 331: - return "CLOSE"; - case 332: - return "CLUSTER"; - case 333: - return "COALESCE"; - case 334: - return "COLLATE"; - case 335: - return "COLLATION"; - case 336: - return "COLUMN"; - case 337: - return "COLUMNS"; - case 338: - return "COMMENT"; - case 339: - return "COMMENTS"; - case 340: - return "COMMIT"; - case 341: - return "COMMITTED"; - case 342: - return "COMPRESSION"; - case 343: - return "CONCURRENTLY"; - case 344: - return "CONFIGURATION"; - case 345: - return "CONFLICT"; - case 346: - return "CONNECTION"; - case 347: - return "CONSTRAINT"; - case 348: - return "CONSTRAINTS"; - case 349: - return "CONTENT_P"; - case 350: - return "CONTINUE_P"; - case 351: - return "CONVERSION_P"; - case 352: - return "COPY"; - case 353: - return "COST"; - case 354: - return "CREATE"; - case 355: - return "CROSS"; - case 356: - return "CSV"; - case 357: - return "CUBE"; - case 358: - return "CURRENT_P"; - case 359: - return "CURRENT_CATALOG"; - case 360: - return "CURRENT_DATE"; - case 361: - return "CURRENT_ROLE"; - case 362: - return "CURRENT_SCHEMA"; - case 363: - return "CURRENT_TIME"; - case 364: - return "CURRENT_TIMESTAMP"; - case 365: - return "CURRENT_USER"; - case 366: - return "CURSOR"; - case 367: - return "CYCLE"; - case 368: - return "DATA_P"; - case 369: - return "DATABASE"; - case 370: - return "DAY_P"; - case 371: - return "DEALLOCATE"; - case 372: - return "DEC"; - case 373: - return "DECIMAL_P"; - case 374: - return "DECLARE"; - case 375: - return "DEFAULT"; - case 376: - return "DEFAULTS"; - case 377: - return "DEFERRABLE"; - case 378: - return "DEFERRED"; - case 379: - return "DEFINER"; - case 380: - return "DELETE_P"; - case 381: - return "DELIMITER"; - case 382: - return "DELIMITERS"; - case 383: - return "DEPENDS"; - case 384: - return "DEPTH"; - case 385: - return "DESC"; - case 386: - return "DETACH"; - case 387: - return "DICTIONARY"; - case 388: - return "DISABLE_P"; - case 389: - return "DISCARD"; - case 390: - return "DISTINCT"; - case 391: - return "DO"; - case 392: - return "DOCUMENT_P"; - case 393: - return "DOMAIN_P"; - case 394: - return "DOUBLE_P"; - case 395: - return "DROP"; - case 396: - return "EACH"; - case 397: - return "ELSE"; - case 398: - return "ENABLE_P"; - case 399: - return "ENCODING"; - case 400: - return "ENCRYPTED"; - case 401: - return "END_P"; - case 402: - return "ENUM_P"; - case 403: - return "ESCAPE"; - case 404: - return "EVENT"; - case 405: - return "EXCEPT"; - case 406: - return "EXCLUDE"; - case 407: - return "EXCLUDING"; - case 408: - return "EXCLUSIVE"; - case 409: - return "EXECUTE"; - case 410: - return "EXISTS"; - case 411: - return "EXPLAIN"; - case 412: - return "EXPRESSION"; - case 413: - return "EXTENSION"; - case 414: - return "EXTERNAL"; - case 415: - return "EXTRACT"; - case 416: - return "FALSE_P"; - case 417: - return "FAMILY"; - case 418: - return "FETCH"; - case 419: - return "FILTER"; - case 420: - return "FINALIZE"; - case 421: - return "FIRST_P"; - case 422: - return "FLOAT_P"; - case 423: - return "FOLLOWING"; - case 424: - return "FOR"; - case 425: - return "FORCE"; - case 426: - return "FOREIGN"; - case 427: - return "FORWARD"; - case 428: - return "FREEZE"; - case 429: - return "FROM"; - case 430: - return "FULL"; - case 431: - return "FUNCTION"; - case 432: - return "FUNCTIONS"; - case 433: - return "GENERATED"; - case 434: - return "GLOBAL"; - case 435: - return "GRANT"; - case 436: - return "GRANTED"; - case 437: - return "GREATEST"; - case 438: - return "GROUP_P"; - case 439: - return "GROUPING"; - case 440: - return "GROUPS"; - case 441: - return "HANDLER"; - case 442: - return "HAVING"; - case 443: - return "HEADER_P"; - case 444: - return "HOLD"; - case 445: - return "HOUR_P"; - case 446: - return "IDENTITY_P"; - case 447: - return "IF_P"; - case 448: - return "ILIKE"; - case 449: - return "IMMEDIATE"; - case 450: - return "IMMUTABLE"; - case 451: - return "IMPLICIT_P"; - case 452: - return "IMPORT_P"; - case 453: - return "IN_P"; - case 454: - return "INCLUDE"; - case 455: - return "INCLUDING"; - case 456: - return "INCREMENT"; - case 457: - return "INDEX"; - case 458: - return "INDEXES"; - case 459: - return "INHERIT"; - case 460: - return "INHERITS"; - case 461: - return "INITIALLY"; - case 462: - return "INLINE_P"; - case 463: - return "INNER_P"; - case 464: - return "INOUT"; - case 465: - return "INPUT_P"; - case 466: - return "INSENSITIVE"; - case 467: - return "INSERT"; - case 468: - return "INSTEAD"; - case 469: - return "INT_P"; - case 470: - return "INTEGER"; - case 471: - return "INTERSECT"; - case 472: - return "INTERVAL"; - case 473: - return "INTO"; - case 474: - return "INVOKER"; - case 475: - return "IS"; - case 476: - return "ISNULL"; - case 477: - return "ISOLATION"; - case 478: - return "JOIN"; - case 479: - return "KEY"; - case 480: - return "LABEL"; - case 481: - return "LANGUAGE"; - case 482: - return "LARGE_P"; - case 483: - return "LAST_P"; - case 484: - return "LATERAL_P"; - case 485: - return "LEADING"; - case 486: - return "LEAKPROOF"; - case 487: - return "LEAST"; - case 488: - return "LEFT"; - case 489: - return "LEVEL"; - case 490: - return "LIKE"; - case 491: - return "LIMIT"; - case 492: - return "LISTEN"; - case 493: - return "LOAD"; - case 494: - return "LOCAL"; - case 495: - return "LOCALTIME"; - case 496: - return "LOCALTIMESTAMP"; - case 497: - return "LOCATION"; - case 498: - return "LOCK_P"; - case 499: - return "LOCKED"; - case 500: - return "LOGGED"; - case 501: - return "MAPPING"; - case 502: - return "MATCH"; - case 503: - return "MATCHED"; - case 504: - return "MATERIALIZED"; - case 505: - return "MAXVALUE"; - case 506: - return "MERGE"; - case 507: - return "METHOD"; - case 508: - return "MINUTE_P"; - case 509: - return "MINVALUE"; - case 510: - return "MODE"; - case 511: - return "MONTH_P"; - case 512: - return "MOVE"; - case 513: - return "NAME_P"; - case 514: - return "NAMES"; - case 515: - return "NATIONAL"; - case 516: - return "NATURAL"; - case 517: - return "NCHAR"; - case 518: - return "NEW"; - case 519: - return "NEXT"; - case 520: - return "NFC"; - case 521: - return "NFD"; - case 522: - return "NFKC"; - case 523: - return "NFKD"; - case 524: - return "NO"; - case 525: - return "NONE"; - case 526: - return "NORMALIZE"; - case 527: - return "NORMALIZED"; - case 528: - return "NOT"; - case 529: - return "NOTHING"; - case 530: - return "NOTIFY"; - case 531: - return "NOTNULL"; - case 532: - return "NOWAIT"; - case 533: - return "NULL_P"; - case 534: - return "NULLIF"; - case 535: - return "NULLS_P"; - case 536: - return "NUMERIC"; - case 537: - return "OBJECT_P"; - case 538: - return "OF"; - case 539: - return "OFF"; - case 540: - return "OFFSET"; - case 541: - return "OIDS"; - case 542: - return "OLD"; - case 543: - return "ON"; - case 544: - return "ONLY"; - case 545: - return "OPERATOR"; - case 546: - return "OPTION"; - case 547: - return "OPTIONS"; - case 548: - return "OR"; - case 549: - return "ORDER"; - case 550: - return "ORDINALITY"; - case 551: - return "OTHERS"; - case 552: - return "OUT_P"; - case 553: - return "OUTER_P"; - case 554: - return "OVER"; - case 555: - return "OVERLAPS"; - case 556: - return "OVERLAY"; - case 557: - return "OVERRIDING"; - case 558: - return "OWNED"; - case 559: - return "OWNER"; - case 560: - return "PARALLEL"; - case 561: - return "PARAMETER"; - case 562: - return "PARSER"; - case 563: - return "PARTIAL"; - case 564: - return "PARTITION"; - case 565: - return "PASSING"; - case 566: - return "PASSWORD"; - case 567: - return "PLACING"; - case 568: - return "PLANS"; - case 569: - return "POLICY"; - case 570: - return "POSITION"; - case 571: - return "PRECEDING"; - case 572: - return "PRECISION"; - case 573: - return "PRESERVE"; - case 574: - return "PREPARE"; - case 575: - return "PREPARED"; - case 576: - return "PRIMARY"; - case 577: - return "PRIOR"; - case 578: - return "PRIVILEGES"; - case 579: - return "PROCEDURAL"; - case 580: - return "PROCEDURE"; - case 581: - return "PROCEDURES"; - case 582: - return "PROGRAM"; - case 583: - return "PUBLICATION"; - case 584: - return "QUOTE"; - case 585: - return "RANGE"; - case 586: - return "READ"; - case 587: - return "REAL"; - case 588: - return "REASSIGN"; - case 589: - return "RECHECK"; - case 590: - return "RECURSIVE"; - case 591: - return "REF_P"; - case 592: - return "REFERENCES"; - case 593: - return "REFERENCING"; - case 594: - return "REFRESH"; - case 595: - return "REINDEX"; - case 596: - return "RELATIVE_P"; - case 597: - return "RELEASE"; - case 598: - return "RENAME"; - case 599: - return "REPEATABLE"; - case 600: - return "REPLACE"; - case 601: - return "REPLICA"; - case 602: - return "RESET"; - case 603: - return "RESTART"; - case 604: - return "RESTRICT"; - case 605: - return "RETURN"; - case 606: - return "RETURNING"; - case 607: - return "RETURNS"; - case 608: - return "REVOKE"; - case 609: - return "RIGHT"; - case 610: - return "ROLE"; - case 611: - return "ROLLBACK"; - case 612: - return "ROLLUP"; - case 613: - return "ROUTINE"; - case 614: - return "ROUTINES"; - case 615: - return "ROW"; - case 616: - return "ROWS"; - case 617: - return "RULE"; - case 618: - return "SAVEPOINT"; - case 619: - return "SCHEMA"; - case 620: - return "SCHEMAS"; - case 621: - return "SCROLL"; - case 622: - return "SEARCH"; - case 623: - return "SECOND_P"; - case 624: - return "SECURITY"; - case 625: - return "SELECT"; - case 626: - return "SEQUENCE"; - case 627: - return "SEQUENCES"; - case 628: - return "SERIALIZABLE"; - case 629: - return "SERVER"; - case 630: - return "SESSION"; - case 631: - return "SESSION_USER"; - case 632: - return "SET"; - case 633: - return "SETS"; - case 634: - return "SETOF"; - case 635: - return "SHARE"; - case 636: - return "SHOW"; - case 637: - return "SIMILAR"; - case 638: - return "SIMPLE"; - case 639: - return "SKIP"; - case 640: - return "SMALLINT"; - case 641: - return "SNAPSHOT"; - case 642: - return "SOME"; - case 643: - return "SQL_P"; - case 644: - return "STABLE"; - case 645: - return "STANDALONE_P"; - case 646: - return "START"; - case 647: - return "STATEMENT"; - case 648: - return "STATISTICS"; - case 649: - return "STDIN"; - case 650: - return "STDOUT"; - case 651: - return "STORAGE"; - case 652: - return "STORED"; - case 653: - return "STRICT_P"; - case 654: - return "STRIP_P"; - case 655: - return "SUBSCRIPTION"; - case 656: - return "SUBSTRING"; - case 657: - return "SUPPORT"; - case 658: - return "SYMMETRIC"; - case 659: - return "SYSID"; - case 660: - return "SYSTEM_P"; - case 661: - return "TABLE"; - case 662: - return "TABLES"; - case 663: - return "TABLESAMPLE"; - case 664: - return "TABLESPACE"; - case 665: - return "TEMP"; - case 666: - return "TEMPLATE"; - case 667: - return "TEMPORARY"; - case 668: - return "TEXT_P"; - case 669: - return "THEN"; - case 670: - return "TIES"; - case 671: - return "TIME"; - case 672: - return "TIMESTAMP"; - case 673: - return "TO"; - case 674: - return "TRAILING"; - case 675: - return "TRANSACTION"; - case 676: - return "TRANSFORM"; - case 677: - return "TREAT"; - case 678: - return "TRIGGER"; - case 679: - return "TRIM"; - case 680: - return "TRUE_P"; - case 681: - return "TRUNCATE"; - case 682: - return "TRUSTED"; - case 683: - return "TYPE_P"; - case 684: - return "TYPES_P"; - case 685: - return "UESCAPE"; - case 686: - return "UNBOUNDED"; - case 687: - return "UNCOMMITTED"; - case 688: - return "UNENCRYPTED"; - case 689: - return "UNION"; - case 690: - return "UNIQUE"; - case 691: - return "UNKNOWN"; - case 692: - return "UNLISTEN"; - case 693: - return "UNLOGGED"; - case 694: - return "UNTIL"; - case 695: - return "UPDATE"; - case 696: - return "USER"; - case 697: - return "USING"; - case 698: - return "VACUUM"; - case 699: - return "VALID"; - case 700: - return "VALIDATE"; - case 701: - return "VALIDATOR"; - case 702: - return "VALUE_P"; - case 703: - return "VALUES"; - case 704: - return "VARCHAR"; - case 705: - return "VARIADIC"; - case 706: - return "VARYING"; - case 707: - return "VERBOSE"; - case 708: - return "VERSION_P"; - case 709: - return "VIEW"; - case 710: - return "VIEWS"; - case 711: - return "VOLATILE"; - case 712: - return "WHEN"; - case 713: - return "WHERE"; - case 714: - return "WHITESPACE_P"; - case 715: - return "WINDOW"; - case 716: - return "WITH"; - case 717: - return "WITHIN"; - case 718: - return "WITHOUT"; - case 719: - return "WORK"; - case 720: - return "WRAPPER"; - case 721: - return "WRITE"; - case 722: - return "XML_P"; - case 723: - return "XMLATTRIBUTES"; - case 724: - return "XMLCONCAT"; - case 725: - return "XMLELEMENT"; - case 726: - return "XMLEXISTS"; - case 727: - return "XMLFOREST"; - case 728: - return "XMLNAMESPACES"; - case 729: - return "XMLPARSE"; - case 730: - return "XMLPI"; - case 731: - return "XMLROOT"; - case 732: - return "XMLSERIALIZE"; - case 733: - return "XMLTABLE"; - case 734: - return "YEAR_P"; - case 735: - return "YES_P"; - case 736: - return "ZONE"; - case 737: - return "NOT_LA"; - case 738: - return "NULLS_LA"; - case 739: - return "WITH_LA"; - case 740: - return "MODE_TYPE_NAME"; - case 741: - return "MODE_PLPGSQL_EXPR"; - case 742: - return "MODE_PLPGSQL_ASSIGN1"; - case 743: - return "MODE_PLPGSQL_ASSIGN2"; - case 744: - return "MODE_PLPGSQL_ASSIGN3"; - case 745: - return "UMINUS"; - default: - throw new Error("Value not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/15/runtime-schema.ts b/packages/transform/src/15/runtime-schema.ts deleted file mode 100644 index 317f6fed..00000000 --- a/packages/transform/src/15/runtime-schema.ts +++ /dev/null @@ -1,8972 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export interface FieldSpec { - name: string; - type: string; - isArray: boolean; - optional: boolean; -} -export interface NodeSpec { - name: string; - isNode: boolean; - fields: FieldSpec[]; -} -export const runtimeSchema: NodeSpec[] = [ - { - name: 'A_ArrayExpr', - isNode: true, - fields: [ - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Const', - isNode: true, - fields: [ - { - name: 'boolval', - type: 'Boolean', - isArray: false, - optional: true - }, - { - name: 'bsval', - type: 'BitString', - isArray: false, - optional: true - }, - { - name: 'fval', - type: 'Float', - isArray: false, - optional: true - }, - { - name: 'isnull', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'ival', - type: 'Integer', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'sval', - type: 'String', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Expr', - isNode: true, - fields: [ - { - name: 'kind', - type: 'A_Expr_Kind', - isArray: false, - optional: true - }, - { - name: 'lexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indices', - isNode: true, - fields: [ - { - name: 'is_slice', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lidx', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'uidx', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indirection', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'A_Star', - isNode: true, - fields: [ - - ] - }, - { - name: 'AccessPriv', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'priv_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Aggref', - isNode: true, - fields: [ - { - name: 'aggargtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggdirectargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggdistinct', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'aggfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'aggorder', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggsplit', - type: 'AggSplit', - isArray: false, - optional: true - }, - { - name: 'aggstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'aggtransno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'aggtranstype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Alias', - isNode: true, - fields: [ - { - name: 'aliasname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterCollationStmt', - isNode: true, - fields: [ - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDatabaseRefreshCollStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterDatabaseSetStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterDatabaseStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDefaultPrivilegesStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'GrantStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDomainStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEnumStmt', - isNode: true, - fields: [ - { - name: 'newVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newValIsAfter', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newValNeighbor', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'oldVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'skipIfNewValExists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEventTrigStmt', - isNode: true, - fields: [ - { - name: 'tgenabled', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionContentsStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterForeignServerStmt', - isNode: true, - fields: [ - { - name: 'has_version', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterFunctionStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlternativeSubPlan', - isNode: true, - fields: [ - { - name: 'subplans', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectDependsStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'String', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'remove', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectSchemaStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newschema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterOperatorStmt', - isNode: true, - fields: [ - { - name: 'opername', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'isDrop', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOwnerStmt', - isNode: true, - fields: [ - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPolicyStmt', - isNode: true, - fields: [ - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPublicationStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'AlterPublicationAction', - isArray: false, - optional: true - }, - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pubobjects', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterRoleSetStmt', - isNode: true, - fields: [ - { - name: 'database', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterRoleStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'stxstattarget', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'AlterSubscriptionType', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSystemStmt', - isNode: true, - fields: [ - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableCmd', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'num', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recurse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'AlterTableType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableMoveAllStmt', - isNode: true, - fields: [ - { - name: 'new_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'orig_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTableSpaceOptionsStmt', - isNode: true, - fields: [ - { - name: 'isReset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableStmt', - isNode: true, - fields: [ - { - name: 'cmds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTSConfigurationStmt', - isNode: true, - fields: [ - { - name: 'cfgname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'dicts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'AlterTSConfigType', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tokentype', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTSDictionaryStmt', - isNode: true, - fields: [ - { - name: 'dictname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTypeStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterUserMappingStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayCoerceExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'elemexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayExpr', - isNode: true, - fields: [ - { - name: 'array_collid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'array_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'element_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'multidims', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BitString', - isNode: true, - fields: [ - { - name: 'bsval', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Boolean', - isNode: true, - fields: [ - { - name: 'boolval', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'BooleanTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'booltesttype', - type: 'BoolTestType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BoolExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'boolop', - type: 'BoolExprType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallContext', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallStmt', - isNode: true, - fields: [ - { - name: 'funccall', - type: 'FuncCall', - isArray: false, - optional: true - }, - { - name: 'funcexpr', - type: 'FuncExpr', - isArray: false, - optional: true - }, - { - name: 'outargs', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CaseExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'casecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'casetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'defresult', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseTestExpr', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseWhen', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'result', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CheckPointStmt', - isNode: true, - fields: [ - - ] - }, - { - name: 'ClosePortalStmt', - isNode: true, - fields: [ - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ClusterStmt', - isNode: true, - fields: [ - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoalesceExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coalescecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'coalescetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomain', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coercionformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomainValue', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceViaIO', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateClause', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnDef', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'compression', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cooked_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fdwoptions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'generated', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identity', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identitySequence', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'inhcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'is_from_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'raw_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'storage', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnRef', - isNode: true, - fields: [ - { - name: 'fields', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommentStmt', - isNode: true, - fields: [ - { - name: 'comment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommonTableExpr', - isNode: true, - fields: [ - { - name: 'aliascolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctematerialized', - type: 'CTEMaterialize', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'ctequery', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cterecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'cterefcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cycle_clause', - type: 'CTECycleClause', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'search_clause', - type: 'CTESearchClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'CompositeTypeStmt', - isNode: true, - fields: [ - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typevar', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'Constraint', - isNode: true, - fields: [ - { - name: 'access_method', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'contype', - type: 'ConstrType', - isArray: false, - optional: true - }, - { - name: 'cooked_expr', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'exclusions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_del_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_del_set_cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_matchtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_upd_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'generated_when', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'including', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexspace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'initially_valid', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_no_inherit', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'keys', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nulls_not_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'old_conpfeqop', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'old_pktable_oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pktable', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'raw_expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'skip_validation', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'where_clause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConstraintsSetStmt', - isNode: true, - fields: [ - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'deferred', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConvertRowtypeExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'convertformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CopyStmt', - isNode: true, - fields: [ - { - name: 'attlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'is_from', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_program', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateAmStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'amtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'handler_name', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateCastStmt', - isNode: true, - fields: [ - { - name: 'context', - type: 'CoercionContext', - isArray: false, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'inout', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sourcetype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'targettype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateConversionStmt', - isNode: true, - fields: [ - { - name: 'conversion_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'def', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'for_encoding_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'to_encoding_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatedbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateDomainStmt', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'domainname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateEnumStmt', - isNode: true, - fields: [ - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'vals', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateEventTrigStmt', - isNode: true, - fields: [ - { - name: 'eventname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenclause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateForeignServerStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'servertype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateForeignTableStmt', - isNode: true, - fields: [ - { - name: 'base', - type: 'CreateStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateFunctionStmt', - isNode: true, - fields: [ - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_procedure', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parameters', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'returnType', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'sql_body', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassItem', - isNode: true, - fields: [ - { - name: 'class_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'itemtype', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'order_family', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'storedtype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'datatype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'isDefault', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreatePLangStmt', - isNode: true, - fields: [ - { - name: 'plhandler', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plinline', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pltrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'plvalidator', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePolicyStmt', - isNode: true, - fields: [ - { - name: 'cmd_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'permissive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePublicationStmt', - isNode: true, - fields: [ - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pubobjects', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRangeStmt', - isNode: true, - fields: [ - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRoleStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'stmt_type', - type: 'RoleStmtType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSchemaStmt', - isNode: true, - fields: [ - { - name: 'authrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'schemaElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ownerId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'exprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stat_types', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stxcomment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'transformed', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inhRelations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ofTypename', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'oncommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partbound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'partspec', - type: 'PartitionSpec', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'tableElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableAsStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'into', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'is_select_into', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'location', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'owner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTransformStmt', - isNode: true, - fields: [ - { - name: 'fromsql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'lang', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tosql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'type_name', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTrigStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'constrrel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'events', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'row', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'timing', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'transitionRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateUserMappingStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'CTECycleClause', - isNode: true, - fields: [ - { - name: 'cycle_col_list', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cycle_mark_collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_column', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_neop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_value', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cycle_path_column', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CTESearchClause', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'search_breadth_first', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'search_col_list', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'search_seq_column', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CurrentOfExpr', - isNode: true, - fields: [ - { - name: 'cursor_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'cursor_param', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cvarno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeallocateStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeclareCursorStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefElem', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'defaction', - type: 'DefElemAction', - isArray: false, - optional: true - }, - { - name: 'defname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'defnamespace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefineStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'definition', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'oldstyle', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeleteStmt', - isNode: true, - fields: [ - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'DiscardStmt', - isNode: true, - fields: [ - { - name: 'target', - type: 'DiscardMode', - isArray: false, - optional: true - } - ] - }, - { - name: 'DistinctExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DoStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropdbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropOwnedStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropRoleStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'removeType', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropUserMappingStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ExecuteStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ExplainStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FetchStmt', - isNode: true, - fields: [ - { - name: 'direction', - type: 'FetchDirection', - isArray: false, - optional: true - }, - { - name: 'howMany', - type: 'int64', - isArray: false, - optional: true - }, - { - name: 'ismove', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldSelect', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnum', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldStore', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'newvals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Float', - isNode: true, - fields: [ - { - name: 'fval', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FromExpr', - isNode: true, - fields: [ - { - name: 'fromlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncCall', - isNode: true, - fields: [ - { - name: 'agg_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_filter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'agg_order', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'agg_star', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_within_group', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func_variadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'over', - type: 'WindowDef', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'funcid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FunctionParameter', - isNode: true, - fields: [ - { - name: 'argType', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'defexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'mode', - type: 'FunctionParameterMode', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'GrantRoleStmt', - isNode: true, - fields: [ - { - name: 'admin_opt', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'granted_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantee_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantor', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'GrantStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'grant_option', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'grantees', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantor', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'privileges', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targtype', - type: 'GrantTargetType', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingFunc', - isNode: true, - fields: [ - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingSet', - isNode: true, - fields: [ - { - name: 'content', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'GroupingSetKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ImportForeignSchemaStmt', - isNode: true, - fields: [ - { - name: 'list_type', - type: 'ImportForeignSchemaType', - isArray: false, - optional: true - }, - { - name: 'local_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'remote_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'server_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'table_list', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IndexElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indexcolname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nulls_ordering', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassopts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordering', - type: 'SortByDir', - isArray: false, - optional: true - } - ] - }, - { - name: 'IndexStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'excludeOpNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'idxcomment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'idxname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'indexIncludingParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'indexParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'nulls_not_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'oldCreateSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldFirstRelfilenodeSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldNode', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'primary', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'transformed', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'unique', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferClause', - isNode: true, - fields: [ - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferenceElem', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'infercollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inferopclass', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InlineCodeBlock', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langIsTrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'source_text', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'InsertStmt', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictClause', - type: 'OnConflictClause', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'selectStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'Integer', - isNode: true, - fields: [ - { - name: 'ival', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'IntList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IntoClause', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onCommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpaceName', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'viewQuery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'JoinExpr', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'isNatural', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'join_using_alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'List', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ListenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LoadStmt', - isNode: true, - fields: [ - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockingClause', - isNode: true, - fields: [ - { - name: 'lockedRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockStmt', - isNode: true, - fields: [ - { - name: 'mode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MergeAction', - isNode: true, - fields: [ - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'matched', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'updateColnos', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MergeStmt', - isNode: true, - fields: [ - { - name: 'joinCondition', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'mergeWhenClauses', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'sourceRelation', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'MergeWhenClause', - isNode: true, - fields: [ - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'condition', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'matched', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'values', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MinMaxExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'minmaxcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'minmaxtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'MinMaxOp', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'MultiAssignRef', - isNode: true, - fields: [ - { - name: 'colno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'ncolumns', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'source', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NamedArgExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argnumber', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NextValueExpr', - isNode: true, - fields: [ - { - name: 'seqid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NotifyStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'payload', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'NullIfExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NullTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argisrow', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nulltesttype', - type: 'NullTestType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ObjectWithArgs', - isNode: true, - fields: [ - { - name: 'args_unspecified', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objfuncargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OidList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OnConflictClause', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'infer', - type: 'InferClause', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OnConflictExpr', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'arbiterElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'arbiterWhere', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'constraint', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'exclRelIndex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'exclRelTlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictSet', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictWhere', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Param', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramid', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramkind', - type: 'ParamKind', - isArray: false, - optional: true - }, - { - name: 'paramtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramtypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParamRef', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParseResult', - isNode: false, - fields: [ - { - name: 'stmts', - type: 'RawStmt', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionBoundSpec', - isNode: true, - fields: [ - { - name: 'is_default', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'listdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'lowerdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'modulus', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'remainder', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'strategy', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'upperdatums', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionCmd', - isNode: true, - fields: [ - { - name: 'bound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionRangeDatum', - isNode: true, - fields: [ - { - name: 'kind', - type: 'PartitionRangeDatumKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'value', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'partParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strategy', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'PLAssignStmt', - isNode: true, - fields: [ - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nnames', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'SelectStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'PrepareStmt', - isNode: true, - fields: [ - { - name: 'argtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'PublicationObjSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pubobjtype', - type: 'PublicationObjSpecType', - isArray: false, - optional: true - }, - { - name: 'pubtable', - type: 'PublicationTable', - isArray: false, - optional: true - } - ] - }, - { - name: 'PublicationTable', - isNode: true, - fields: [ - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Query', - isNode: true, - fields: [ - { - name: 'canSetTag', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'constraintDeps', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cteList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupDistinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'groupingSets', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'hasAggs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasDistinctOn', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasForUpdate', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasModifyingCTE', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRowSecurity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasSubLinks', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasTargetSRFs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasWindowFuncs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'havingQual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'isReturn', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'jointree', - type: 'FromExpr', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'mergeActionList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'mergeUseOuterJoin', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'onConflict', - type: 'OnConflictExpr', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'querySource', - type: 'QuerySource', - isArray: false, - optional: true - }, - { - name: 'resultRelation', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowMarks', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rtable', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'setOperations', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'utilityStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withCheckOptions', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeFunction', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_rowsfrom', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'ordinality', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeSubselect', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFunc', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'namespaces', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFuncCol', - isNode: true, - fields: [ - { - name: 'coldefexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'for_ordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableSample', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'method', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTblEntry', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'checkAsUser', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctelevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrtuples', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'eref', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'extraUpdatedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'funcordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inFromCl', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'insertedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'join_using_alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'joinaliasvars', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinleftcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinmergedcols', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'joinrightcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'rellockmode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'requiredPerms', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'rtekind', - type: 'RTEKind', - isArray: false, - optional: true - }, - { - name: 'security_barrier', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'securityQuals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'selectedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'self_reference', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Query', - isArray: false, - optional: true - }, - { - name: 'tablefunc', - type: 'TableFunc', - isArray: false, - optional: true - }, - { - name: 'tablesample', - type: 'TableSampleClause', - isArray: false, - optional: true - }, - { - name: 'updatedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'values_lists', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblFunction', - isNode: true, - fields: [ - { - name: 'funccolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccolcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funccolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funcexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'funcparams', - type: 'uint64', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblRef', - isNode: true, - fields: [ - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeVar', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'catalogname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'relpersistence', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'RawStmt', - isNode: true, - fields: [ - { - name: 'stmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReassignOwnedStmt', - isNode: true, - fields: [ - { - name: 'newrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RefreshMatViewStmt', - isNode: true, - fields: [ - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReindexStmt', - isNode: true, - fields: [ - { - name: 'kind', - type: 'ReindexObjectType', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'RelabelType', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relabelformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RenameStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'renameType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReplicaIdentityStmt', - isNode: true, - fields: [ - { - name: 'identity_type', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ResTarget', - isNode: true, - fields: [ - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReturnStmt', - isNode: true, - fields: [ - { - name: 'returnval', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RoleSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rolename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roletype', - type: 'RoleSpecType', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowCompareExpr', - isNode: true, - fields: [ - { - name: 'inputcollids', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'largs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilies', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opnos', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rctype', - type: 'RowCompareType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'row_format', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'row_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowMarkClause', - isNode: true, - fields: [ - { - name: 'pushedDown', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rti', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'RuleStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'event', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'instead', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rulename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScalarArrayOpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'hashfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'negfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opfuncid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'useOr', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanResult', - isNode: false, - fields: [ - { - name: 'tokens', - type: 'ScanToken', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanToken', - isNode: false, - fields: [ - { - name: 'end', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'keywordKind', - type: 'KeywordKind', - isArray: false, - optional: true - }, - { - name: 'start', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'token', - type: 'Token', - isArray: false, - optional: true - } - ] - }, - { - name: 'SecLabelStmt', - isNode: true, - fields: [ - { - name: 'label', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'provider', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SelectStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupDistinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'havingClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'intoClause', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'lockingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'valuesLists', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetOperationStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'colCollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClauses', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetToDefault', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SortBy', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'node', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortby_dir', - type: 'SortByDir', - isArray: false, - optional: true - }, - { - name: 'sortby_nulls', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'useOp', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'SortGroupClause', - isNode: true, - fields: [ - { - name: 'eqop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'hashable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'nulls_first', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sortop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'tleSortGroupRef', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'SQLValueFunction', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SQLValueFunctionOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'StatsElem', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'String', - isNode: true, - fields: [ - { - name: 'sval', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubLink', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'operName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subLinkId', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'subselect', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubPlan', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'firstColCollation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColType', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColTypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'parallel_safe', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'paramIds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'per_call_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'plan_id', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'plan_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'startup_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'unknownEqFalse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'useHashTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubscriptingRef', - isNode: true, - fields: [ - { - name: 'refassgnexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'refcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refcontainertype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refelemtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reflowerindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refrestype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'reftypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refupperindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableFunc', - isNode: true, - fields: [ - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coldefexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'notnulls', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'ns_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ns_uris', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordinalitycol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableLikeClause', - isNode: true, - fields: [ - { - name: 'options', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationOid', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableSampleClause', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'tsmhandler', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TargetEntry', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'resjunk', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'resname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'resno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigcol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigtbl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ressortgroupref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TransactionStmt', - isNode: true, - fields: [ - { - name: 'chain', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'gid', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'TransactionStmtKind', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'savepoint_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TriggerTransition', - isNode: true, - fields: [ - { - name: 'isNew', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TruncateStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'restart_seqs', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeCast', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeName', - isNode: true, - fields: [ - { - name: 'arrayBounds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pct_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'setof', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typemod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmods', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'UnlistenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'UpdateStmt', - isNode: true, - fields: [ - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'VacuumRelation', - isNode: true, - fields: [ - { - name: 'oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'va_cols', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'VacuumStmt', - isNode: true, - fields: [ - { - name: 'is_vacuumcmd', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rels', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'Var', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varattno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varattnosyn', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varlevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varnosyn', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'vartype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'vartypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableSetStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'VariableSetKind', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableShowStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ViewStmt', - isNode: true, - fields: [ - { - name: 'aliases', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'view', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'withCheckOption', - type: 'ViewCheckOption', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowClause', - isNode: true, - fields: [ - { - name: 'copiedOrder', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'endInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'inRangeAsc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inRangeColl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inRangeNullsFirst', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'runCondition', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'startInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowDef', - isNode: true, - fields: [ - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowFunc', - isNode: true, - fields: [ - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'winagg', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wincollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wintype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithCheckOption', - isNode: true, - fields: [ - { - name: 'cascaded', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'WCOKind', - isArray: false, - optional: true - }, - { - name: 'polname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithClause', - isNode: true, - fields: [ - { - name: 'ctes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recursive', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlExpr', - isNode: true, - fields: [ - { - name: 'arg_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'named_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'XmlExprOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlSerialize', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - } - ] - } -]; \ No newline at end of file diff --git a/packages/transform/src/16/enum-to-int.ts b/packages/transform/src/16/enum-to-int.ts deleted file mode 100644 index 28b5d3c6..00000000 --- a/packages/transform/src/16/enum-to-int.ts +++ /dev/null @@ -1,2346 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionStrategy" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "PublicationObjSpecType" | "AlterPublicationAction" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "JsonEncoding" | "JsonFormatType" | "JsonConstructorType" | "JsonValueType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumInt = (enumType: EnumType, key: string): number => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case "OVERRIDING_NOT_SET": - return 0; - case "OVERRIDING_USER_VALUE": - return 1; - case "OVERRIDING_SYSTEM_VALUE": - return 2; - default: - throw new Error("Key not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case "QSRC_ORIGINAL": - return 0; - case "QSRC_PARSER": - return 1; - case "QSRC_INSTEAD_RULE": - return 2; - case "QSRC_QUAL_INSTEAD_RULE": - return 3; - case "QSRC_NON_INSTEAD_RULE": - return 4; - default: - throw new Error("Key not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case "SORTBY_DEFAULT": - return 0; - case "SORTBY_ASC": - return 1; - case "SORTBY_DESC": - return 2; - case "SORTBY_USING": - return 3; - default: - throw new Error("Key not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case "SORTBY_NULLS_DEFAULT": - return 0; - case "SORTBY_NULLS_FIRST": - return 1; - case "SORTBY_NULLS_LAST": - return 2; - default: - throw new Error("Key not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case "SET_QUANTIFIER_DEFAULT": - return 0; - case "SET_QUANTIFIER_ALL": - return 1; - case "SET_QUANTIFIER_DISTINCT": - return 2; - default: - throw new Error("Key not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case "AEXPR_OP": - return 0; - case "AEXPR_OP_ANY": - return 1; - case "AEXPR_OP_ALL": - return 2; - case "AEXPR_DISTINCT": - return 3; - case "AEXPR_NOT_DISTINCT": - return 4; - case "AEXPR_NULLIF": - return 5; - case "AEXPR_IN": - return 6; - case "AEXPR_LIKE": - return 7; - case "AEXPR_ILIKE": - return 8; - case "AEXPR_SIMILAR": - return 9; - case "AEXPR_BETWEEN": - return 10; - case "AEXPR_NOT_BETWEEN": - return 11; - case "AEXPR_BETWEEN_SYM": - return 12; - case "AEXPR_NOT_BETWEEN_SYM": - return 13; - default: - throw new Error("Key not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case "ROLESPEC_CSTRING": - return 0; - case "ROLESPEC_CURRENT_ROLE": - return 1; - case "ROLESPEC_CURRENT_USER": - return 2; - case "ROLESPEC_SESSION_USER": - return 3; - case "ROLESPEC_PUBLIC": - return 4; - default: - throw new Error("Key not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case "CREATE_TABLE_LIKE_COMMENTS": - return 0; - case "CREATE_TABLE_LIKE_COMPRESSION": - return 1; - case "CREATE_TABLE_LIKE_CONSTRAINTS": - return 2; - case "CREATE_TABLE_LIKE_DEFAULTS": - return 3; - case "CREATE_TABLE_LIKE_GENERATED": - return 4; - case "CREATE_TABLE_LIKE_IDENTITY": - return 5; - case "CREATE_TABLE_LIKE_INDEXES": - return 6; - case "CREATE_TABLE_LIKE_STATISTICS": - return 7; - case "CREATE_TABLE_LIKE_STORAGE": - return 8; - case "CREATE_TABLE_LIKE_ALL": - return 9; - default: - throw new Error("Key not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case "DEFELEM_UNSPEC": - return 0; - case "DEFELEM_SET": - return 1; - case "DEFELEM_ADD": - return 2; - case "DEFELEM_DROP": - return 3; - default: - throw new Error("Key not recognized in enum DefElemAction"); - } - } - case "PartitionStrategy": - { - switch (key) { - case "PARTITION_STRATEGY_LIST": - return 0; - case "PARTITION_STRATEGY_RANGE": - return 1; - case "PARTITION_STRATEGY_HASH": - return 2; - default: - throw new Error("Key not recognized in enum PartitionStrategy"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case "PARTITION_RANGE_DATUM_MINVALUE": - return 0; - case "PARTITION_RANGE_DATUM_VALUE": - return 1; - case "PARTITION_RANGE_DATUM_MAXVALUE": - return 2; - default: - throw new Error("Key not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case "RTE_RELATION": - return 0; - case "RTE_SUBQUERY": - return 1; - case "RTE_JOIN": - return 2; - case "RTE_FUNCTION": - return 3; - case "RTE_TABLEFUNC": - return 4; - case "RTE_VALUES": - return 5; - case "RTE_CTE": - return 6; - case "RTE_NAMEDTUPLESTORE": - return 7; - case "RTE_RESULT": - return 8; - default: - throw new Error("Key not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case "WCO_VIEW_CHECK": - return 0; - case "WCO_RLS_INSERT_CHECK": - return 1; - case "WCO_RLS_UPDATE_CHECK": - return 2; - case "WCO_RLS_CONFLICT_CHECK": - return 3; - case "WCO_RLS_MERGE_UPDATE_CHECK": - return 4; - case "WCO_RLS_MERGE_DELETE_CHECK": - return 5; - default: - throw new Error("Key not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case "GROUPING_SET_EMPTY": - return 0; - case "GROUPING_SET_SIMPLE": - return 1; - case "GROUPING_SET_ROLLUP": - return 2; - case "GROUPING_SET_CUBE": - return 3; - case "GROUPING_SET_SETS": - return 4; - default: - throw new Error("Key not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case "CTEMaterializeDefault": - return 0; - case "CTEMaterializeAlways": - return 1; - case "CTEMaterializeNever": - return 2; - default: - throw new Error("Key not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case "SETOP_NONE": - return 0; - case "SETOP_UNION": - return 1; - case "SETOP_INTERSECT": - return 2; - case "SETOP_EXCEPT": - return 3; - default: - throw new Error("Key not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case "OBJECT_ACCESS_METHOD": - return 0; - case "OBJECT_AGGREGATE": - return 1; - case "OBJECT_AMOP": - return 2; - case "OBJECT_AMPROC": - return 3; - case "OBJECT_ATTRIBUTE": - return 4; - case "OBJECT_CAST": - return 5; - case "OBJECT_COLUMN": - return 6; - case "OBJECT_COLLATION": - return 7; - case "OBJECT_CONVERSION": - return 8; - case "OBJECT_DATABASE": - return 9; - case "OBJECT_DEFAULT": - return 10; - case "OBJECT_DEFACL": - return 11; - case "OBJECT_DOMAIN": - return 12; - case "OBJECT_DOMCONSTRAINT": - return 13; - case "OBJECT_EVENT_TRIGGER": - return 14; - case "OBJECT_EXTENSION": - return 15; - case "OBJECT_FDW": - return 16; - case "OBJECT_FOREIGN_SERVER": - return 17; - case "OBJECT_FOREIGN_TABLE": - return 18; - case "OBJECT_FUNCTION": - return 19; - case "OBJECT_INDEX": - return 20; - case "OBJECT_LANGUAGE": - return 21; - case "OBJECT_LARGEOBJECT": - return 22; - case "OBJECT_MATVIEW": - return 23; - case "OBJECT_OPCLASS": - return 24; - case "OBJECT_OPERATOR": - return 25; - case "OBJECT_OPFAMILY": - return 26; - case "OBJECT_PARAMETER_ACL": - return 27; - case "OBJECT_POLICY": - return 28; - case "OBJECT_PROCEDURE": - return 29; - case "OBJECT_PUBLICATION": - return 30; - case "OBJECT_PUBLICATION_NAMESPACE": - return 31; - case "OBJECT_PUBLICATION_REL": - return 32; - case "OBJECT_ROLE": - return 33; - case "OBJECT_ROUTINE": - return 34; - case "OBJECT_RULE": - return 35; - case "OBJECT_SCHEMA": - return 36; - case "OBJECT_SEQUENCE": - return 37; - case "OBJECT_SUBSCRIPTION": - return 38; - case "OBJECT_STATISTIC_EXT": - return 39; - case "OBJECT_TABCONSTRAINT": - return 40; - case "OBJECT_TABLE": - return 41; - case "OBJECT_TABLESPACE": - return 42; - case "OBJECT_TRANSFORM": - return 43; - case "OBJECT_TRIGGER": - return 44; - case "OBJECT_TSCONFIGURATION": - return 45; - case "OBJECT_TSDICTIONARY": - return 46; - case "OBJECT_TSPARSER": - return 47; - case "OBJECT_TSTEMPLATE": - return 48; - case "OBJECT_TYPE": - return 49; - case "OBJECT_USER_MAPPING": - return 50; - case "OBJECT_VIEW": - return 51; - default: - throw new Error("Key not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case "DROP_RESTRICT": - return 0; - case "DROP_CASCADE": - return 1; - default: - throw new Error("Key not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case "AT_AddColumn": - return 0; - case "AT_AddColumnToView": - return 1; - case "AT_ColumnDefault": - return 2; - case "AT_CookedColumnDefault": - return 3; - case "AT_DropNotNull": - return 4; - case "AT_SetNotNull": - return 5; - case "AT_DropExpression": - return 6; - case "AT_CheckNotNull": - return 7; - case "AT_SetStatistics": - return 8; - case "AT_SetOptions": - return 9; - case "AT_ResetOptions": - return 10; - case "AT_SetStorage": - return 11; - case "AT_SetCompression": - return 12; - case "AT_DropColumn": - return 13; - case "AT_AddIndex": - return 14; - case "AT_ReAddIndex": - return 15; - case "AT_AddConstraint": - return 16; - case "AT_ReAddConstraint": - return 17; - case "AT_ReAddDomainConstraint": - return 18; - case "AT_AlterConstraint": - return 19; - case "AT_ValidateConstraint": - return 20; - case "AT_AddIndexConstraint": - return 21; - case "AT_DropConstraint": - return 22; - case "AT_ReAddComment": - return 23; - case "AT_AlterColumnType": - return 24; - case "AT_AlterColumnGenericOptions": - return 25; - case "AT_ChangeOwner": - return 26; - case "AT_ClusterOn": - return 27; - case "AT_DropCluster": - return 28; - case "AT_SetLogged": - return 29; - case "AT_SetUnLogged": - return 30; - case "AT_DropOids": - return 31; - case "AT_SetAccessMethod": - return 32; - case "AT_SetTableSpace": - return 33; - case "AT_SetRelOptions": - return 34; - case "AT_ResetRelOptions": - return 35; - case "AT_ReplaceRelOptions": - return 36; - case "AT_EnableTrig": - return 37; - case "AT_EnableAlwaysTrig": - return 38; - case "AT_EnableReplicaTrig": - return 39; - case "AT_DisableTrig": - return 40; - case "AT_EnableTrigAll": - return 41; - case "AT_DisableTrigAll": - return 42; - case "AT_EnableTrigUser": - return 43; - case "AT_DisableTrigUser": - return 44; - case "AT_EnableRule": - return 45; - case "AT_EnableAlwaysRule": - return 46; - case "AT_EnableReplicaRule": - return 47; - case "AT_DisableRule": - return 48; - case "AT_AddInherit": - return 49; - case "AT_DropInherit": - return 50; - case "AT_AddOf": - return 51; - case "AT_DropOf": - return 52; - case "AT_ReplicaIdentity": - return 53; - case "AT_EnableRowSecurity": - return 54; - case "AT_DisableRowSecurity": - return 55; - case "AT_ForceRowSecurity": - return 56; - case "AT_NoForceRowSecurity": - return 57; - case "AT_GenericOptions": - return 58; - case "AT_AttachPartition": - return 59; - case "AT_DetachPartition": - return 60; - case "AT_DetachPartitionFinalize": - return 61; - case "AT_AddIdentity": - return 62; - case "AT_SetIdentity": - return 63; - case "AT_DropIdentity": - return 64; - case "AT_ReAddStatistics": - return 65; - default: - throw new Error("Key not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case "ACL_TARGET_OBJECT": - return 0; - case "ACL_TARGET_ALL_IN_SCHEMA": - return 1; - case "ACL_TARGET_DEFAULTS": - return 2; - default: - throw new Error("Key not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case "VAR_SET_VALUE": - return 0; - case "VAR_SET_DEFAULT": - return 1; - case "VAR_SET_CURRENT": - return 2; - case "VAR_SET_MULTI": - return 3; - case "VAR_RESET": - return 4; - case "VAR_RESET_ALL": - return 5; - default: - throw new Error("Key not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case "CONSTR_NULL": - return 0; - case "CONSTR_NOTNULL": - return 1; - case "CONSTR_DEFAULT": - return 2; - case "CONSTR_IDENTITY": - return 3; - case "CONSTR_GENERATED": - return 4; - case "CONSTR_CHECK": - return 5; - case "CONSTR_PRIMARY": - return 6; - case "CONSTR_UNIQUE": - return 7; - case "CONSTR_EXCLUSION": - return 8; - case "CONSTR_FOREIGN": - return 9; - case "CONSTR_ATTR_DEFERRABLE": - return 10; - case "CONSTR_ATTR_NOT_DEFERRABLE": - return 11; - case "CONSTR_ATTR_DEFERRED": - return 12; - case "CONSTR_ATTR_IMMEDIATE": - return 13; - default: - throw new Error("Key not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case "FDW_IMPORT_SCHEMA_ALL": - return 0; - case "FDW_IMPORT_SCHEMA_LIMIT_TO": - return 1; - case "FDW_IMPORT_SCHEMA_EXCEPT": - return 2; - default: - throw new Error("Key not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case "ROLESTMT_ROLE": - return 0; - case "ROLESTMT_USER": - return 1; - case "ROLESTMT_GROUP": - return 2; - default: - throw new Error("Key not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case "FETCH_FORWARD": - return 0; - case "FETCH_BACKWARD": - return 1; - case "FETCH_ABSOLUTE": - return 2; - case "FETCH_RELATIVE": - return 3; - default: - throw new Error("Key not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case "FUNC_PARAM_IN": - return 0; - case "FUNC_PARAM_OUT": - return 1; - case "FUNC_PARAM_INOUT": - return 2; - case "FUNC_PARAM_VARIADIC": - return 3; - case "FUNC_PARAM_TABLE": - return 4; - case "FUNC_PARAM_DEFAULT": - return 5; - default: - throw new Error("Key not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case "TRANS_STMT_BEGIN": - return 0; - case "TRANS_STMT_START": - return 1; - case "TRANS_STMT_COMMIT": - return 2; - case "TRANS_STMT_ROLLBACK": - return 3; - case "TRANS_STMT_SAVEPOINT": - return 4; - case "TRANS_STMT_RELEASE": - return 5; - case "TRANS_STMT_ROLLBACK_TO": - return 6; - case "TRANS_STMT_PREPARE": - return 7; - case "TRANS_STMT_COMMIT_PREPARED": - return 8; - case "TRANS_STMT_ROLLBACK_PREPARED": - return 9; - default: - throw new Error("Key not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case "NO_CHECK_OPTION": - return 0; - case "LOCAL_CHECK_OPTION": - return 1; - case "CASCADED_CHECK_OPTION": - return 2; - default: - throw new Error("Key not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case "DISCARD_ALL": - return 0; - case "DISCARD_PLANS": - return 1; - case "DISCARD_SEQUENCES": - return 2; - case "DISCARD_TEMP": - return 3; - default: - throw new Error("Key not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case "REINDEX_OBJECT_INDEX": - return 0; - case "REINDEX_OBJECT_TABLE": - return 1; - case "REINDEX_OBJECT_SCHEMA": - return 2; - case "REINDEX_OBJECT_SYSTEM": - return 3; - case "REINDEX_OBJECT_DATABASE": - return 4; - default: - throw new Error("Key not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case "ALTER_TSCONFIG_ADD_MAPPING": - return 0; - case "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN": - return 1; - case "ALTER_TSCONFIG_REPLACE_DICT": - return 2; - case "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN": - return 3; - case "ALTER_TSCONFIG_DROP_MAPPING": - return 4; - default: - throw new Error("Key not recognized in enum AlterTSConfigType"); - } - } - case "PublicationObjSpecType": - { - switch (key) { - case "PUBLICATIONOBJ_TABLE": - return 0; - case "PUBLICATIONOBJ_TABLES_IN_SCHEMA": - return 1; - case "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA": - return 2; - case "PUBLICATIONOBJ_CONTINUATION": - return 3; - default: - throw new Error("Key not recognized in enum PublicationObjSpecType"); - } - } - case "AlterPublicationAction": - { - switch (key) { - case "AP_AddObjects": - return 0; - case "AP_DropObjects": - return 1; - case "AP_SetObjects": - return 2; - default: - throw new Error("Key not recognized in enum AlterPublicationAction"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case "ALTER_SUBSCRIPTION_OPTIONS": - return 0; - case "ALTER_SUBSCRIPTION_CONNECTION": - return 1; - case "ALTER_SUBSCRIPTION_SET_PUBLICATION": - return 2; - case "ALTER_SUBSCRIPTION_ADD_PUBLICATION": - return 3; - case "ALTER_SUBSCRIPTION_DROP_PUBLICATION": - return 4; - case "ALTER_SUBSCRIPTION_REFRESH": - return 5; - case "ALTER_SUBSCRIPTION_ENABLED": - return 6; - case "ALTER_SUBSCRIPTION_SKIP": - return 7; - default: - throw new Error("Key not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case "ONCOMMIT_NOOP": - return 0; - case "ONCOMMIT_PRESERVE_ROWS": - return 1; - case "ONCOMMIT_DELETE_ROWS": - return 2; - case "ONCOMMIT_DROP": - return 3; - default: - throw new Error("Key not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case "PARAM_EXTERN": - return 0; - case "PARAM_EXEC": - return 1; - case "PARAM_SUBLINK": - return 2; - case "PARAM_MULTIEXPR": - return 3; - default: - throw new Error("Key not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case "COERCION_IMPLICIT": - return 0; - case "COERCION_ASSIGNMENT": - return 1; - case "COERCION_PLPGSQL": - return 2; - case "COERCION_EXPLICIT": - return 3; - default: - throw new Error("Key not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case "COERCE_EXPLICIT_CALL": - return 0; - case "COERCE_EXPLICIT_CAST": - return 1; - case "COERCE_IMPLICIT_CAST": - return 2; - case "COERCE_SQL_SYNTAX": - return 3; - default: - throw new Error("Key not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case "AND_EXPR": - return 0; - case "OR_EXPR": - return 1; - case "NOT_EXPR": - return 2; - default: - throw new Error("Key not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case "EXISTS_SUBLINK": - return 0; - case "ALL_SUBLINK": - return 1; - case "ANY_SUBLINK": - return 2; - case "ROWCOMPARE_SUBLINK": - return 3; - case "EXPR_SUBLINK": - return 4; - case "MULTIEXPR_SUBLINK": - return 5; - case "ARRAY_SUBLINK": - return 6; - case "CTE_SUBLINK": - return 7; - default: - throw new Error("Key not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case "ROWCOMPARE_LT": - return 0; - case "ROWCOMPARE_LE": - return 1; - case "ROWCOMPARE_EQ": - return 2; - case "ROWCOMPARE_GE": - return 3; - case "ROWCOMPARE_GT": - return 4; - case "ROWCOMPARE_NE": - return 5; - default: - throw new Error("Key not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case "IS_GREATEST": - return 0; - case "IS_LEAST": - return 1; - default: - throw new Error("Key not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case "SVFOP_CURRENT_DATE": - return 0; - case "SVFOP_CURRENT_TIME": - return 1; - case "SVFOP_CURRENT_TIME_N": - return 2; - case "SVFOP_CURRENT_TIMESTAMP": - return 3; - case "SVFOP_CURRENT_TIMESTAMP_N": - return 4; - case "SVFOP_LOCALTIME": - return 5; - case "SVFOP_LOCALTIME_N": - return 6; - case "SVFOP_LOCALTIMESTAMP": - return 7; - case "SVFOP_LOCALTIMESTAMP_N": - return 8; - case "SVFOP_CURRENT_ROLE": - return 9; - case "SVFOP_CURRENT_USER": - return 10; - case "SVFOP_USER": - return 11; - case "SVFOP_SESSION_USER": - return 12; - case "SVFOP_CURRENT_CATALOG": - return 13; - case "SVFOP_CURRENT_SCHEMA": - return 14; - default: - throw new Error("Key not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case "IS_XMLCONCAT": - return 0; - case "IS_XMLELEMENT": - return 1; - case "IS_XMLFOREST": - return 2; - case "IS_XMLPARSE": - return 3; - case "IS_XMLPI": - return 4; - case "IS_XMLROOT": - return 5; - case "IS_XMLSERIALIZE": - return 6; - case "IS_DOCUMENT": - return 7; - default: - throw new Error("Key not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case "XMLOPTION_DOCUMENT": - return 0; - case "XMLOPTION_CONTENT": - return 1; - default: - throw new Error("Key not recognized in enum XmlOptionType"); - } - } - case "JsonEncoding": - { - switch (key) { - case "JS_ENC_DEFAULT": - return 0; - case "JS_ENC_UTF8": - return 1; - case "JS_ENC_UTF16": - return 2; - case "JS_ENC_UTF32": - return 3; - default: - throw new Error("Key not recognized in enum JsonEncoding"); - } - } - case "JsonFormatType": - { - switch (key) { - case "JS_FORMAT_DEFAULT": - return 0; - case "JS_FORMAT_JSON": - return 1; - case "JS_FORMAT_JSONB": - return 2; - default: - throw new Error("Key not recognized in enum JsonFormatType"); - } - } - case "JsonConstructorType": - { - switch (key) { - case "JSCTOR_JSON_OBJECT": - return 0; - case "JSCTOR_JSON_ARRAY": - return 1; - case "JSCTOR_JSON_OBJECTAGG": - return 2; - case "JSCTOR_JSON_ARRAYAGG": - return 3; - default: - throw new Error("Key not recognized in enum JsonConstructorType"); - } - } - case "JsonValueType": - { - switch (key) { - case "JS_TYPE_ANY": - return 0; - case "JS_TYPE_OBJECT": - return 1; - case "JS_TYPE_ARRAY": - return 2; - case "JS_TYPE_SCALAR": - return 3; - default: - throw new Error("Key not recognized in enum JsonValueType"); - } - } - case "NullTestType": - { - switch (key) { - case "IS_NULL": - return 0; - case "IS_NOT_NULL": - return 1; - default: - throw new Error("Key not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case "IS_TRUE": - return 0; - case "IS_NOT_TRUE": - return 1; - case "IS_FALSE": - return 2; - case "IS_NOT_FALSE": - return 3; - case "IS_UNKNOWN": - return 4; - case "IS_NOT_UNKNOWN": - return 5; - default: - throw new Error("Key not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case "CMD_UNKNOWN": - return 0; - case "CMD_SELECT": - return 1; - case "CMD_UPDATE": - return 2; - case "CMD_INSERT": - return 3; - case "CMD_DELETE": - return 4; - case "CMD_MERGE": - return 5; - case "CMD_UTILITY": - return 6; - case "CMD_NOTHING": - return 7; - default: - throw new Error("Key not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case "JOIN_INNER": - return 0; - case "JOIN_LEFT": - return 1; - case "JOIN_FULL": - return 2; - case "JOIN_RIGHT": - return 3; - case "JOIN_SEMI": - return 4; - case "JOIN_ANTI": - return 5; - case "JOIN_RIGHT_ANTI": - return 6; - case "JOIN_UNIQUE_OUTER": - return 7; - case "JOIN_UNIQUE_INNER": - return 8; - default: - throw new Error("Key not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case "AGG_PLAIN": - return 0; - case "AGG_SORTED": - return 1; - case "AGG_HASHED": - return 2; - case "AGG_MIXED": - return 3; - default: - throw new Error("Key not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case "AGGSPLIT_SIMPLE": - return 0; - case "AGGSPLIT_INITIAL_SERIAL": - return 1; - case "AGGSPLIT_FINAL_DESERIAL": - return 2; - default: - throw new Error("Key not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case "SETOPCMD_INTERSECT": - return 0; - case "SETOPCMD_INTERSECT_ALL": - return 1; - case "SETOPCMD_EXCEPT": - return 2; - case "SETOPCMD_EXCEPT_ALL": - return 3; - default: - throw new Error("Key not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case "SETOP_SORTED": - return 0; - case "SETOP_HASHED": - return 1; - default: - throw new Error("Key not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case "ONCONFLICT_NONE": - return 0; - case "ONCONFLICT_NOTHING": - return 1; - case "ONCONFLICT_UPDATE": - return 2; - default: - throw new Error("Key not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case "LIMIT_OPTION_DEFAULT": - return 0; - case "LIMIT_OPTION_COUNT": - return 1; - case "LIMIT_OPTION_WITH_TIES": - return 2; - default: - throw new Error("Key not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case "LCS_NONE": - return 0; - case "LCS_FORKEYSHARE": - return 1; - case "LCS_FORSHARE": - return 2; - case "LCS_FORNOKEYUPDATE": - return 3; - case "LCS_FORUPDATE": - return 4; - default: - throw new Error("Key not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case "LockWaitBlock": - return 0; - case "LockWaitSkip": - return 1; - case "LockWaitError": - return 2; - default: - throw new Error("Key not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case "LockTupleKeyShare": - return 0; - case "LockTupleShare": - return 1; - case "LockTupleNoKeyExclusive": - return 2; - case "LockTupleExclusive": - return 3; - default: - throw new Error("Key not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case "NO_KEYWORD": - return 0; - case "UNRESERVED_KEYWORD": - return 1; - case "COL_NAME_KEYWORD": - return 2; - case "TYPE_FUNC_NAME_KEYWORD": - return 3; - case "RESERVED_KEYWORD": - return 4; - default: - throw new Error("Key not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case "NUL": - return 0; - case "ASCII_36": - return 36; - case "ASCII_37": - return 37; - case "ASCII_40": - return 40; - case "ASCII_41": - return 41; - case "ASCII_42": - return 42; - case "ASCII_43": - return 43; - case "ASCII_44": - return 44; - case "ASCII_45": - return 45; - case "ASCII_46": - return 46; - case "ASCII_47": - return 47; - case "ASCII_58": - return 58; - case "ASCII_59": - return 59; - case "ASCII_60": - return 60; - case "ASCII_61": - return 61; - case "ASCII_62": - return 62; - case "ASCII_63": - return 63; - case "ASCII_91": - return 91; - case "ASCII_92": - return 92; - case "ASCII_93": - return 93; - case "ASCII_94": - return 94; - case "IDENT": - return 258; - case "UIDENT": - return 259; - case "FCONST": - return 260; - case "SCONST": - return 261; - case "USCONST": - return 262; - case "BCONST": - return 263; - case "XCONST": - return 264; - case "Op": - return 265; - case "ICONST": - return 266; - case "PARAM": - return 267; - case "TYPECAST": - return 268; - case "DOT_DOT": - return 269; - case "COLON_EQUALS": - return 270; - case "EQUALS_GREATER": - return 271; - case "LESS_EQUALS": - return 272; - case "GREATER_EQUALS": - return 273; - case "NOT_EQUALS": - return 274; - case "SQL_COMMENT": - return 275; - case "C_COMMENT": - return 276; - case "ABORT_P": - return 277; - case "ABSENT": - return 278; - case "ABSOLUTE_P": - return 279; - case "ACCESS": - return 280; - case "ACTION": - return 281; - case "ADD_P": - return 282; - case "ADMIN": - return 283; - case "AFTER": - return 284; - case "AGGREGATE": - return 285; - case "ALL": - return 286; - case "ALSO": - return 287; - case "ALTER": - return 288; - case "ALWAYS": - return 289; - case "ANALYSE": - return 290; - case "ANALYZE": - return 291; - case "AND": - return 292; - case "ANY": - return 293; - case "ARRAY": - return 294; - case "AS": - return 295; - case "ASC": - return 296; - case "ASENSITIVE": - return 297; - case "ASSERTION": - return 298; - case "ASSIGNMENT": - return 299; - case "ASYMMETRIC": - return 300; - case "ATOMIC": - return 301; - case "AT": - return 302; - case "ATTACH": - return 303; - case "ATTRIBUTE": - return 304; - case "AUTHORIZATION": - return 305; - case "BACKWARD": - return 306; - case "BEFORE": - return 307; - case "BEGIN_P": - return 308; - case "BETWEEN": - return 309; - case "BIGINT": - return 310; - case "BINARY": - return 311; - case "BIT": - return 312; - case "BOOLEAN_P": - return 313; - case "BOTH": - return 314; - case "BREADTH": - return 315; - case "BY": - return 316; - case "CACHE": - return 317; - case "CALL": - return 318; - case "CALLED": - return 319; - case "CASCADE": - return 320; - case "CASCADED": - return 321; - case "CASE": - return 322; - case "CAST": - return 323; - case "CATALOG_P": - return 324; - case "CHAIN": - return 325; - case "CHAR_P": - return 326; - case "CHARACTER": - return 327; - case "CHARACTERISTICS": - return 328; - case "CHECK": - return 329; - case "CHECKPOINT": - return 330; - case "CLASS": - return 331; - case "CLOSE": - return 332; - case "CLUSTER": - return 333; - case "COALESCE": - return 334; - case "COLLATE": - return 335; - case "COLLATION": - return 336; - case "COLUMN": - return 337; - case "COLUMNS": - return 338; - case "COMMENT": - return 339; - case "COMMENTS": - return 340; - case "COMMIT": - return 341; - case "COMMITTED": - return 342; - case "COMPRESSION": - return 343; - case "CONCURRENTLY": - return 344; - case "CONFIGURATION": - return 345; - case "CONFLICT": - return 346; - case "CONNECTION": - return 347; - case "CONSTRAINT": - return 348; - case "CONSTRAINTS": - return 349; - case "CONTENT_P": - return 350; - case "CONTINUE_P": - return 351; - case "CONVERSION_P": - return 352; - case "COPY": - return 353; - case "COST": - return 354; - case "CREATE": - return 355; - case "CROSS": - return 356; - case "CSV": - return 357; - case "CUBE": - return 358; - case "CURRENT_P": - return 359; - case "CURRENT_CATALOG": - return 360; - case "CURRENT_DATE": - return 361; - case "CURRENT_ROLE": - return 362; - case "CURRENT_SCHEMA": - return 363; - case "CURRENT_TIME": - return 364; - case "CURRENT_TIMESTAMP": - return 365; - case "CURRENT_USER": - return 366; - case "CURSOR": - return 367; - case "CYCLE": - return 368; - case "DATA_P": - return 369; - case "DATABASE": - return 370; - case "DAY_P": - return 371; - case "DEALLOCATE": - return 372; - case "DEC": - return 373; - case "DECIMAL_P": - return 374; - case "DECLARE": - return 375; - case "DEFAULT": - return 376; - case "DEFAULTS": - return 377; - case "DEFERRABLE": - return 378; - case "DEFERRED": - return 379; - case "DEFINER": - return 380; - case "DELETE_P": - return 381; - case "DELIMITER": - return 382; - case "DELIMITERS": - return 383; - case "DEPENDS": - return 384; - case "DEPTH": - return 385; - case "DESC": - return 386; - case "DETACH": - return 387; - case "DICTIONARY": - return 388; - case "DISABLE_P": - return 389; - case "DISCARD": - return 390; - case "DISTINCT": - return 391; - case "DO": - return 392; - case "DOCUMENT_P": - return 393; - case "DOMAIN_P": - return 394; - case "DOUBLE_P": - return 395; - case "DROP": - return 396; - case "EACH": - return 397; - case "ELSE": - return 398; - case "ENABLE_P": - return 399; - case "ENCODING": - return 400; - case "ENCRYPTED": - return 401; - case "END_P": - return 402; - case "ENUM_P": - return 403; - case "ESCAPE": - return 404; - case "EVENT": - return 405; - case "EXCEPT": - return 406; - case "EXCLUDE": - return 407; - case "EXCLUDING": - return 408; - case "EXCLUSIVE": - return 409; - case "EXECUTE": - return 410; - case "EXISTS": - return 411; - case "EXPLAIN": - return 412; - case "EXPRESSION": - return 413; - case "EXTENSION": - return 414; - case "EXTERNAL": - return 415; - case "EXTRACT": - return 416; - case "FALSE_P": - return 417; - case "FAMILY": - return 418; - case "FETCH": - return 419; - case "FILTER": - return 420; - case "FINALIZE": - return 421; - case "FIRST_P": - return 422; - case "FLOAT_P": - return 423; - case "FOLLOWING": - return 424; - case "FOR": - return 425; - case "FORCE": - return 426; - case "FOREIGN": - return 427; - case "FORMAT": - return 428; - case "FORWARD": - return 429; - case "FREEZE": - return 430; - case "FROM": - return 431; - case "FULL": - return 432; - case "FUNCTION": - return 433; - case "FUNCTIONS": - return 434; - case "GENERATED": - return 435; - case "GLOBAL": - return 436; - case "GRANT": - return 437; - case "GRANTED": - return 438; - case "GREATEST": - return 439; - case "GROUP_P": - return 440; - case "GROUPING": - return 441; - case "GROUPS": - return 442; - case "HANDLER": - return 443; - case "HAVING": - return 444; - case "HEADER_P": - return 445; - case "HOLD": - return 446; - case "HOUR_P": - return 447; - case "IDENTITY_P": - return 448; - case "IF_P": - return 449; - case "ILIKE": - return 450; - case "IMMEDIATE": - return 451; - case "IMMUTABLE": - return 452; - case "IMPLICIT_P": - return 453; - case "IMPORT_P": - return 454; - case "IN_P": - return 455; - case "INCLUDE": - return 456; - case "INCLUDING": - return 457; - case "INCREMENT": - return 458; - case "INDENT": - return 459; - case "INDEX": - return 460; - case "INDEXES": - return 461; - case "INHERIT": - return 462; - case "INHERITS": - return 463; - case "INITIALLY": - return 464; - case "INLINE_P": - return 465; - case "INNER_P": - return 466; - case "INOUT": - return 467; - case "INPUT_P": - return 468; - case "INSENSITIVE": - return 469; - case "INSERT": - return 470; - case "INSTEAD": - return 471; - case "INT_P": - return 472; - case "INTEGER": - return 473; - case "INTERSECT": - return 474; - case "INTERVAL": - return 475; - case "INTO": - return 476; - case "INVOKER": - return 477; - case "IS": - return 478; - case "ISNULL": - return 479; - case "ISOLATION": - return 480; - case "JOIN": - return 481; - case "JSON": - return 482; - case "JSON_ARRAY": - return 483; - case "JSON_ARRAYAGG": - return 484; - case "JSON_OBJECT": - return 485; - case "JSON_OBJECTAGG": - return 486; - case "KEY": - return 487; - case "KEYS": - return 488; - case "LABEL": - return 489; - case "LANGUAGE": - return 490; - case "LARGE_P": - return 491; - case "LAST_P": - return 492; - case "LATERAL_P": - return 493; - case "LEADING": - return 494; - case "LEAKPROOF": - return 495; - case "LEAST": - return 496; - case "LEFT": - return 497; - case "LEVEL": - return 498; - case "LIKE": - return 499; - case "LIMIT": - return 500; - case "LISTEN": - return 501; - case "LOAD": - return 502; - case "LOCAL": - return 503; - case "LOCALTIME": - return 504; - case "LOCALTIMESTAMP": - return 505; - case "LOCATION": - return 506; - case "LOCK_P": - return 507; - case "LOCKED": - return 508; - case "LOGGED": - return 509; - case "MAPPING": - return 510; - case "MATCH": - return 511; - case "MATCHED": - return 512; - case "MATERIALIZED": - return 513; - case "MAXVALUE": - return 514; - case "MERGE": - return 515; - case "METHOD": - return 516; - case "MINUTE_P": - return 517; - case "MINVALUE": - return 518; - case "MODE": - return 519; - case "MONTH_P": - return 520; - case "MOVE": - return 521; - case "NAME_P": - return 522; - case "NAMES": - return 523; - case "NATIONAL": - return 524; - case "NATURAL": - return 525; - case "NCHAR": - return 526; - case "NEW": - return 527; - case "NEXT": - return 528; - case "NFC": - return 529; - case "NFD": - return 530; - case "NFKC": - return 531; - case "NFKD": - return 532; - case "NO": - return 533; - case "NONE": - return 534; - case "NORMALIZE": - return 535; - case "NORMALIZED": - return 536; - case "NOT": - return 537; - case "NOTHING": - return 538; - case "NOTIFY": - return 539; - case "NOTNULL": - return 540; - case "NOWAIT": - return 541; - case "NULL_P": - return 542; - case "NULLIF": - return 543; - case "NULLS_P": - return 544; - case "NUMERIC": - return 545; - case "OBJECT_P": - return 546; - case "OF": - return 547; - case "OFF": - return 548; - case "OFFSET": - return 549; - case "OIDS": - return 550; - case "OLD": - return 551; - case "ON": - return 552; - case "ONLY": - return 553; - case "OPERATOR": - return 554; - case "OPTION": - return 555; - case "OPTIONS": - return 556; - case "OR": - return 557; - case "ORDER": - return 558; - case "ORDINALITY": - return 559; - case "OTHERS": - return 560; - case "OUT_P": - return 561; - case "OUTER_P": - return 562; - case "OVER": - return 563; - case "OVERLAPS": - return 564; - case "OVERLAY": - return 565; - case "OVERRIDING": - return 566; - case "OWNED": - return 567; - case "OWNER": - return 568; - case "PARALLEL": - return 569; - case "PARAMETER": - return 570; - case "PARSER": - return 571; - case "PARTIAL": - return 572; - case "PARTITION": - return 573; - case "PASSING": - return 574; - case "PASSWORD": - return 575; - case "PLACING": - return 576; - case "PLANS": - return 577; - case "POLICY": - return 578; - case "POSITION": - return 579; - case "PRECEDING": - return 580; - case "PRECISION": - return 581; - case "PRESERVE": - return 582; - case "PREPARE": - return 583; - case "PREPARED": - return 584; - case "PRIMARY": - return 585; - case "PRIOR": - return 586; - case "PRIVILEGES": - return 587; - case "PROCEDURAL": - return 588; - case "PROCEDURE": - return 589; - case "PROCEDURES": - return 590; - case "PROGRAM": - return 591; - case "PUBLICATION": - return 592; - case "QUOTE": - return 593; - case "RANGE": - return 594; - case "READ": - return 595; - case "REAL": - return 596; - case "REASSIGN": - return 597; - case "RECHECK": - return 598; - case "RECURSIVE": - return 599; - case "REF_P": - return 600; - case "REFERENCES": - return 601; - case "REFERENCING": - return 602; - case "REFRESH": - return 603; - case "REINDEX": - return 604; - case "RELATIVE_P": - return 605; - case "RELEASE": - return 606; - case "RENAME": - return 607; - case "REPEATABLE": - return 608; - case "REPLACE": - return 609; - case "REPLICA": - return 610; - case "RESET": - return 611; - case "RESTART": - return 612; - case "RESTRICT": - return 613; - case "RETURN": - return 614; - case "RETURNING": - return 615; - case "RETURNS": - return 616; - case "REVOKE": - return 617; - case "RIGHT": - return 618; - case "ROLE": - return 619; - case "ROLLBACK": - return 620; - case "ROLLUP": - return 621; - case "ROUTINE": - return 622; - case "ROUTINES": - return 623; - case "ROW": - return 624; - case "ROWS": - return 625; - case "RULE": - return 626; - case "SAVEPOINT": - return 627; - case "SCALAR": - return 628; - case "SCHEMA": - return 629; - case "SCHEMAS": - return 630; - case "SCROLL": - return 631; - case "SEARCH": - return 632; - case "SECOND_P": - return 633; - case "SECURITY": - return 634; - case "SELECT": - return 635; - case "SEQUENCE": - return 636; - case "SEQUENCES": - return 637; - case "SERIALIZABLE": - return 638; - case "SERVER": - return 639; - case "SESSION": - return 640; - case "SESSION_USER": - return 641; - case "SET": - return 642; - case "SETS": - return 643; - case "SETOF": - return 644; - case "SHARE": - return 645; - case "SHOW": - return 646; - case "SIMILAR": - return 647; - case "SIMPLE": - return 648; - case "SKIP": - return 649; - case "SMALLINT": - return 650; - case "SNAPSHOT": - return 651; - case "SOME": - return 652; - case "SQL_P": - return 653; - case "STABLE": - return 654; - case "STANDALONE_P": - return 655; - case "START": - return 656; - case "STATEMENT": - return 657; - case "STATISTICS": - return 658; - case "STDIN": - return 659; - case "STDOUT": - return 660; - case "STORAGE": - return 661; - case "STORED": - return 662; - case "STRICT_P": - return 663; - case "STRIP_P": - return 664; - case "SUBSCRIPTION": - return 665; - case "SUBSTRING": - return 666; - case "SUPPORT": - return 667; - case "SYMMETRIC": - return 668; - case "SYSID": - return 669; - case "SYSTEM_P": - return 670; - case "SYSTEM_USER": - return 671; - case "TABLE": - return 672; - case "TABLES": - return 673; - case "TABLESAMPLE": - return 674; - case "TABLESPACE": - return 675; - case "TEMP": - return 676; - case "TEMPLATE": - return 677; - case "TEMPORARY": - return 678; - case "TEXT_P": - return 679; - case "THEN": - return 680; - case "TIES": - return 681; - case "TIME": - return 682; - case "TIMESTAMP": - return 683; - case "TO": - return 684; - case "TRAILING": - return 685; - case "TRANSACTION": - return 686; - case "TRANSFORM": - return 687; - case "TREAT": - return 688; - case "TRIGGER": - return 689; - case "TRIM": - return 690; - case "TRUE_P": - return 691; - case "TRUNCATE": - return 692; - case "TRUSTED": - return 693; - case "TYPE_P": - return 694; - case "TYPES_P": - return 695; - case "UESCAPE": - return 696; - case "UNBOUNDED": - return 697; - case "UNCOMMITTED": - return 698; - case "UNENCRYPTED": - return 699; - case "UNION": - return 700; - case "UNIQUE": - return 701; - case "UNKNOWN": - return 702; - case "UNLISTEN": - return 703; - case "UNLOGGED": - return 704; - case "UNTIL": - return 705; - case "UPDATE": - return 706; - case "USER": - return 707; - case "USING": - return 708; - case "VACUUM": - return 709; - case "VALID": - return 710; - case "VALIDATE": - return 711; - case "VALIDATOR": - return 712; - case "VALUE_P": - return 713; - case "VALUES": - return 714; - case "VARCHAR": - return 715; - case "VARIADIC": - return 716; - case "VARYING": - return 717; - case "VERBOSE": - return 718; - case "VERSION_P": - return 719; - case "VIEW": - return 720; - case "VIEWS": - return 721; - case "VOLATILE": - return 722; - case "WHEN": - return 723; - case "WHERE": - return 724; - case "WHITESPACE_P": - return 725; - case "WINDOW": - return 726; - case "WITH": - return 727; - case "WITHIN": - return 728; - case "WITHOUT": - return 729; - case "WORK": - return 730; - case "WRAPPER": - return 731; - case "WRITE": - return 732; - case "XML_P": - return 733; - case "XMLATTRIBUTES": - return 734; - case "XMLCONCAT": - return 735; - case "XMLELEMENT": - return 736; - case "XMLEXISTS": - return 737; - case "XMLFOREST": - return 738; - case "XMLNAMESPACES": - return 739; - case "XMLPARSE": - return 740; - case "XMLPI": - return 741; - case "XMLROOT": - return 742; - case "XMLSERIALIZE": - return 743; - case "XMLTABLE": - return 744; - case "YEAR_P": - return 745; - case "YES_P": - return 746; - case "ZONE": - return 747; - case "FORMAT_LA": - return 748; - case "NOT_LA": - return 749; - case "NULLS_LA": - return 750; - case "WITH_LA": - return 751; - case "WITHOUT_LA": - return 752; - case "MODE_TYPE_NAME": - return 753; - case "MODE_PLPGSQL_EXPR": - return 754; - case "MODE_PLPGSQL_ASSIGN1": - return 755; - case "MODE_PLPGSQL_ASSIGN2": - return 756; - case "MODE_PLPGSQL_ASSIGN3": - return 757; - case "UMINUS": - return 758; - default: - throw new Error("Key not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/16/enum-to-str.ts b/packages/transform/src/16/enum-to-str.ts deleted file mode 100644 index 577e4c74..00000000 --- a/packages/transform/src/16/enum-to-str.ts +++ /dev/null @@ -1,2346 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "OverridingKind" | "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionStrategy" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "PublicationObjSpecType" | "AlterPublicationAction" | "AlterSubscriptionType" | "OnCommitAction" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "JsonEncoding" | "JsonFormatType" | "JsonConstructorType" | "JsonValueType" | "NullTestType" | "BoolTestType" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumString = (enumType: EnumType, key: number): string => { - switch (enumType) { - case "OverridingKind": - { - switch (key) { - case 0: - return "OVERRIDING_NOT_SET"; - case 1: - return "OVERRIDING_USER_VALUE"; - case 2: - return "OVERRIDING_SYSTEM_VALUE"; - default: - throw new Error("Value not recognized in enum OverridingKind"); - } - } - case "QuerySource": - { - switch (key) { - case 0: - return "QSRC_ORIGINAL"; - case 1: - return "QSRC_PARSER"; - case 2: - return "QSRC_INSTEAD_RULE"; - case 3: - return "QSRC_QUAL_INSTEAD_RULE"; - case 4: - return "QSRC_NON_INSTEAD_RULE"; - default: - throw new Error("Value not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case 0: - return "SORTBY_DEFAULT"; - case 1: - return "SORTBY_ASC"; - case 2: - return "SORTBY_DESC"; - case 3: - return "SORTBY_USING"; - default: - throw new Error("Value not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case 0: - return "SORTBY_NULLS_DEFAULT"; - case 1: - return "SORTBY_NULLS_FIRST"; - case 2: - return "SORTBY_NULLS_LAST"; - default: - throw new Error("Value not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case 0: - return "SET_QUANTIFIER_DEFAULT"; - case 1: - return "SET_QUANTIFIER_ALL"; - case 2: - return "SET_QUANTIFIER_DISTINCT"; - default: - throw new Error("Value not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case 0: - return "AEXPR_OP"; - case 1: - return "AEXPR_OP_ANY"; - case 2: - return "AEXPR_OP_ALL"; - case 3: - return "AEXPR_DISTINCT"; - case 4: - return "AEXPR_NOT_DISTINCT"; - case 5: - return "AEXPR_NULLIF"; - case 6: - return "AEXPR_IN"; - case 7: - return "AEXPR_LIKE"; - case 8: - return "AEXPR_ILIKE"; - case 9: - return "AEXPR_SIMILAR"; - case 10: - return "AEXPR_BETWEEN"; - case 11: - return "AEXPR_NOT_BETWEEN"; - case 12: - return "AEXPR_BETWEEN_SYM"; - case 13: - return "AEXPR_NOT_BETWEEN_SYM"; - default: - throw new Error("Value not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case 0: - return "ROLESPEC_CSTRING"; - case 1: - return "ROLESPEC_CURRENT_ROLE"; - case 2: - return "ROLESPEC_CURRENT_USER"; - case 3: - return "ROLESPEC_SESSION_USER"; - case 4: - return "ROLESPEC_PUBLIC"; - default: - throw new Error("Value not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case 0: - return "CREATE_TABLE_LIKE_COMMENTS"; - case 1: - return "CREATE_TABLE_LIKE_COMPRESSION"; - case 2: - return "CREATE_TABLE_LIKE_CONSTRAINTS"; - case 3: - return "CREATE_TABLE_LIKE_DEFAULTS"; - case 4: - return "CREATE_TABLE_LIKE_GENERATED"; - case 5: - return "CREATE_TABLE_LIKE_IDENTITY"; - case 6: - return "CREATE_TABLE_LIKE_INDEXES"; - case 7: - return "CREATE_TABLE_LIKE_STATISTICS"; - case 8: - return "CREATE_TABLE_LIKE_STORAGE"; - case 9: - return "CREATE_TABLE_LIKE_ALL"; - default: - throw new Error("Value not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case 0: - return "DEFELEM_UNSPEC"; - case 1: - return "DEFELEM_SET"; - case 2: - return "DEFELEM_ADD"; - case 3: - return "DEFELEM_DROP"; - default: - throw new Error("Value not recognized in enum DefElemAction"); - } - } - case "PartitionStrategy": - { - switch (key) { - case 0: - return "PARTITION_STRATEGY_LIST"; - case 1: - return "PARTITION_STRATEGY_RANGE"; - case 2: - return "PARTITION_STRATEGY_HASH"; - default: - throw new Error("Value not recognized in enum PartitionStrategy"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case 0: - return "PARTITION_RANGE_DATUM_MINVALUE"; - case 1: - return "PARTITION_RANGE_DATUM_VALUE"; - case 2: - return "PARTITION_RANGE_DATUM_MAXVALUE"; - default: - throw new Error("Value not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case 0: - return "RTE_RELATION"; - case 1: - return "RTE_SUBQUERY"; - case 2: - return "RTE_JOIN"; - case 3: - return "RTE_FUNCTION"; - case 4: - return "RTE_TABLEFUNC"; - case 5: - return "RTE_VALUES"; - case 6: - return "RTE_CTE"; - case 7: - return "RTE_NAMEDTUPLESTORE"; - case 8: - return "RTE_RESULT"; - default: - throw new Error("Value not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case 0: - return "WCO_VIEW_CHECK"; - case 1: - return "WCO_RLS_INSERT_CHECK"; - case 2: - return "WCO_RLS_UPDATE_CHECK"; - case 3: - return "WCO_RLS_CONFLICT_CHECK"; - case 4: - return "WCO_RLS_MERGE_UPDATE_CHECK"; - case 5: - return "WCO_RLS_MERGE_DELETE_CHECK"; - default: - throw new Error("Value not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case 0: - return "GROUPING_SET_EMPTY"; - case 1: - return "GROUPING_SET_SIMPLE"; - case 2: - return "GROUPING_SET_ROLLUP"; - case 3: - return "GROUPING_SET_CUBE"; - case 4: - return "GROUPING_SET_SETS"; - default: - throw new Error("Value not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case 0: - return "CTEMaterializeDefault"; - case 1: - return "CTEMaterializeAlways"; - case 2: - return "CTEMaterializeNever"; - default: - throw new Error("Value not recognized in enum CTEMaterialize"); - } - } - case "SetOperation": - { - switch (key) { - case 0: - return "SETOP_NONE"; - case 1: - return "SETOP_UNION"; - case 2: - return "SETOP_INTERSECT"; - case 3: - return "SETOP_EXCEPT"; - default: - throw new Error("Value not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case 0: - return "OBJECT_ACCESS_METHOD"; - case 1: - return "OBJECT_AGGREGATE"; - case 2: - return "OBJECT_AMOP"; - case 3: - return "OBJECT_AMPROC"; - case 4: - return "OBJECT_ATTRIBUTE"; - case 5: - return "OBJECT_CAST"; - case 6: - return "OBJECT_COLUMN"; - case 7: - return "OBJECT_COLLATION"; - case 8: - return "OBJECT_CONVERSION"; - case 9: - return "OBJECT_DATABASE"; - case 10: - return "OBJECT_DEFAULT"; - case 11: - return "OBJECT_DEFACL"; - case 12: - return "OBJECT_DOMAIN"; - case 13: - return "OBJECT_DOMCONSTRAINT"; - case 14: - return "OBJECT_EVENT_TRIGGER"; - case 15: - return "OBJECT_EXTENSION"; - case 16: - return "OBJECT_FDW"; - case 17: - return "OBJECT_FOREIGN_SERVER"; - case 18: - return "OBJECT_FOREIGN_TABLE"; - case 19: - return "OBJECT_FUNCTION"; - case 20: - return "OBJECT_INDEX"; - case 21: - return "OBJECT_LANGUAGE"; - case 22: - return "OBJECT_LARGEOBJECT"; - case 23: - return "OBJECT_MATVIEW"; - case 24: - return "OBJECT_OPCLASS"; - case 25: - return "OBJECT_OPERATOR"; - case 26: - return "OBJECT_OPFAMILY"; - case 27: - return "OBJECT_PARAMETER_ACL"; - case 28: - return "OBJECT_POLICY"; - case 29: - return "OBJECT_PROCEDURE"; - case 30: - return "OBJECT_PUBLICATION"; - case 31: - return "OBJECT_PUBLICATION_NAMESPACE"; - case 32: - return "OBJECT_PUBLICATION_REL"; - case 33: - return "OBJECT_ROLE"; - case 34: - return "OBJECT_ROUTINE"; - case 35: - return "OBJECT_RULE"; - case 36: - return "OBJECT_SCHEMA"; - case 37: - return "OBJECT_SEQUENCE"; - case 38: - return "OBJECT_SUBSCRIPTION"; - case 39: - return "OBJECT_STATISTIC_EXT"; - case 40: - return "OBJECT_TABCONSTRAINT"; - case 41: - return "OBJECT_TABLE"; - case 42: - return "OBJECT_TABLESPACE"; - case 43: - return "OBJECT_TRANSFORM"; - case 44: - return "OBJECT_TRIGGER"; - case 45: - return "OBJECT_TSCONFIGURATION"; - case 46: - return "OBJECT_TSDICTIONARY"; - case 47: - return "OBJECT_TSPARSER"; - case 48: - return "OBJECT_TSTEMPLATE"; - case 49: - return "OBJECT_TYPE"; - case 50: - return "OBJECT_USER_MAPPING"; - case 51: - return "OBJECT_VIEW"; - default: - throw new Error("Value not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case 0: - return "DROP_RESTRICT"; - case 1: - return "DROP_CASCADE"; - default: - throw new Error("Value not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case 0: - return "AT_AddColumn"; - case 1: - return "AT_AddColumnToView"; - case 2: - return "AT_ColumnDefault"; - case 3: - return "AT_CookedColumnDefault"; - case 4: - return "AT_DropNotNull"; - case 5: - return "AT_SetNotNull"; - case 6: - return "AT_DropExpression"; - case 7: - return "AT_CheckNotNull"; - case 8: - return "AT_SetStatistics"; - case 9: - return "AT_SetOptions"; - case 10: - return "AT_ResetOptions"; - case 11: - return "AT_SetStorage"; - case 12: - return "AT_SetCompression"; - case 13: - return "AT_DropColumn"; - case 14: - return "AT_AddIndex"; - case 15: - return "AT_ReAddIndex"; - case 16: - return "AT_AddConstraint"; - case 17: - return "AT_ReAddConstraint"; - case 18: - return "AT_ReAddDomainConstraint"; - case 19: - return "AT_AlterConstraint"; - case 20: - return "AT_ValidateConstraint"; - case 21: - return "AT_AddIndexConstraint"; - case 22: - return "AT_DropConstraint"; - case 23: - return "AT_ReAddComment"; - case 24: - return "AT_AlterColumnType"; - case 25: - return "AT_AlterColumnGenericOptions"; - case 26: - return "AT_ChangeOwner"; - case 27: - return "AT_ClusterOn"; - case 28: - return "AT_DropCluster"; - case 29: - return "AT_SetLogged"; - case 30: - return "AT_SetUnLogged"; - case 31: - return "AT_DropOids"; - case 32: - return "AT_SetAccessMethod"; - case 33: - return "AT_SetTableSpace"; - case 34: - return "AT_SetRelOptions"; - case 35: - return "AT_ResetRelOptions"; - case 36: - return "AT_ReplaceRelOptions"; - case 37: - return "AT_EnableTrig"; - case 38: - return "AT_EnableAlwaysTrig"; - case 39: - return "AT_EnableReplicaTrig"; - case 40: - return "AT_DisableTrig"; - case 41: - return "AT_EnableTrigAll"; - case 42: - return "AT_DisableTrigAll"; - case 43: - return "AT_EnableTrigUser"; - case 44: - return "AT_DisableTrigUser"; - case 45: - return "AT_EnableRule"; - case 46: - return "AT_EnableAlwaysRule"; - case 47: - return "AT_EnableReplicaRule"; - case 48: - return "AT_DisableRule"; - case 49: - return "AT_AddInherit"; - case 50: - return "AT_DropInherit"; - case 51: - return "AT_AddOf"; - case 52: - return "AT_DropOf"; - case 53: - return "AT_ReplicaIdentity"; - case 54: - return "AT_EnableRowSecurity"; - case 55: - return "AT_DisableRowSecurity"; - case 56: - return "AT_ForceRowSecurity"; - case 57: - return "AT_NoForceRowSecurity"; - case 58: - return "AT_GenericOptions"; - case 59: - return "AT_AttachPartition"; - case 60: - return "AT_DetachPartition"; - case 61: - return "AT_DetachPartitionFinalize"; - case 62: - return "AT_AddIdentity"; - case 63: - return "AT_SetIdentity"; - case 64: - return "AT_DropIdentity"; - case 65: - return "AT_ReAddStatistics"; - default: - throw new Error("Value not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case 0: - return "ACL_TARGET_OBJECT"; - case 1: - return "ACL_TARGET_ALL_IN_SCHEMA"; - case 2: - return "ACL_TARGET_DEFAULTS"; - default: - throw new Error("Value not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case 0: - return "VAR_SET_VALUE"; - case 1: - return "VAR_SET_DEFAULT"; - case 2: - return "VAR_SET_CURRENT"; - case 3: - return "VAR_SET_MULTI"; - case 4: - return "VAR_RESET"; - case 5: - return "VAR_RESET_ALL"; - default: - throw new Error("Value not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case 0: - return "CONSTR_NULL"; - case 1: - return "CONSTR_NOTNULL"; - case 2: - return "CONSTR_DEFAULT"; - case 3: - return "CONSTR_IDENTITY"; - case 4: - return "CONSTR_GENERATED"; - case 5: - return "CONSTR_CHECK"; - case 6: - return "CONSTR_PRIMARY"; - case 7: - return "CONSTR_UNIQUE"; - case 8: - return "CONSTR_EXCLUSION"; - case 9: - return "CONSTR_FOREIGN"; - case 10: - return "CONSTR_ATTR_DEFERRABLE"; - case 11: - return "CONSTR_ATTR_NOT_DEFERRABLE"; - case 12: - return "CONSTR_ATTR_DEFERRED"; - case 13: - return "CONSTR_ATTR_IMMEDIATE"; - default: - throw new Error("Value not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case 0: - return "FDW_IMPORT_SCHEMA_ALL"; - case 1: - return "FDW_IMPORT_SCHEMA_LIMIT_TO"; - case 2: - return "FDW_IMPORT_SCHEMA_EXCEPT"; - default: - throw new Error("Value not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case 0: - return "ROLESTMT_ROLE"; - case 1: - return "ROLESTMT_USER"; - case 2: - return "ROLESTMT_GROUP"; - default: - throw new Error("Value not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case 0: - return "FETCH_FORWARD"; - case 1: - return "FETCH_BACKWARD"; - case 2: - return "FETCH_ABSOLUTE"; - case 3: - return "FETCH_RELATIVE"; - default: - throw new Error("Value not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case 0: - return "FUNC_PARAM_IN"; - case 1: - return "FUNC_PARAM_OUT"; - case 2: - return "FUNC_PARAM_INOUT"; - case 3: - return "FUNC_PARAM_VARIADIC"; - case 4: - return "FUNC_PARAM_TABLE"; - case 5: - return "FUNC_PARAM_DEFAULT"; - default: - throw new Error("Value not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case 0: - return "TRANS_STMT_BEGIN"; - case 1: - return "TRANS_STMT_START"; - case 2: - return "TRANS_STMT_COMMIT"; - case 3: - return "TRANS_STMT_ROLLBACK"; - case 4: - return "TRANS_STMT_SAVEPOINT"; - case 5: - return "TRANS_STMT_RELEASE"; - case 6: - return "TRANS_STMT_ROLLBACK_TO"; - case 7: - return "TRANS_STMT_PREPARE"; - case 8: - return "TRANS_STMT_COMMIT_PREPARED"; - case 9: - return "TRANS_STMT_ROLLBACK_PREPARED"; - default: - throw new Error("Value not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case 0: - return "NO_CHECK_OPTION"; - case 1: - return "LOCAL_CHECK_OPTION"; - case 2: - return "CASCADED_CHECK_OPTION"; - default: - throw new Error("Value not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case 0: - return "DISCARD_ALL"; - case 1: - return "DISCARD_PLANS"; - case 2: - return "DISCARD_SEQUENCES"; - case 3: - return "DISCARD_TEMP"; - default: - throw new Error("Value not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case 0: - return "REINDEX_OBJECT_INDEX"; - case 1: - return "REINDEX_OBJECT_TABLE"; - case 2: - return "REINDEX_OBJECT_SCHEMA"; - case 3: - return "REINDEX_OBJECT_SYSTEM"; - case 4: - return "REINDEX_OBJECT_DATABASE"; - default: - throw new Error("Value not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case 0: - return "ALTER_TSCONFIG_ADD_MAPPING"; - case 1: - return "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN"; - case 2: - return "ALTER_TSCONFIG_REPLACE_DICT"; - case 3: - return "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN"; - case 4: - return "ALTER_TSCONFIG_DROP_MAPPING"; - default: - throw new Error("Value not recognized in enum AlterTSConfigType"); - } - } - case "PublicationObjSpecType": - { - switch (key) { - case 0: - return "PUBLICATIONOBJ_TABLE"; - case 1: - return "PUBLICATIONOBJ_TABLES_IN_SCHEMA"; - case 2: - return "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA"; - case 3: - return "PUBLICATIONOBJ_CONTINUATION"; - default: - throw new Error("Value not recognized in enum PublicationObjSpecType"); - } - } - case "AlterPublicationAction": - { - switch (key) { - case 0: - return "AP_AddObjects"; - case 1: - return "AP_DropObjects"; - case 2: - return "AP_SetObjects"; - default: - throw new Error("Value not recognized in enum AlterPublicationAction"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case 0: - return "ALTER_SUBSCRIPTION_OPTIONS"; - case 1: - return "ALTER_SUBSCRIPTION_CONNECTION"; - case 2: - return "ALTER_SUBSCRIPTION_SET_PUBLICATION"; - case 3: - return "ALTER_SUBSCRIPTION_ADD_PUBLICATION"; - case 4: - return "ALTER_SUBSCRIPTION_DROP_PUBLICATION"; - case 5: - return "ALTER_SUBSCRIPTION_REFRESH"; - case 6: - return "ALTER_SUBSCRIPTION_ENABLED"; - case 7: - return "ALTER_SUBSCRIPTION_SKIP"; - default: - throw new Error("Value not recognized in enum AlterSubscriptionType"); - } - } - case "OnCommitAction": - { - switch (key) { - case 0: - return "ONCOMMIT_NOOP"; - case 1: - return "ONCOMMIT_PRESERVE_ROWS"; - case 2: - return "ONCOMMIT_DELETE_ROWS"; - case 3: - return "ONCOMMIT_DROP"; - default: - throw new Error("Value not recognized in enum OnCommitAction"); - } - } - case "ParamKind": - { - switch (key) { - case 0: - return "PARAM_EXTERN"; - case 1: - return "PARAM_EXEC"; - case 2: - return "PARAM_SUBLINK"; - case 3: - return "PARAM_MULTIEXPR"; - default: - throw new Error("Value not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case 0: - return "COERCION_IMPLICIT"; - case 1: - return "COERCION_ASSIGNMENT"; - case 2: - return "COERCION_PLPGSQL"; - case 3: - return "COERCION_EXPLICIT"; - default: - throw new Error("Value not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case 0: - return "COERCE_EXPLICIT_CALL"; - case 1: - return "COERCE_EXPLICIT_CAST"; - case 2: - return "COERCE_IMPLICIT_CAST"; - case 3: - return "COERCE_SQL_SYNTAX"; - default: - throw new Error("Value not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case 0: - return "AND_EXPR"; - case 1: - return "OR_EXPR"; - case 2: - return "NOT_EXPR"; - default: - throw new Error("Value not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case 0: - return "EXISTS_SUBLINK"; - case 1: - return "ALL_SUBLINK"; - case 2: - return "ANY_SUBLINK"; - case 3: - return "ROWCOMPARE_SUBLINK"; - case 4: - return "EXPR_SUBLINK"; - case 5: - return "MULTIEXPR_SUBLINK"; - case 6: - return "ARRAY_SUBLINK"; - case 7: - return "CTE_SUBLINK"; - default: - throw new Error("Value not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case 0: - return "ROWCOMPARE_LT"; - case 1: - return "ROWCOMPARE_LE"; - case 2: - return "ROWCOMPARE_EQ"; - case 3: - return "ROWCOMPARE_GE"; - case 4: - return "ROWCOMPARE_GT"; - case 5: - return "ROWCOMPARE_NE"; - default: - throw new Error("Value not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case 0: - return "IS_GREATEST"; - case 1: - return "IS_LEAST"; - default: - throw new Error("Value not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case 0: - return "SVFOP_CURRENT_DATE"; - case 1: - return "SVFOP_CURRENT_TIME"; - case 2: - return "SVFOP_CURRENT_TIME_N"; - case 3: - return "SVFOP_CURRENT_TIMESTAMP"; - case 4: - return "SVFOP_CURRENT_TIMESTAMP_N"; - case 5: - return "SVFOP_LOCALTIME"; - case 6: - return "SVFOP_LOCALTIME_N"; - case 7: - return "SVFOP_LOCALTIMESTAMP"; - case 8: - return "SVFOP_LOCALTIMESTAMP_N"; - case 9: - return "SVFOP_CURRENT_ROLE"; - case 10: - return "SVFOP_CURRENT_USER"; - case 11: - return "SVFOP_USER"; - case 12: - return "SVFOP_SESSION_USER"; - case 13: - return "SVFOP_CURRENT_CATALOG"; - case 14: - return "SVFOP_CURRENT_SCHEMA"; - default: - throw new Error("Value not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case 0: - return "IS_XMLCONCAT"; - case 1: - return "IS_XMLELEMENT"; - case 2: - return "IS_XMLFOREST"; - case 3: - return "IS_XMLPARSE"; - case 4: - return "IS_XMLPI"; - case 5: - return "IS_XMLROOT"; - case 6: - return "IS_XMLSERIALIZE"; - case 7: - return "IS_DOCUMENT"; - default: - throw new Error("Value not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case 0: - return "XMLOPTION_DOCUMENT"; - case 1: - return "XMLOPTION_CONTENT"; - default: - throw new Error("Value not recognized in enum XmlOptionType"); - } - } - case "JsonEncoding": - { - switch (key) { - case 0: - return "JS_ENC_DEFAULT"; - case 1: - return "JS_ENC_UTF8"; - case 2: - return "JS_ENC_UTF16"; - case 3: - return "JS_ENC_UTF32"; - default: - throw new Error("Value not recognized in enum JsonEncoding"); - } - } - case "JsonFormatType": - { - switch (key) { - case 0: - return "JS_FORMAT_DEFAULT"; - case 1: - return "JS_FORMAT_JSON"; - case 2: - return "JS_FORMAT_JSONB"; - default: - throw new Error("Value not recognized in enum JsonFormatType"); - } - } - case "JsonConstructorType": - { - switch (key) { - case 0: - return "JSCTOR_JSON_OBJECT"; - case 1: - return "JSCTOR_JSON_ARRAY"; - case 2: - return "JSCTOR_JSON_OBJECTAGG"; - case 3: - return "JSCTOR_JSON_ARRAYAGG"; - default: - throw new Error("Value not recognized in enum JsonConstructorType"); - } - } - case "JsonValueType": - { - switch (key) { - case 0: - return "JS_TYPE_ANY"; - case 1: - return "JS_TYPE_OBJECT"; - case 2: - return "JS_TYPE_ARRAY"; - case 3: - return "JS_TYPE_SCALAR"; - default: - throw new Error("Value not recognized in enum JsonValueType"); - } - } - case "NullTestType": - { - switch (key) { - case 0: - return "IS_NULL"; - case 1: - return "IS_NOT_NULL"; - default: - throw new Error("Value not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case 0: - return "IS_TRUE"; - case 1: - return "IS_NOT_TRUE"; - case 2: - return "IS_FALSE"; - case 3: - return "IS_NOT_FALSE"; - case 4: - return "IS_UNKNOWN"; - case 5: - return "IS_NOT_UNKNOWN"; - default: - throw new Error("Value not recognized in enum BoolTestType"); - } - } - case "CmdType": - { - switch (key) { - case 0: - return "CMD_UNKNOWN"; - case 1: - return "CMD_SELECT"; - case 2: - return "CMD_UPDATE"; - case 3: - return "CMD_INSERT"; - case 4: - return "CMD_DELETE"; - case 5: - return "CMD_MERGE"; - case 6: - return "CMD_UTILITY"; - case 7: - return "CMD_NOTHING"; - default: - throw new Error("Value not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case 0: - return "JOIN_INNER"; - case 1: - return "JOIN_LEFT"; - case 2: - return "JOIN_FULL"; - case 3: - return "JOIN_RIGHT"; - case 4: - return "JOIN_SEMI"; - case 5: - return "JOIN_ANTI"; - case 6: - return "JOIN_RIGHT_ANTI"; - case 7: - return "JOIN_UNIQUE_OUTER"; - case 8: - return "JOIN_UNIQUE_INNER"; - default: - throw new Error("Value not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case 0: - return "AGG_PLAIN"; - case 1: - return "AGG_SORTED"; - case 2: - return "AGG_HASHED"; - case 3: - return "AGG_MIXED"; - default: - throw new Error("Value not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case 0: - return "AGGSPLIT_SIMPLE"; - case 1: - return "AGGSPLIT_INITIAL_SERIAL"; - case 2: - return "AGGSPLIT_FINAL_DESERIAL"; - default: - throw new Error("Value not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case 0: - return "SETOPCMD_INTERSECT"; - case 1: - return "SETOPCMD_INTERSECT_ALL"; - case 2: - return "SETOPCMD_EXCEPT"; - case 3: - return "SETOPCMD_EXCEPT_ALL"; - default: - throw new Error("Value not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case 0: - return "SETOP_SORTED"; - case 1: - return "SETOP_HASHED"; - default: - throw new Error("Value not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case 0: - return "ONCONFLICT_NONE"; - case 1: - return "ONCONFLICT_NOTHING"; - case 2: - return "ONCONFLICT_UPDATE"; - default: - throw new Error("Value not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case 0: - return "LIMIT_OPTION_DEFAULT"; - case 1: - return "LIMIT_OPTION_COUNT"; - case 2: - return "LIMIT_OPTION_WITH_TIES"; - default: - throw new Error("Value not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case 0: - return "LCS_NONE"; - case 1: - return "LCS_FORKEYSHARE"; - case 2: - return "LCS_FORSHARE"; - case 3: - return "LCS_FORNOKEYUPDATE"; - case 4: - return "LCS_FORUPDATE"; - default: - throw new Error("Value not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case 0: - return "LockWaitBlock"; - case 1: - return "LockWaitSkip"; - case 2: - return "LockWaitError"; - default: - throw new Error("Value not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case 0: - return "LockTupleKeyShare"; - case 1: - return "LockTupleShare"; - case 2: - return "LockTupleNoKeyExclusive"; - case 3: - return "LockTupleExclusive"; - default: - throw new Error("Value not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case 0: - return "NO_KEYWORD"; - case 1: - return "UNRESERVED_KEYWORD"; - case 2: - return "COL_NAME_KEYWORD"; - case 3: - return "TYPE_FUNC_NAME_KEYWORD"; - case 4: - return "RESERVED_KEYWORD"; - default: - throw new Error("Value not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case 0: - return "NUL"; - case 36: - return "ASCII_36"; - case 37: - return "ASCII_37"; - case 40: - return "ASCII_40"; - case 41: - return "ASCII_41"; - case 42: - return "ASCII_42"; - case 43: - return "ASCII_43"; - case 44: - return "ASCII_44"; - case 45: - return "ASCII_45"; - case 46: - return "ASCII_46"; - case 47: - return "ASCII_47"; - case 58: - return "ASCII_58"; - case 59: - return "ASCII_59"; - case 60: - return "ASCII_60"; - case 61: - return "ASCII_61"; - case 62: - return "ASCII_62"; - case 63: - return "ASCII_63"; - case 91: - return "ASCII_91"; - case 92: - return "ASCII_92"; - case 93: - return "ASCII_93"; - case 94: - return "ASCII_94"; - case 258: - return "IDENT"; - case 259: - return "UIDENT"; - case 260: - return "FCONST"; - case 261: - return "SCONST"; - case 262: - return "USCONST"; - case 263: - return "BCONST"; - case 264: - return "XCONST"; - case 265: - return "Op"; - case 266: - return "ICONST"; - case 267: - return "PARAM"; - case 268: - return "TYPECAST"; - case 269: - return "DOT_DOT"; - case 270: - return "COLON_EQUALS"; - case 271: - return "EQUALS_GREATER"; - case 272: - return "LESS_EQUALS"; - case 273: - return "GREATER_EQUALS"; - case 274: - return "NOT_EQUALS"; - case 275: - return "SQL_COMMENT"; - case 276: - return "C_COMMENT"; - case 277: - return "ABORT_P"; - case 278: - return "ABSENT"; - case 279: - return "ABSOLUTE_P"; - case 280: - return "ACCESS"; - case 281: - return "ACTION"; - case 282: - return "ADD_P"; - case 283: - return "ADMIN"; - case 284: - return "AFTER"; - case 285: - return "AGGREGATE"; - case 286: - return "ALL"; - case 287: - return "ALSO"; - case 288: - return "ALTER"; - case 289: - return "ALWAYS"; - case 290: - return "ANALYSE"; - case 291: - return "ANALYZE"; - case 292: - return "AND"; - case 293: - return "ANY"; - case 294: - return "ARRAY"; - case 295: - return "AS"; - case 296: - return "ASC"; - case 297: - return "ASENSITIVE"; - case 298: - return "ASSERTION"; - case 299: - return "ASSIGNMENT"; - case 300: - return "ASYMMETRIC"; - case 301: - return "ATOMIC"; - case 302: - return "AT"; - case 303: - return "ATTACH"; - case 304: - return "ATTRIBUTE"; - case 305: - return "AUTHORIZATION"; - case 306: - return "BACKWARD"; - case 307: - return "BEFORE"; - case 308: - return "BEGIN_P"; - case 309: - return "BETWEEN"; - case 310: - return "BIGINT"; - case 311: - return "BINARY"; - case 312: - return "BIT"; - case 313: - return "BOOLEAN_P"; - case 314: - return "BOTH"; - case 315: - return "BREADTH"; - case 316: - return "BY"; - case 317: - return "CACHE"; - case 318: - return "CALL"; - case 319: - return "CALLED"; - case 320: - return "CASCADE"; - case 321: - return "CASCADED"; - case 322: - return "CASE"; - case 323: - return "CAST"; - case 324: - return "CATALOG_P"; - case 325: - return "CHAIN"; - case 326: - return "CHAR_P"; - case 327: - return "CHARACTER"; - case 328: - return "CHARACTERISTICS"; - case 329: - return "CHECK"; - case 330: - return "CHECKPOINT"; - case 331: - return "CLASS"; - case 332: - return "CLOSE"; - case 333: - return "CLUSTER"; - case 334: - return "COALESCE"; - case 335: - return "COLLATE"; - case 336: - return "COLLATION"; - case 337: - return "COLUMN"; - case 338: - return "COLUMNS"; - case 339: - return "COMMENT"; - case 340: - return "COMMENTS"; - case 341: - return "COMMIT"; - case 342: - return "COMMITTED"; - case 343: - return "COMPRESSION"; - case 344: - return "CONCURRENTLY"; - case 345: - return "CONFIGURATION"; - case 346: - return "CONFLICT"; - case 347: - return "CONNECTION"; - case 348: - return "CONSTRAINT"; - case 349: - return "CONSTRAINTS"; - case 350: - return "CONTENT_P"; - case 351: - return "CONTINUE_P"; - case 352: - return "CONVERSION_P"; - case 353: - return "COPY"; - case 354: - return "COST"; - case 355: - return "CREATE"; - case 356: - return "CROSS"; - case 357: - return "CSV"; - case 358: - return "CUBE"; - case 359: - return "CURRENT_P"; - case 360: - return "CURRENT_CATALOG"; - case 361: - return "CURRENT_DATE"; - case 362: - return "CURRENT_ROLE"; - case 363: - return "CURRENT_SCHEMA"; - case 364: - return "CURRENT_TIME"; - case 365: - return "CURRENT_TIMESTAMP"; - case 366: - return "CURRENT_USER"; - case 367: - return "CURSOR"; - case 368: - return "CYCLE"; - case 369: - return "DATA_P"; - case 370: - return "DATABASE"; - case 371: - return "DAY_P"; - case 372: - return "DEALLOCATE"; - case 373: - return "DEC"; - case 374: - return "DECIMAL_P"; - case 375: - return "DECLARE"; - case 376: - return "DEFAULT"; - case 377: - return "DEFAULTS"; - case 378: - return "DEFERRABLE"; - case 379: - return "DEFERRED"; - case 380: - return "DEFINER"; - case 381: - return "DELETE_P"; - case 382: - return "DELIMITER"; - case 383: - return "DELIMITERS"; - case 384: - return "DEPENDS"; - case 385: - return "DEPTH"; - case 386: - return "DESC"; - case 387: - return "DETACH"; - case 388: - return "DICTIONARY"; - case 389: - return "DISABLE_P"; - case 390: - return "DISCARD"; - case 391: - return "DISTINCT"; - case 392: - return "DO"; - case 393: - return "DOCUMENT_P"; - case 394: - return "DOMAIN_P"; - case 395: - return "DOUBLE_P"; - case 396: - return "DROP"; - case 397: - return "EACH"; - case 398: - return "ELSE"; - case 399: - return "ENABLE_P"; - case 400: - return "ENCODING"; - case 401: - return "ENCRYPTED"; - case 402: - return "END_P"; - case 403: - return "ENUM_P"; - case 404: - return "ESCAPE"; - case 405: - return "EVENT"; - case 406: - return "EXCEPT"; - case 407: - return "EXCLUDE"; - case 408: - return "EXCLUDING"; - case 409: - return "EXCLUSIVE"; - case 410: - return "EXECUTE"; - case 411: - return "EXISTS"; - case 412: - return "EXPLAIN"; - case 413: - return "EXPRESSION"; - case 414: - return "EXTENSION"; - case 415: - return "EXTERNAL"; - case 416: - return "EXTRACT"; - case 417: - return "FALSE_P"; - case 418: - return "FAMILY"; - case 419: - return "FETCH"; - case 420: - return "FILTER"; - case 421: - return "FINALIZE"; - case 422: - return "FIRST_P"; - case 423: - return "FLOAT_P"; - case 424: - return "FOLLOWING"; - case 425: - return "FOR"; - case 426: - return "FORCE"; - case 427: - return "FOREIGN"; - case 428: - return "FORMAT"; - case 429: - return "FORWARD"; - case 430: - return "FREEZE"; - case 431: - return "FROM"; - case 432: - return "FULL"; - case 433: - return "FUNCTION"; - case 434: - return "FUNCTIONS"; - case 435: - return "GENERATED"; - case 436: - return "GLOBAL"; - case 437: - return "GRANT"; - case 438: - return "GRANTED"; - case 439: - return "GREATEST"; - case 440: - return "GROUP_P"; - case 441: - return "GROUPING"; - case 442: - return "GROUPS"; - case 443: - return "HANDLER"; - case 444: - return "HAVING"; - case 445: - return "HEADER_P"; - case 446: - return "HOLD"; - case 447: - return "HOUR_P"; - case 448: - return "IDENTITY_P"; - case 449: - return "IF_P"; - case 450: - return "ILIKE"; - case 451: - return "IMMEDIATE"; - case 452: - return "IMMUTABLE"; - case 453: - return "IMPLICIT_P"; - case 454: - return "IMPORT_P"; - case 455: - return "IN_P"; - case 456: - return "INCLUDE"; - case 457: - return "INCLUDING"; - case 458: - return "INCREMENT"; - case 459: - return "INDENT"; - case 460: - return "INDEX"; - case 461: - return "INDEXES"; - case 462: - return "INHERIT"; - case 463: - return "INHERITS"; - case 464: - return "INITIALLY"; - case 465: - return "INLINE_P"; - case 466: - return "INNER_P"; - case 467: - return "INOUT"; - case 468: - return "INPUT_P"; - case 469: - return "INSENSITIVE"; - case 470: - return "INSERT"; - case 471: - return "INSTEAD"; - case 472: - return "INT_P"; - case 473: - return "INTEGER"; - case 474: - return "INTERSECT"; - case 475: - return "INTERVAL"; - case 476: - return "INTO"; - case 477: - return "INVOKER"; - case 478: - return "IS"; - case 479: - return "ISNULL"; - case 480: - return "ISOLATION"; - case 481: - return "JOIN"; - case 482: - return "JSON"; - case 483: - return "JSON_ARRAY"; - case 484: - return "JSON_ARRAYAGG"; - case 485: - return "JSON_OBJECT"; - case 486: - return "JSON_OBJECTAGG"; - case 487: - return "KEY"; - case 488: - return "KEYS"; - case 489: - return "LABEL"; - case 490: - return "LANGUAGE"; - case 491: - return "LARGE_P"; - case 492: - return "LAST_P"; - case 493: - return "LATERAL_P"; - case 494: - return "LEADING"; - case 495: - return "LEAKPROOF"; - case 496: - return "LEAST"; - case 497: - return "LEFT"; - case 498: - return "LEVEL"; - case 499: - return "LIKE"; - case 500: - return "LIMIT"; - case 501: - return "LISTEN"; - case 502: - return "LOAD"; - case 503: - return "LOCAL"; - case 504: - return "LOCALTIME"; - case 505: - return "LOCALTIMESTAMP"; - case 506: - return "LOCATION"; - case 507: - return "LOCK_P"; - case 508: - return "LOCKED"; - case 509: - return "LOGGED"; - case 510: - return "MAPPING"; - case 511: - return "MATCH"; - case 512: - return "MATCHED"; - case 513: - return "MATERIALIZED"; - case 514: - return "MAXVALUE"; - case 515: - return "MERGE"; - case 516: - return "METHOD"; - case 517: - return "MINUTE_P"; - case 518: - return "MINVALUE"; - case 519: - return "MODE"; - case 520: - return "MONTH_P"; - case 521: - return "MOVE"; - case 522: - return "NAME_P"; - case 523: - return "NAMES"; - case 524: - return "NATIONAL"; - case 525: - return "NATURAL"; - case 526: - return "NCHAR"; - case 527: - return "NEW"; - case 528: - return "NEXT"; - case 529: - return "NFC"; - case 530: - return "NFD"; - case 531: - return "NFKC"; - case 532: - return "NFKD"; - case 533: - return "NO"; - case 534: - return "NONE"; - case 535: - return "NORMALIZE"; - case 536: - return "NORMALIZED"; - case 537: - return "NOT"; - case 538: - return "NOTHING"; - case 539: - return "NOTIFY"; - case 540: - return "NOTNULL"; - case 541: - return "NOWAIT"; - case 542: - return "NULL_P"; - case 543: - return "NULLIF"; - case 544: - return "NULLS_P"; - case 545: - return "NUMERIC"; - case 546: - return "OBJECT_P"; - case 547: - return "OF"; - case 548: - return "OFF"; - case 549: - return "OFFSET"; - case 550: - return "OIDS"; - case 551: - return "OLD"; - case 552: - return "ON"; - case 553: - return "ONLY"; - case 554: - return "OPERATOR"; - case 555: - return "OPTION"; - case 556: - return "OPTIONS"; - case 557: - return "OR"; - case 558: - return "ORDER"; - case 559: - return "ORDINALITY"; - case 560: - return "OTHERS"; - case 561: - return "OUT_P"; - case 562: - return "OUTER_P"; - case 563: - return "OVER"; - case 564: - return "OVERLAPS"; - case 565: - return "OVERLAY"; - case 566: - return "OVERRIDING"; - case 567: - return "OWNED"; - case 568: - return "OWNER"; - case 569: - return "PARALLEL"; - case 570: - return "PARAMETER"; - case 571: - return "PARSER"; - case 572: - return "PARTIAL"; - case 573: - return "PARTITION"; - case 574: - return "PASSING"; - case 575: - return "PASSWORD"; - case 576: - return "PLACING"; - case 577: - return "PLANS"; - case 578: - return "POLICY"; - case 579: - return "POSITION"; - case 580: - return "PRECEDING"; - case 581: - return "PRECISION"; - case 582: - return "PRESERVE"; - case 583: - return "PREPARE"; - case 584: - return "PREPARED"; - case 585: - return "PRIMARY"; - case 586: - return "PRIOR"; - case 587: - return "PRIVILEGES"; - case 588: - return "PROCEDURAL"; - case 589: - return "PROCEDURE"; - case 590: - return "PROCEDURES"; - case 591: - return "PROGRAM"; - case 592: - return "PUBLICATION"; - case 593: - return "QUOTE"; - case 594: - return "RANGE"; - case 595: - return "READ"; - case 596: - return "REAL"; - case 597: - return "REASSIGN"; - case 598: - return "RECHECK"; - case 599: - return "RECURSIVE"; - case 600: - return "REF_P"; - case 601: - return "REFERENCES"; - case 602: - return "REFERENCING"; - case 603: - return "REFRESH"; - case 604: - return "REINDEX"; - case 605: - return "RELATIVE_P"; - case 606: - return "RELEASE"; - case 607: - return "RENAME"; - case 608: - return "REPEATABLE"; - case 609: - return "REPLACE"; - case 610: - return "REPLICA"; - case 611: - return "RESET"; - case 612: - return "RESTART"; - case 613: - return "RESTRICT"; - case 614: - return "RETURN"; - case 615: - return "RETURNING"; - case 616: - return "RETURNS"; - case 617: - return "REVOKE"; - case 618: - return "RIGHT"; - case 619: - return "ROLE"; - case 620: - return "ROLLBACK"; - case 621: - return "ROLLUP"; - case 622: - return "ROUTINE"; - case 623: - return "ROUTINES"; - case 624: - return "ROW"; - case 625: - return "ROWS"; - case 626: - return "RULE"; - case 627: - return "SAVEPOINT"; - case 628: - return "SCALAR"; - case 629: - return "SCHEMA"; - case 630: - return "SCHEMAS"; - case 631: - return "SCROLL"; - case 632: - return "SEARCH"; - case 633: - return "SECOND_P"; - case 634: - return "SECURITY"; - case 635: - return "SELECT"; - case 636: - return "SEQUENCE"; - case 637: - return "SEQUENCES"; - case 638: - return "SERIALIZABLE"; - case 639: - return "SERVER"; - case 640: - return "SESSION"; - case 641: - return "SESSION_USER"; - case 642: - return "SET"; - case 643: - return "SETS"; - case 644: - return "SETOF"; - case 645: - return "SHARE"; - case 646: - return "SHOW"; - case 647: - return "SIMILAR"; - case 648: - return "SIMPLE"; - case 649: - return "SKIP"; - case 650: - return "SMALLINT"; - case 651: - return "SNAPSHOT"; - case 652: - return "SOME"; - case 653: - return "SQL_P"; - case 654: - return "STABLE"; - case 655: - return "STANDALONE_P"; - case 656: - return "START"; - case 657: - return "STATEMENT"; - case 658: - return "STATISTICS"; - case 659: - return "STDIN"; - case 660: - return "STDOUT"; - case 661: - return "STORAGE"; - case 662: - return "STORED"; - case 663: - return "STRICT_P"; - case 664: - return "STRIP_P"; - case 665: - return "SUBSCRIPTION"; - case 666: - return "SUBSTRING"; - case 667: - return "SUPPORT"; - case 668: - return "SYMMETRIC"; - case 669: - return "SYSID"; - case 670: - return "SYSTEM_P"; - case 671: - return "SYSTEM_USER"; - case 672: - return "TABLE"; - case 673: - return "TABLES"; - case 674: - return "TABLESAMPLE"; - case 675: - return "TABLESPACE"; - case 676: - return "TEMP"; - case 677: - return "TEMPLATE"; - case 678: - return "TEMPORARY"; - case 679: - return "TEXT_P"; - case 680: - return "THEN"; - case 681: - return "TIES"; - case 682: - return "TIME"; - case 683: - return "TIMESTAMP"; - case 684: - return "TO"; - case 685: - return "TRAILING"; - case 686: - return "TRANSACTION"; - case 687: - return "TRANSFORM"; - case 688: - return "TREAT"; - case 689: - return "TRIGGER"; - case 690: - return "TRIM"; - case 691: - return "TRUE_P"; - case 692: - return "TRUNCATE"; - case 693: - return "TRUSTED"; - case 694: - return "TYPE_P"; - case 695: - return "TYPES_P"; - case 696: - return "UESCAPE"; - case 697: - return "UNBOUNDED"; - case 698: - return "UNCOMMITTED"; - case 699: - return "UNENCRYPTED"; - case 700: - return "UNION"; - case 701: - return "UNIQUE"; - case 702: - return "UNKNOWN"; - case 703: - return "UNLISTEN"; - case 704: - return "UNLOGGED"; - case 705: - return "UNTIL"; - case 706: - return "UPDATE"; - case 707: - return "USER"; - case 708: - return "USING"; - case 709: - return "VACUUM"; - case 710: - return "VALID"; - case 711: - return "VALIDATE"; - case 712: - return "VALIDATOR"; - case 713: - return "VALUE_P"; - case 714: - return "VALUES"; - case 715: - return "VARCHAR"; - case 716: - return "VARIADIC"; - case 717: - return "VARYING"; - case 718: - return "VERBOSE"; - case 719: - return "VERSION_P"; - case 720: - return "VIEW"; - case 721: - return "VIEWS"; - case 722: - return "VOLATILE"; - case 723: - return "WHEN"; - case 724: - return "WHERE"; - case 725: - return "WHITESPACE_P"; - case 726: - return "WINDOW"; - case 727: - return "WITH"; - case 728: - return "WITHIN"; - case 729: - return "WITHOUT"; - case 730: - return "WORK"; - case 731: - return "WRAPPER"; - case 732: - return "WRITE"; - case 733: - return "XML_P"; - case 734: - return "XMLATTRIBUTES"; - case 735: - return "XMLCONCAT"; - case 736: - return "XMLELEMENT"; - case 737: - return "XMLEXISTS"; - case 738: - return "XMLFOREST"; - case 739: - return "XMLNAMESPACES"; - case 740: - return "XMLPARSE"; - case 741: - return "XMLPI"; - case 742: - return "XMLROOT"; - case 743: - return "XMLSERIALIZE"; - case 744: - return "XMLTABLE"; - case 745: - return "YEAR_P"; - case 746: - return "YES_P"; - case 747: - return "ZONE"; - case 748: - return "FORMAT_LA"; - case 749: - return "NOT_LA"; - case 750: - return "NULLS_LA"; - case 751: - return "WITH_LA"; - case 752: - return "WITHOUT_LA"; - case 753: - return "MODE_TYPE_NAME"; - case 754: - return "MODE_PLPGSQL_EXPR"; - case 755: - return "MODE_PLPGSQL_ASSIGN1"; - case 756: - return "MODE_PLPGSQL_ASSIGN2"; - case 757: - return "MODE_PLPGSQL_ASSIGN3"; - case 758: - return "UMINUS"; - default: - throw new Error("Value not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/16/runtime-schema.ts b/packages/transform/src/16/runtime-schema.ts deleted file mode 100644 index 2089196f..00000000 --- a/packages/transform/src/16/runtime-schema.ts +++ /dev/null @@ -1,9356 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export interface FieldSpec { - name: string; - type: string; - isArray: boolean; - optional: boolean; -} -export interface NodeSpec { - name: string; - isNode: boolean; - fields: FieldSpec[]; -} -export const runtimeSchema: NodeSpec[] = [ - { - name: 'A_ArrayExpr', - isNode: true, - fields: [ - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Const', - isNode: true, - fields: [ - { - name: 'boolval', - type: 'Boolean', - isArray: false, - optional: true - }, - { - name: 'bsval', - type: 'BitString', - isArray: false, - optional: true - }, - { - name: 'fval', - type: 'Float', - isArray: false, - optional: true - }, - { - name: 'isnull', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'ival', - type: 'Integer', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'sval', - type: 'String', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Expr', - isNode: true, - fields: [ - { - name: 'kind', - type: 'A_Expr_Kind', - isArray: false, - optional: true - }, - { - name: 'lexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indices', - isNode: true, - fields: [ - { - name: 'is_slice', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lidx', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'uidx', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'A_Indirection', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'A_Star', - isNode: true, - fields: [ - - ] - }, - { - name: 'AccessPriv', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'priv_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Aggref', - isNode: true, - fields: [ - { - name: 'aggargtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggdirectargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggdistinct', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'aggfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'aggorder', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'aggsplit', - type: 'AggSplit', - isArray: false, - optional: true - }, - { - name: 'aggstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'aggtransno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'aggtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'aggvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Alias', - isNode: true, - fields: [ - { - name: 'aliasname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterCollationStmt', - isNode: true, - fields: [ - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDatabaseRefreshCollStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterDatabaseSetStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterDatabaseStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDefaultPrivilegesStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'GrantStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterDomainStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEnumStmt', - isNode: true, - fields: [ - { - name: 'newVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newValIsAfter', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newValNeighbor', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'oldVal', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'skipIfNewValExists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterEventTrigStmt', - isNode: true, - fields: [ - { - name: 'tgenabled', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionContentsStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterForeignServerStmt', - isNode: true, - fields: [ - { - name: 'has_version', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterFunctionStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlternativeSubPlan', - isNode: true, - fields: [ - { - name: 'subplans', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectDependsStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'String', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'remove', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterObjectSchemaStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newschema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterOperatorStmt', - isNode: true, - fields: [ - { - name: 'opername', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'isDrop', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterOwnerStmt', - isNode: true, - fields: [ - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objectType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPolicyStmt', - isNode: true, - fields: [ - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterPublicationStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'AlterPublicationAction', - isArray: false, - optional: true - }, - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pubobjects', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterRoleSetStmt', - isNode: true, - fields: [ - { - name: 'database', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterRoleStmt', - isNode: true, - fields: [ - { - name: 'action', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'stxstattarget', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'AlterSubscriptionType', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterSystemStmt', - isNode: true, - fields: [ - { - name: 'setstmt', - type: 'VariableSetStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableCmd', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'def', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'newowner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'num', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recurse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subtype', - type: 'AlterTableType', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableMoveAllStmt', - isNode: true, - fields: [ - { - name: 'new_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'orig_tablespacename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTableSpaceOptionsStmt', - isNode: true, - fields: [ - { - name: 'isReset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTableStmt', - isNode: true, - fields: [ - { - name: 'cmds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'AlterTSConfigurationStmt', - isNode: true, - fields: [ - { - name: 'cfgname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'dicts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'AlterTSConfigType', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tokentype', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTSDictionaryStmt', - isNode: true, - fields: [ - { - name: 'dictname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterTypeStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'AlterUserMappingStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayCoerceExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'elemexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ArrayExpr', - isNode: true, - fields: [ - { - name: 'array_collid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'array_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'element_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'elements', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'multidims', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BitString', - isNode: true, - fields: [ - { - name: 'bsval', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'Boolean', - isNode: true, - fields: [ - { - name: 'boolval', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'BooleanTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'booltesttype', - type: 'BoolTestType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'BoolExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'boolop', - type: 'BoolExprType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallContext', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CallStmt', - isNode: true, - fields: [ - { - name: 'funccall', - type: 'FuncCall', - isArray: false, - optional: true - }, - { - name: 'funcexpr', - type: 'FuncExpr', - isArray: false, - optional: true - }, - { - name: 'outargs', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CaseExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'casecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'casetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'defresult', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseTestExpr', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CaseWhen', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'result', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CheckPointStmt', - isNode: true, - fields: [ - - ] - }, - { - name: 'ClosePortalStmt', - isNode: true, - fields: [ - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ClusterStmt', - isNode: true, - fields: [ - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoalesceExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coalescecollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'coalescetype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomain', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coercionformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceToDomainValue', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CoerceViaIO', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'coerceformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateClause', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CollateExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnDef', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'collOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'compression', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cooked_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fdwoptions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'generated', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identity', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'identitySequence', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'inhcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'is_from_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'raw_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'storage', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'storage_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'ColumnRef', - isNode: true, - fields: [ - { - name: 'fields', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommentStmt', - isNode: true, - fields: [ - { - name: 'comment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CommonTableExpr', - isNode: true, - fields: [ - { - name: 'aliascolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctecoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctematerialized', - type: 'CTEMaterialize', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'ctequery', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cterecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'cterefcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cycle_clause', - type: 'CTECycleClause', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'search_clause', - type: 'CTESearchClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'CompositeTypeStmt', - isNode: true, - fields: [ - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typevar', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'Constraint', - isNode: true, - fields: [ - { - name: 'access_method', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'contype', - type: 'ConstrType', - isArray: false, - optional: true - }, - { - name: 'cooked_expr', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'exclusions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_del_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_del_set_cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fk_matchtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'fk_upd_action', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'generated_when', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'including', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexspace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'initially_valid', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_no_inherit', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'keys', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nulls_not_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'old_conpfeqop', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'old_pktable_oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pk_attrs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pktable', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'raw_expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'skip_validation', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'where_clause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConstraintsSetStmt', - isNode: true, - fields: [ - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'deferred', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ConvertRowtypeExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'convertformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CopyStmt', - isNode: true, - fields: [ - { - name: 'attlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'is_from', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_program', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateAmStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'amtype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'handler_name', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateCastStmt', - isNode: true, - fields: [ - { - name: 'context', - type: 'CoercionContext', - isArray: false, - optional: true - }, - { - name: 'func', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'inout', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sourcetype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'targettype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateConversionStmt', - isNode: true, - fields: [ - { - name: 'conversion_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'def', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'for_encoding_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_name', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'to_encoding_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatedbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateDomainStmt', - isNode: true, - fields: [ - { - name: 'collClause', - type: 'CollateClause', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'domainname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateEnumStmt', - isNode: true, - fields: [ - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'vals', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateEventTrigStmt', - isNode: true, - fields: [ - { - name: 'eventname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenclause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateExtensionStmt', - isNode: true, - fields: [ - { - name: 'extname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateFdwStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'func_options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateForeignServerStmt', - isNode: true, - fields: [ - { - name: 'fdwname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'servertype', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'version', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateForeignTableStmt', - isNode: true, - fields: [ - { - name: 'base', - type: 'CreateStmt', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateFunctionStmt', - isNode: true, - fields: [ - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_procedure', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parameters', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'returnType', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'sql_body', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassItem', - isNode: true, - fields: [ - { - name: 'class_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'itemtype', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'order_family', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'storedtype', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateOpClassStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'datatype', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'isDefault', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateOpFamilyStmt', - isNode: true, - fields: [ - { - name: 'amname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opfamilyname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreatePLangStmt', - isNode: true, - fields: [ - { - name: 'plhandler', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plinline', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'plname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pltrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'plvalidator', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePolicyStmt', - isNode: true, - fields: [ - { - name: 'cmd_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'permissive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'policy_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'table', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'with_check', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreatePublicationStmt', - isNode: true, - fields: [ - { - name: 'for_all_tables', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pubname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pubobjects', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRangeStmt', - isNode: true, - fields: [ - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'typeName', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'CreateRoleStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'role', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'stmt_type', - type: 'RoleStmtType', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSchemaStmt', - isNode: true, - fields: [ - { - name: 'authrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'schemaElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSeqStmt', - isNode: true, - fields: [ - { - name: 'for_identity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ownerId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'sequence', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStatsStmt', - isNode: true, - fields: [ - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'exprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stat_types', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stxcomment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'transformed', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'constraints', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inhRelations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ofTypename', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'oncommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partbound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'partspec', - type: 'PartitionSpec', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'tableElts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'conninfo', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'publication', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableAsStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'into', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'is_select_into', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'location', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'owner', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTransformStmt', - isNode: true, - fields: [ - { - name: 'fromsql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'lang', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tosql', - type: 'ObjectWithArgs', - isArray: false, - optional: true - }, - { - name: 'type_name', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateTrigStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'constrrel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'events', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'row', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'timing', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'transitionRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'trigname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whenClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'CreateUserMappingStmt', - isNode: true, - fields: [ - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'CTECycleClause', - isNode: true, - fields: [ - { - name: 'cycle_col_list', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cycle_mark_collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_column', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_default', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_neop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cycle_mark_value', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'cycle_path_column', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'CTESearchClause', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'search_breadth_first', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'search_col_list', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'search_seq_column', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'CurrentOfExpr', - isNode: true, - fields: [ - { - name: 'cursor_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'cursor_param', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'cvarno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeallocateStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeclareCursorStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefElem', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'defaction', - type: 'DefElemAction', - isArray: false, - optional: true - }, - { - name: 'defname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'defnamespace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'DefineStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'definition', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'defnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'oldstyle', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'DeleteStmt', - isNode: true, - fields: [ - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'DiscardStmt', - isNode: true, - fields: [ - { - name: 'target', - type: 'DiscardMode', - isArray: false, - optional: true - } - ] - }, - { - name: 'DistinctExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'DoStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropdbStmt', - isNode: true, - fields: [ - { - name: 'dbname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropOwnedStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropRoleStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'DropStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'removeType', - type: 'ObjectType', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropSubscriptionStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropTableSpaceStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tablespacename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'DropUserMappingStmt', - isNode: true, - fields: [ - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'servername', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'user', - type: 'RoleSpec', - isArray: false, - optional: true - } - ] - }, - { - name: 'ExecuteStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ExplainStmt', - isNode: true, - fields: [ - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FetchStmt', - isNode: true, - fields: [ - { - name: 'direction', - type: 'FetchDirection', - isArray: false, - optional: true - }, - { - name: 'howMany', - type: 'int64', - isArray: false, - optional: true - }, - { - name: 'ismove', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'portalname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldSelect', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnum', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FieldStore', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'fieldnums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'newvals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Float', - isNode: true, - fields: [ - { - name: 'fval', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'FromExpr', - isNode: true, - fields: [ - { - name: 'fromlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncCall', - isNode: true, - fields: [ - { - name: 'agg_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_filter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'agg_order', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'agg_star', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'agg_within_group', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'func_variadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'funcname', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'over', - type: 'WindowDef', - isArray: false, - optional: true - } - ] - }, - { - name: 'FuncExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'funcid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'funcretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'funcvariadic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'FunctionParameter', - isNode: true, - fields: [ - { - name: 'argType', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'defexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'mode', - type: 'FunctionParameterMode', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'GrantRoleStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'granted_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantee_roles', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantor', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'opt', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'GrantStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'grant_option', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'grantees', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'grantor', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'is_grant', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objects', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'privileges', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targtype', - type: 'GrantTargetType', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingFunc', - isNode: true, - fields: [ - { - name: 'agglevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'GroupingSet', - isNode: true, - fields: [ - { - name: 'content', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'kind', - type: 'GroupingSetKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ImportForeignSchemaStmt', - isNode: true, - fields: [ - { - name: 'list_type', - type: 'ImportForeignSchemaType', - isArray: false, - optional: true - }, - { - name: 'local_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'remote_schema', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'server_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'table_list', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IndexElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indexcolname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nulls_ordering', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opclassopts', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordering', - type: 'SortByDir', - isArray: false, - optional: true - } - ] - }, - { - name: 'IndexStmt', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'deferrable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'excludeOpNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'idxcomment', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'idxname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'if_not_exists', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'indexIncludingParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indexOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'indexParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'initdeferred', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isconstraint', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'nulls_not_distinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'oldCreateSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldFirstRelfilelocatorSubid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'oldNumber', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'primary', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'reset_default_tblspc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpace', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'transformed', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'unique', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferClause', - isNode: true, - fields: [ - { - name: 'conname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'indexElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InferenceElem', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'infercollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inferopclass', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'InlineCodeBlock', - isNode: true, - fields: [ - { - name: 'atomic', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langIsTrusted', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'langOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'source_text', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'InsertStmt', - isNode: true, - fields: [ - { - name: 'cols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictClause', - type: 'OnConflictClause', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'selectStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'Integer', - isNode: true, - fields: [ - { - name: 'ival', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'IntList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'IntoClause', - isNode: true, - fields: [ - { - name: 'accessMethod', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'colNames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onCommit', - type: 'OnCommitAction', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rel', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'tableSpaceName', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'viewQuery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'JoinExpr', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'isNatural', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'join_using_alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'quals', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'usingClause', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'JsonAggConstructor', - isNode: true, - fields: [ - { - name: 'agg_filter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'agg_order', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'output', - type: 'JsonOutput', - isArray: false, - optional: true - }, - { - name: 'over', - type: 'WindowDef', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonArrayAgg', - isNode: true, - fields: [ - { - name: 'absent_on_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'arg', - type: 'JsonValueExpr', - isArray: false, - optional: true - }, - { - name: 'constructor', - type: 'JsonAggConstructor', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonArrayConstructor', - isNode: true, - fields: [ - { - name: 'absent_on_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'exprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'output', - type: 'JsonOutput', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonArrayQueryConstructor', - isNode: true, - fields: [ - { - name: 'absent_on_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'format', - type: 'JsonFormat', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'output', - type: 'JsonOutput', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonConstructorExpr', - isNode: true, - fields: [ - { - name: 'absent_on_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coercion', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'func', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'returning', - type: 'JsonReturning', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'JsonConstructorType', - isArray: false, - optional: true - }, - { - name: 'unique', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonFormat', - isNode: true, - fields: [ - { - name: 'encoding', - type: 'JsonEncoding', - isArray: false, - optional: true - }, - { - name: 'format_type', - type: 'JsonFormatType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonIsPredicate', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'format', - type: 'JsonFormat', - isArray: false, - optional: true - }, - { - name: 'item_type', - type: 'JsonValueType', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'unique_keys', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonKeyValue', - isNode: true, - fields: [ - { - name: 'key', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'value', - type: 'JsonValueExpr', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonObjectAgg', - isNode: true, - fields: [ - { - name: 'absent_on_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'arg', - type: 'JsonKeyValue', - isArray: false, - optional: true - }, - { - name: 'constructor', - type: 'JsonAggConstructor', - isArray: false, - optional: true - }, - { - name: 'unique', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonObjectConstructor', - isNode: true, - fields: [ - { - name: 'absent_on_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'exprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'output', - type: 'JsonOutput', - isArray: false, - optional: true - }, - { - name: 'unique', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonOutput', - isNode: true, - fields: [ - { - name: 'returning', - type: 'JsonReturning', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonReturning', - isNode: true, - fields: [ - { - name: 'format', - type: 'JsonFormat', - isArray: false, - optional: true - }, - { - name: 'typid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'JsonValueExpr', - isNode: true, - fields: [ - { - name: 'format', - type: 'JsonFormat', - isArray: false, - optional: true - }, - { - name: 'formatted_expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'raw_expr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'List', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'ListenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LoadStmt', - isNode: true, - fields: [ - { - name: 'filename', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockingClause', - isNode: true, - fields: [ - { - name: 'lockedRels', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'LockStmt', - isNode: true, - fields: [ - { - name: 'mode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nowait', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MergeAction', - isNode: true, - fields: [ - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'matched', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'updateColnos', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MergeStmt', - isNode: true, - fields: [ - { - name: 'joinCondition', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'mergeWhenClauses', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'sourceRelation', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'MergeWhenClause', - isNode: true, - fields: [ - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'condition', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'matched', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'values', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'MinMaxExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'minmaxcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'minmaxtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'MinMaxOp', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'MultiAssignRef', - isNode: true, - fields: [ - { - name: 'colno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'ncolumns', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'source', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NamedArgExpr', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argnumber', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NextValueExpr', - isNode: true, - fields: [ - { - name: 'seqid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NotifyStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'payload', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'NullIfExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'NullTest', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'argisrow', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'nulltesttype', - type: 'NullTestType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ObjectWithArgs', - isNode: true, - fields: [ - { - name: 'args_unspecified', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'objargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objfuncargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'objname', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OidList', - isNode: true, - fields: [ - { - name: 'items', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'OnConflictClause', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'infer', - type: 'InferClause', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OnConflictExpr', - isNode: true, - fields: [ - { - name: 'action', - type: 'OnConflictAction', - isArray: false, - optional: true - }, - { - name: 'arbiterElems', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'arbiterWhere', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'constraint', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'exclRelIndex', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'exclRelTlist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictSet', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'onConflictWhere', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'OpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opresulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'opretset', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Param', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramid', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'paramkind', - type: 'ParamKind', - isArray: false, - optional: true - }, - { - name: 'paramtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'paramtypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParamRef', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'number', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ParseResult', - isNode: false, - fields: [ - { - name: 'stmts', - type: 'RawStmt', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionBoundSpec', - isNode: true, - fields: [ - { - name: 'is_default', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'listdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'lowerdatums', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'modulus', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'remainder', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'strategy', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'upperdatums', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionCmd', - isNode: true, - fields: [ - { - name: 'bound', - type: 'PartitionBoundSpec', - isArray: false, - optional: true - }, - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionElem', - isNode: true, - fields: [ - { - name: 'collation', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'opclass', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'PartitionRangeDatum', - isNode: true, - fields: [ - { - name: 'kind', - type: 'PartitionRangeDatumKind', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'value', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'PartitionSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'partParams', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'strategy', - type: 'PartitionStrategy', - isArray: false, - optional: true - } - ] - }, - { - name: 'PLAssignStmt', - isNode: true, - fields: [ - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'nnames', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'SelectStmt', - isArray: false, - optional: true - } - ] - }, - { - name: 'PrepareStmt', - isNode: true, - fields: [ - { - name: 'argtypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'PublicationObjSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'pubobjtype', - type: 'PublicationObjSpecType', - isArray: false, - optional: true - }, - { - name: 'pubtable', - type: 'PublicationTable', - isArray: false, - optional: true - } - ] - }, - { - name: 'PublicationTable', - isNode: true, - fields: [ - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'Query', - isNode: true, - fields: [ - { - name: 'canSetTag', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'commandType', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'constraintDeps', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'cteList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupDistinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'groupingSets', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'hasAggs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasDistinctOn', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasForUpdate', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasModifyingCTE', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRecursive', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasRowSecurity', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasSubLinks', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasTargetSRFs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'hasWindowFuncs', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'havingQual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'isReturn', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'jointree', - type: 'FromExpr', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'mergeActionList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'mergeUseOuterJoin', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'onConflict', - type: 'OnConflictExpr', - isArray: false, - optional: true - }, - { - name: 'override', - type: 'OverridingKind', - isArray: false, - optional: true - }, - { - name: 'querySource', - type: 'QuerySource', - isArray: false, - optional: true - }, - { - name: 'resultRelation', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowMarks', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rtable', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rteperminfos', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'setOperations', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'utilityStmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withCheckOptions', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeFunction', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'coldeflist', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_rowsfrom', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'ordinality', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeSubselect', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFunc', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'columns', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'namespaces', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableFuncCol', - isNode: true, - fields: [ - { - name: 'coldefexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'colname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'for_ordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'is_not_null', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTableSample', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'method', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeTblEntry', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ctelevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ctename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'enrtuples', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'eref', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'funcordinality', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'functions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inFromCl', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'join_using_alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'joinaliasvars', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinleftcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'joinmergedcols', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'joinrightcols', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'jointype', - type: 'JoinType', - isArray: false, - optional: true - }, - { - name: 'lateral', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'perminfoindex', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relkind', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'rellockmode', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rtekind', - type: 'RTEKind', - isArray: false, - optional: true - }, - { - name: 'security_barrier', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'securityQuals', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'self_reference', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'subquery', - type: 'Query', - isArray: false, - optional: true - }, - { - name: 'tablefunc', - type: 'TableFunc', - isArray: false, - optional: true - }, - { - name: 'tablesample', - type: 'TableSampleClause', - isArray: false, - optional: true - }, - { - name: 'values_lists', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblFunction', - isNode: true, - fields: [ - { - name: 'funccolcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccolcount', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'funccolnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funccoltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'funcexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'funcparams', - type: 'uint64', - isArray: true, - optional: true - } - ] - }, - { - name: 'RangeTblRef', - isNode: true, - fields: [ - { - name: 'rtindex', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'RangeVar', - isNode: true, - fields: [ - { - name: 'alias', - type: 'Alias', - isArray: false, - optional: true - }, - { - name: 'catalogname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'relpersistence', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'schemaname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'RawStmt', - isNode: true, - fields: [ - { - name: 'stmt', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'stmt_len', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'stmt_location', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReassignOwnedStmt', - isNode: true, - fields: [ - { - name: 'newrole', - type: 'RoleSpec', - isArray: false, - optional: true - }, - { - name: 'roles', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'RefreshMatViewStmt', - isNode: true, - fields: [ - { - name: 'concurrent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'skipData', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReindexStmt', - isNode: true, - fields: [ - { - name: 'kind', - type: 'ReindexObjectType', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'params', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - } - ] - }, - { - name: 'RelabelType', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'relabelformat', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'resultcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'resulttypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RenameStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'missing_ok', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'newname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'renameType', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'subname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReplicaIdentityStmt', - isNode: true, - fields: [ - { - name: 'identity_type', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ResTarget', - isNode: true, - fields: [ - { - name: 'indirection', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'val', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ReturnStmt', - isNode: true, - fields: [ - { - name: 'returnval', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RoleSpec', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rolename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'roletype', - type: 'RoleSpecType', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowCompareExpr', - isNode: true, - fields: [ - { - name: 'inputcollids', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'largs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opfamilies', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'opnos', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rargs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rctype', - type: 'RowCompareType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'row_format', - type: 'CoercionForm', - isArray: false, - optional: true - }, - { - name: 'row_typeid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'RowMarkClause', - isNode: true, - fields: [ - { - name: 'pushedDown', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rti', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'strength', - type: 'LockClauseStrength', - isArray: false, - optional: true - }, - { - name: 'waitPolicy', - type: 'LockWaitPolicy', - isArray: false, - optional: true - } - ] - }, - { - name: 'RTEPermissionInfo', - isNode: true, - fields: [ - { - name: 'checkAsUser', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inh', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'insertedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'relid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'requiredPerms', - type: 'uint64', - isArray: false, - optional: true - }, - { - name: 'selectedCols', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'updatedCols', - type: 'uint64', - isArray: true, - optional: true - } - ] - }, - { - name: 'RuleStmt', - isNode: true, - fields: [ - { - name: 'actions', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'event', - type: 'CmdType', - isArray: false, - optional: true - }, - { - name: 'instead', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'rulename', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScalarArrayOpExpr', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'opno', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'useOr', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanResult', - isNode: false, - fields: [ - { - name: 'tokens', - type: 'ScanToken', - isArray: true, - optional: true - }, - { - name: 'version', - type: 'int32', - isArray: false, - optional: true - } - ] - }, - { - name: 'ScanToken', - isNode: false, - fields: [ - { - name: 'end', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'keywordKind', - type: 'KeywordKind', - isArray: false, - optional: true - }, - { - name: 'start', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'token', - type: 'Token', - isArray: false, - optional: true - } - ] - }, - { - name: 'SecLabelStmt', - isNode: true, - fields: [ - { - name: 'label', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'object', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'objtype', - type: 'ObjectType', - isArray: false, - optional: true - }, - { - name: 'provider', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SelectStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'distinctClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupDistinct', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'havingClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'intoClause', - type: 'IntoClause', - isArray: false, - optional: true - }, - { - name: 'larg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'limitCount', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'limitOption', - type: 'LimitOption', - isArray: false, - optional: true - }, - { - name: 'lockingClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'SelectStmt', - isArray: false, - optional: true - }, - { - name: 'sortClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'valuesLists', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'windowClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetOperationStmt', - isNode: true, - fields: [ - { - name: 'all', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'colCollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colTypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'groupClauses', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'larg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SetOperation', - isArray: false, - optional: true - }, - { - name: 'rarg', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SetToDefault', - isNode: true, - fields: [ - { - name: 'collation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeId', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typeMod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SortBy', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'node', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'sortby_dir', - type: 'SortByDir', - isArray: false, - optional: true - }, - { - name: 'sortby_nulls', - type: 'SortByNulls', - isArray: false, - optional: true - }, - { - name: 'useOp', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'SortGroupClause', - isNode: true, - fields: [ - { - name: 'eqop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'hashable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'nulls_first', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'sortop', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'tleSortGroupRef', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'SQLValueFunction', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'op', - type: 'SQLValueFunctionOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'StatsElem', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'String', - isNode: true, - fields: [ - { - name: 'sval', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubLink', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'operName', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'subLinkId', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'subselect', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubPlan', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'firstColCollation', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColType', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'firstColTypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'parallel_safe', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'paramIds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'parParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'per_call_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'plan_id', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'plan_name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'setParam', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'startup_cost', - type: 'double', - isArray: false, - optional: true - }, - { - name: 'subLinkType', - type: 'SubLinkType', - isArray: false, - optional: true - }, - { - name: 'testexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'unknownEqFalse', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'useHashTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'SubscriptingRef', - isNode: true, - fields: [ - { - name: 'refassgnexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'refcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refcontainertype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refelemtype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'refexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'reflowerindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refrestype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'reftypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'refupperindexpr', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableFunc', - isNode: true, - fields: [ - { - name: 'colcollations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coldefexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colexprs', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'colnames', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'coltypmods', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'docexpr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'notnulls', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'ns_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ns_uris', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'ordinalitycol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'rowexpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableLikeClause', - isNode: true, - fields: [ - { - name: 'options', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'relationOid', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TableSampleClause', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'repeatable', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'tsmhandler', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'TargetEntry', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'resjunk', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'resname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'resno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigcol', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'resorigtbl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'ressortgroupref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'TransactionStmt', - isNode: true, - fields: [ - { - name: 'chain', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'gid', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'TransactionStmtKind', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'savepoint_name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TriggerTransition', - isNode: true, - fields: [ - { - name: 'isNew', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'isTable', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'TruncateStmt', - isNode: true, - fields: [ - { - name: 'behavior', - type: 'DropBehavior', - isArray: false, - optional: true - }, - { - name: 'relations', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'restart_seqs', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeCast', - isNode: true, - fields: [ - { - name: 'arg', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - } - ] - }, - { - name: 'TypeName', - isNode: true, - fields: [ - { - name: 'arrayBounds', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'pct_type', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'setof', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'typemod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeOid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmods', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'UnlistenStmt', - isNode: true, - fields: [ - { - name: 'conditionname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'UpdateStmt', - isNode: true, - fields: [ - { - name: 'fromClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'returningList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'targetList', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'whereClause', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'withClause', - type: 'WithClause', - isArray: false, - optional: true - } - ] - }, - { - name: 'VacuumRelation', - isNode: true, - fields: [ - { - name: 'oid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'relation', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'va_cols', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'VacuumStmt', - isNode: true, - fields: [ - { - name: 'is_vacuumcmd', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'rels', - type: 'Node', - isArray: true, - optional: true - } - ] - }, - { - name: 'Var', - isNode: true, - fields: [ - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varattno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varlevelsup', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'varno', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'varnullingrels', - type: 'uint64', - isArray: true, - optional: true - }, - { - name: 'vartype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'vartypmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableSetStmt', - isNode: true, - fields: [ - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'is_local', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'VariableSetKind', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'VariableShowStmt', - isNode: true, - fields: [ - { - name: 'name', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'ViewStmt', - isNode: true, - fields: [ - { - name: 'aliases', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'options', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'query', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'replace', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'view', - type: 'RangeVar', - isArray: false, - optional: true - }, - { - name: 'withCheckOption', - type: 'ViewCheckOption', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowClause', - isNode: true, - fields: [ - { - name: 'copiedOrder', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'endInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'inRangeAsc', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'inRangeColl', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'inRangeNullsFirst', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'runCondition', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'startInRangeFunc', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowDef', - isNode: true, - fields: [ - { - name: 'endOffset', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'frameOptions', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'orderClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'partitionClause', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'refname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'startOffset', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WindowFunc', - isNode: true, - fields: [ - { - name: 'aggfilter', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'inputcollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'winagg', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wincollid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winfnoid', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winref', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'winstar', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'wintype', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithCheckOption', - isNode: true, - fields: [ - { - name: 'cascaded', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'kind', - type: 'WCOKind', - isArray: false, - optional: true - }, - { - name: 'polname', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'qual', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'relname', - type: 'string', - isArray: false, - optional: true - } - ] - }, - { - name: 'WithClause', - isNode: true, - fields: [ - { - name: 'ctes', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'recursive', - type: 'bool', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlExpr', - isNode: true, - fields: [ - { - name: 'arg_names', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'indent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'name', - type: 'string', - isArray: false, - optional: true - }, - { - name: 'named_args', - type: 'Node', - isArray: true, - optional: true - }, - { - name: 'op', - type: 'XmlExprOp', - isArray: false, - optional: true - }, - { - name: 'type', - type: 'uint32', - isArray: false, - optional: true - }, - { - name: 'typmod', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - }, - { - name: 'xpr', - type: 'Node', - isArray: false, - optional: true - } - ] - }, - { - name: 'XmlSerialize', - isNode: true, - fields: [ - { - name: 'expr', - type: 'Node', - isArray: false, - optional: true - }, - { - name: 'indent', - type: 'bool', - isArray: false, - optional: true - }, - { - name: 'location', - type: 'int32', - isArray: false, - optional: true - }, - { - name: 'typeName', - type: 'TypeName', - isArray: false, - optional: true - }, - { - name: 'xmloption', - type: 'XmlOptionType', - isArray: false, - optional: true - } - ] - } -]; \ No newline at end of file diff --git a/packages/transform/src/17/enum-to-int.ts b/packages/transform/src/17/enum-to-int.ts deleted file mode 100644 index 8ad14906..00000000 --- a/packages/transform/src/17/enum-to-int.ts +++ /dev/null @@ -1,2503 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionStrategy" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "JsonQuotes" | "JsonTableColumnType" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "PublicationObjSpecType" | "AlterPublicationAction" | "AlterSubscriptionType" | "OverridingKind" | "OnCommitAction" | "TableFuncType" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "JsonEncoding" | "JsonFormatType" | "JsonConstructorType" | "JsonValueType" | "JsonWrapper" | "JsonBehaviorType" | "JsonExprOp" | "NullTestType" | "BoolTestType" | "MergeMatchKind" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumInt = (enumType: EnumType, key: string): number => { - switch (enumType) { - case "QuerySource": - { - switch (key) { - case "QSRC_ORIGINAL": - return 0; - case "QSRC_PARSER": - return 1; - case "QSRC_INSTEAD_RULE": - return 2; - case "QSRC_QUAL_INSTEAD_RULE": - return 3; - case "QSRC_NON_INSTEAD_RULE": - return 4; - default: - throw new Error("Key not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case "SORTBY_DEFAULT": - return 0; - case "SORTBY_ASC": - return 1; - case "SORTBY_DESC": - return 2; - case "SORTBY_USING": - return 3; - default: - throw new Error("Key not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case "SORTBY_NULLS_DEFAULT": - return 0; - case "SORTBY_NULLS_FIRST": - return 1; - case "SORTBY_NULLS_LAST": - return 2; - default: - throw new Error("Key not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case "SET_QUANTIFIER_DEFAULT": - return 0; - case "SET_QUANTIFIER_ALL": - return 1; - case "SET_QUANTIFIER_DISTINCT": - return 2; - default: - throw new Error("Key not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case "AEXPR_OP": - return 0; - case "AEXPR_OP_ANY": - return 1; - case "AEXPR_OP_ALL": - return 2; - case "AEXPR_DISTINCT": - return 3; - case "AEXPR_NOT_DISTINCT": - return 4; - case "AEXPR_NULLIF": - return 5; - case "AEXPR_IN": - return 6; - case "AEXPR_LIKE": - return 7; - case "AEXPR_ILIKE": - return 8; - case "AEXPR_SIMILAR": - return 9; - case "AEXPR_BETWEEN": - return 10; - case "AEXPR_NOT_BETWEEN": - return 11; - case "AEXPR_BETWEEN_SYM": - return 12; - case "AEXPR_NOT_BETWEEN_SYM": - return 13; - default: - throw new Error("Key not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case "ROLESPEC_CSTRING": - return 0; - case "ROLESPEC_CURRENT_ROLE": - return 1; - case "ROLESPEC_CURRENT_USER": - return 2; - case "ROLESPEC_SESSION_USER": - return 3; - case "ROLESPEC_PUBLIC": - return 4; - default: - throw new Error("Key not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case "CREATE_TABLE_LIKE_COMMENTS": - return 0; - case "CREATE_TABLE_LIKE_COMPRESSION": - return 1; - case "CREATE_TABLE_LIKE_CONSTRAINTS": - return 2; - case "CREATE_TABLE_LIKE_DEFAULTS": - return 3; - case "CREATE_TABLE_LIKE_GENERATED": - return 4; - case "CREATE_TABLE_LIKE_IDENTITY": - return 5; - case "CREATE_TABLE_LIKE_INDEXES": - return 6; - case "CREATE_TABLE_LIKE_STATISTICS": - return 7; - case "CREATE_TABLE_LIKE_STORAGE": - return 8; - case "CREATE_TABLE_LIKE_ALL": - return 9; - default: - throw new Error("Key not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case "DEFELEM_UNSPEC": - return 0; - case "DEFELEM_SET": - return 1; - case "DEFELEM_ADD": - return 2; - case "DEFELEM_DROP": - return 3; - default: - throw new Error("Key not recognized in enum DefElemAction"); - } - } - case "PartitionStrategy": - { - switch (key) { - case "PARTITION_STRATEGY_LIST": - return 0; - case "PARTITION_STRATEGY_RANGE": - return 1; - case "PARTITION_STRATEGY_HASH": - return 2; - default: - throw new Error("Key not recognized in enum PartitionStrategy"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case "PARTITION_RANGE_DATUM_MINVALUE": - return 0; - case "PARTITION_RANGE_DATUM_VALUE": - return 1; - case "PARTITION_RANGE_DATUM_MAXVALUE": - return 2; - default: - throw new Error("Key not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case "RTE_RELATION": - return 0; - case "RTE_SUBQUERY": - return 1; - case "RTE_JOIN": - return 2; - case "RTE_FUNCTION": - return 3; - case "RTE_TABLEFUNC": - return 4; - case "RTE_VALUES": - return 5; - case "RTE_CTE": - return 6; - case "RTE_NAMEDTUPLESTORE": - return 7; - case "RTE_RESULT": - return 8; - default: - throw new Error("Key not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case "WCO_VIEW_CHECK": - return 0; - case "WCO_RLS_INSERT_CHECK": - return 1; - case "WCO_RLS_UPDATE_CHECK": - return 2; - case "WCO_RLS_CONFLICT_CHECK": - return 3; - case "WCO_RLS_MERGE_UPDATE_CHECK": - return 4; - case "WCO_RLS_MERGE_DELETE_CHECK": - return 5; - default: - throw new Error("Key not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case "GROUPING_SET_EMPTY": - return 0; - case "GROUPING_SET_SIMPLE": - return 1; - case "GROUPING_SET_ROLLUP": - return 2; - case "GROUPING_SET_CUBE": - return 3; - case "GROUPING_SET_SETS": - return 4; - default: - throw new Error("Key not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case "CTEMaterializeDefault": - return 0; - case "CTEMaterializeAlways": - return 1; - case "CTEMaterializeNever": - return 2; - default: - throw new Error("Key not recognized in enum CTEMaterialize"); - } - } - case "JsonQuotes": - { - switch (key) { - case "JS_QUOTES_UNSPEC": - return 0; - case "JS_QUOTES_KEEP": - return 1; - case "JS_QUOTES_OMIT": - return 2; - default: - throw new Error("Key not recognized in enum JsonQuotes"); - } - } - case "JsonTableColumnType": - { - switch (key) { - case "JTC_FOR_ORDINALITY": - return 0; - case "JTC_REGULAR": - return 1; - case "JTC_EXISTS": - return 2; - case "JTC_FORMATTED": - return 3; - case "JTC_NESTED": - return 4; - default: - throw new Error("Key not recognized in enum JsonTableColumnType"); - } - } - case "SetOperation": - { - switch (key) { - case "SETOP_NONE": - return 0; - case "SETOP_UNION": - return 1; - case "SETOP_INTERSECT": - return 2; - case "SETOP_EXCEPT": - return 3; - default: - throw new Error("Key not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case "OBJECT_ACCESS_METHOD": - return 0; - case "OBJECT_AGGREGATE": - return 1; - case "OBJECT_AMOP": - return 2; - case "OBJECT_AMPROC": - return 3; - case "OBJECT_ATTRIBUTE": - return 4; - case "OBJECT_CAST": - return 5; - case "OBJECT_COLUMN": - return 6; - case "OBJECT_COLLATION": - return 7; - case "OBJECT_CONVERSION": - return 8; - case "OBJECT_DATABASE": - return 9; - case "OBJECT_DEFAULT": - return 10; - case "OBJECT_DEFACL": - return 11; - case "OBJECT_DOMAIN": - return 12; - case "OBJECT_DOMCONSTRAINT": - return 13; - case "OBJECT_EVENT_TRIGGER": - return 14; - case "OBJECT_EXTENSION": - return 15; - case "OBJECT_FDW": - return 16; - case "OBJECT_FOREIGN_SERVER": - return 17; - case "OBJECT_FOREIGN_TABLE": - return 18; - case "OBJECT_FUNCTION": - return 19; - case "OBJECT_INDEX": - return 20; - case "OBJECT_LANGUAGE": - return 21; - case "OBJECT_LARGEOBJECT": - return 22; - case "OBJECT_MATVIEW": - return 23; - case "OBJECT_OPCLASS": - return 24; - case "OBJECT_OPERATOR": - return 25; - case "OBJECT_OPFAMILY": - return 26; - case "OBJECT_PARAMETER_ACL": - return 27; - case "OBJECT_POLICY": - return 28; - case "OBJECT_PROCEDURE": - return 29; - case "OBJECT_PUBLICATION": - return 30; - case "OBJECT_PUBLICATION_NAMESPACE": - return 31; - case "OBJECT_PUBLICATION_REL": - return 32; - case "OBJECT_ROLE": - return 33; - case "OBJECT_ROUTINE": - return 34; - case "OBJECT_RULE": - return 35; - case "OBJECT_SCHEMA": - return 36; - case "OBJECT_SEQUENCE": - return 37; - case "OBJECT_SUBSCRIPTION": - return 38; - case "OBJECT_STATISTIC_EXT": - return 39; - case "OBJECT_TABCONSTRAINT": - return 40; - case "OBJECT_TABLE": - return 41; - case "OBJECT_TABLESPACE": - return 42; - case "OBJECT_TRANSFORM": - return 43; - case "OBJECT_TRIGGER": - return 44; - case "OBJECT_TSCONFIGURATION": - return 45; - case "OBJECT_TSDICTIONARY": - return 46; - case "OBJECT_TSPARSER": - return 47; - case "OBJECT_TSTEMPLATE": - return 48; - case "OBJECT_TYPE": - return 49; - case "OBJECT_USER_MAPPING": - return 50; - case "OBJECT_VIEW": - return 51; - default: - throw new Error("Key not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case "DROP_RESTRICT": - return 0; - case "DROP_CASCADE": - return 1; - default: - throw new Error("Key not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case "AT_AddColumn": - return 0; - case "AT_AddColumnToView": - return 1; - case "AT_ColumnDefault": - return 2; - case "AT_CookedColumnDefault": - return 3; - case "AT_DropNotNull": - return 4; - case "AT_SetNotNull": - return 5; - case "AT_SetExpression": - return 6; - case "AT_DropExpression": - return 7; - case "AT_CheckNotNull": - return 8; - case "AT_SetStatistics": - return 9; - case "AT_SetOptions": - return 10; - case "AT_ResetOptions": - return 11; - case "AT_SetStorage": - return 12; - case "AT_SetCompression": - return 13; - case "AT_DropColumn": - return 14; - case "AT_AddIndex": - return 15; - case "AT_ReAddIndex": - return 16; - case "AT_AddConstraint": - return 17; - case "AT_ReAddConstraint": - return 18; - case "AT_ReAddDomainConstraint": - return 19; - case "AT_AlterConstraint": - return 20; - case "AT_ValidateConstraint": - return 21; - case "AT_AddIndexConstraint": - return 22; - case "AT_DropConstraint": - return 23; - case "AT_ReAddComment": - return 24; - case "AT_AlterColumnType": - return 25; - case "AT_AlterColumnGenericOptions": - return 26; - case "AT_ChangeOwner": - return 27; - case "AT_ClusterOn": - return 28; - case "AT_DropCluster": - return 29; - case "AT_SetLogged": - return 30; - case "AT_SetUnLogged": - return 31; - case "AT_DropOids": - return 32; - case "AT_SetAccessMethod": - return 33; - case "AT_SetTableSpace": - return 34; - case "AT_SetRelOptions": - return 35; - case "AT_ResetRelOptions": - return 36; - case "AT_ReplaceRelOptions": - return 37; - case "AT_EnableTrig": - return 38; - case "AT_EnableAlwaysTrig": - return 39; - case "AT_EnableReplicaTrig": - return 40; - case "AT_DisableTrig": - return 41; - case "AT_EnableTrigAll": - return 42; - case "AT_DisableTrigAll": - return 43; - case "AT_EnableTrigUser": - return 44; - case "AT_DisableTrigUser": - return 45; - case "AT_EnableRule": - return 46; - case "AT_EnableAlwaysRule": - return 47; - case "AT_EnableReplicaRule": - return 48; - case "AT_DisableRule": - return 49; - case "AT_AddInherit": - return 50; - case "AT_DropInherit": - return 51; - case "AT_AddOf": - return 52; - case "AT_DropOf": - return 53; - case "AT_ReplicaIdentity": - return 54; - case "AT_EnableRowSecurity": - return 55; - case "AT_DisableRowSecurity": - return 56; - case "AT_ForceRowSecurity": - return 57; - case "AT_NoForceRowSecurity": - return 58; - case "AT_GenericOptions": - return 59; - case "AT_AttachPartition": - return 60; - case "AT_DetachPartition": - return 61; - case "AT_DetachPartitionFinalize": - return 62; - case "AT_AddIdentity": - return 63; - case "AT_SetIdentity": - return 64; - case "AT_DropIdentity": - return 65; - case "AT_ReAddStatistics": - return 66; - default: - throw new Error("Key not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case "ACL_TARGET_OBJECT": - return 0; - case "ACL_TARGET_ALL_IN_SCHEMA": - return 1; - case "ACL_TARGET_DEFAULTS": - return 2; - default: - throw new Error("Key not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case "VAR_SET_VALUE": - return 0; - case "VAR_SET_DEFAULT": - return 1; - case "VAR_SET_CURRENT": - return 2; - case "VAR_SET_MULTI": - return 3; - case "VAR_RESET": - return 4; - case "VAR_RESET_ALL": - return 5; - default: - throw new Error("Key not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case "CONSTR_NULL": - return 0; - case "CONSTR_NOTNULL": - return 1; - case "CONSTR_DEFAULT": - return 2; - case "CONSTR_IDENTITY": - return 3; - case "CONSTR_GENERATED": - return 4; - case "CONSTR_CHECK": - return 5; - case "CONSTR_PRIMARY": - return 6; - case "CONSTR_UNIQUE": - return 7; - case "CONSTR_EXCLUSION": - return 8; - case "CONSTR_FOREIGN": - return 9; - case "CONSTR_ATTR_DEFERRABLE": - return 10; - case "CONSTR_ATTR_NOT_DEFERRABLE": - return 11; - case "CONSTR_ATTR_DEFERRED": - return 12; - case "CONSTR_ATTR_IMMEDIATE": - return 13; - default: - throw new Error("Key not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case "FDW_IMPORT_SCHEMA_ALL": - return 0; - case "FDW_IMPORT_SCHEMA_LIMIT_TO": - return 1; - case "FDW_IMPORT_SCHEMA_EXCEPT": - return 2; - default: - throw new Error("Key not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case "ROLESTMT_ROLE": - return 0; - case "ROLESTMT_USER": - return 1; - case "ROLESTMT_GROUP": - return 2; - default: - throw new Error("Key not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case "FETCH_FORWARD": - return 0; - case "FETCH_BACKWARD": - return 1; - case "FETCH_ABSOLUTE": - return 2; - case "FETCH_RELATIVE": - return 3; - default: - throw new Error("Key not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case "FUNC_PARAM_IN": - return 0; - case "FUNC_PARAM_OUT": - return 1; - case "FUNC_PARAM_INOUT": - return 2; - case "FUNC_PARAM_VARIADIC": - return 3; - case "FUNC_PARAM_TABLE": - return 4; - case "FUNC_PARAM_DEFAULT": - return 5; - default: - throw new Error("Key not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case "TRANS_STMT_BEGIN": - return 0; - case "TRANS_STMT_START": - return 1; - case "TRANS_STMT_COMMIT": - return 2; - case "TRANS_STMT_ROLLBACK": - return 3; - case "TRANS_STMT_SAVEPOINT": - return 4; - case "TRANS_STMT_RELEASE": - return 5; - case "TRANS_STMT_ROLLBACK_TO": - return 6; - case "TRANS_STMT_PREPARE": - return 7; - case "TRANS_STMT_COMMIT_PREPARED": - return 8; - case "TRANS_STMT_ROLLBACK_PREPARED": - return 9; - default: - throw new Error("Key not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case "NO_CHECK_OPTION": - return 0; - case "LOCAL_CHECK_OPTION": - return 1; - case "CASCADED_CHECK_OPTION": - return 2; - default: - throw new Error("Key not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case "DISCARD_ALL": - return 0; - case "DISCARD_PLANS": - return 1; - case "DISCARD_SEQUENCES": - return 2; - case "DISCARD_TEMP": - return 3; - default: - throw new Error("Key not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case "REINDEX_OBJECT_INDEX": - return 0; - case "REINDEX_OBJECT_TABLE": - return 1; - case "REINDEX_OBJECT_SCHEMA": - return 2; - case "REINDEX_OBJECT_SYSTEM": - return 3; - case "REINDEX_OBJECT_DATABASE": - return 4; - default: - throw new Error("Key not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case "ALTER_TSCONFIG_ADD_MAPPING": - return 0; - case "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN": - return 1; - case "ALTER_TSCONFIG_REPLACE_DICT": - return 2; - case "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN": - return 3; - case "ALTER_TSCONFIG_DROP_MAPPING": - return 4; - default: - throw new Error("Key not recognized in enum AlterTSConfigType"); - } - } - case "PublicationObjSpecType": - { - switch (key) { - case "PUBLICATIONOBJ_TABLE": - return 0; - case "PUBLICATIONOBJ_TABLES_IN_SCHEMA": - return 1; - case "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA": - return 2; - case "PUBLICATIONOBJ_CONTINUATION": - return 3; - default: - throw new Error("Key not recognized in enum PublicationObjSpecType"); - } - } - case "AlterPublicationAction": - { - switch (key) { - case "AP_AddObjects": - return 0; - case "AP_DropObjects": - return 1; - case "AP_SetObjects": - return 2; - default: - throw new Error("Key not recognized in enum AlterPublicationAction"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case "ALTER_SUBSCRIPTION_OPTIONS": - return 0; - case "ALTER_SUBSCRIPTION_CONNECTION": - return 1; - case "ALTER_SUBSCRIPTION_SET_PUBLICATION": - return 2; - case "ALTER_SUBSCRIPTION_ADD_PUBLICATION": - return 3; - case "ALTER_SUBSCRIPTION_DROP_PUBLICATION": - return 4; - case "ALTER_SUBSCRIPTION_REFRESH": - return 5; - case "ALTER_SUBSCRIPTION_ENABLED": - return 6; - case "ALTER_SUBSCRIPTION_SKIP": - return 7; - default: - throw new Error("Key not recognized in enum AlterSubscriptionType"); - } - } - case "OverridingKind": - { - switch (key) { - case "OVERRIDING_NOT_SET": - return 0; - case "OVERRIDING_USER_VALUE": - return 1; - case "OVERRIDING_SYSTEM_VALUE": - return 2; - default: - throw new Error("Key not recognized in enum OverridingKind"); - } - } - case "OnCommitAction": - { - switch (key) { - case "ONCOMMIT_NOOP": - return 0; - case "ONCOMMIT_PRESERVE_ROWS": - return 1; - case "ONCOMMIT_DELETE_ROWS": - return 2; - case "ONCOMMIT_DROP": - return 3; - default: - throw new Error("Key not recognized in enum OnCommitAction"); - } - } - case "TableFuncType": - { - switch (key) { - case "TFT_XMLTABLE": - return 0; - case "TFT_JSON_TABLE": - return 1; - default: - throw new Error("Key not recognized in enum TableFuncType"); - } - } - case "ParamKind": - { - switch (key) { - case "PARAM_EXTERN": - return 0; - case "PARAM_EXEC": - return 1; - case "PARAM_SUBLINK": - return 2; - case "PARAM_MULTIEXPR": - return 3; - default: - throw new Error("Key not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case "COERCION_IMPLICIT": - return 0; - case "COERCION_ASSIGNMENT": - return 1; - case "COERCION_PLPGSQL": - return 2; - case "COERCION_EXPLICIT": - return 3; - default: - throw new Error("Key not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case "COERCE_EXPLICIT_CALL": - return 0; - case "COERCE_EXPLICIT_CAST": - return 1; - case "COERCE_IMPLICIT_CAST": - return 2; - case "COERCE_SQL_SYNTAX": - return 3; - default: - throw new Error("Key not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case "AND_EXPR": - return 0; - case "OR_EXPR": - return 1; - case "NOT_EXPR": - return 2; - default: - throw new Error("Key not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case "EXISTS_SUBLINK": - return 0; - case "ALL_SUBLINK": - return 1; - case "ANY_SUBLINK": - return 2; - case "ROWCOMPARE_SUBLINK": - return 3; - case "EXPR_SUBLINK": - return 4; - case "MULTIEXPR_SUBLINK": - return 5; - case "ARRAY_SUBLINK": - return 6; - case "CTE_SUBLINK": - return 7; - default: - throw new Error("Key not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case "ROWCOMPARE_LT": - return 0; - case "ROWCOMPARE_LE": - return 1; - case "ROWCOMPARE_EQ": - return 2; - case "ROWCOMPARE_GE": - return 3; - case "ROWCOMPARE_GT": - return 4; - case "ROWCOMPARE_NE": - return 5; - default: - throw new Error("Key not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case "IS_GREATEST": - return 0; - case "IS_LEAST": - return 1; - default: - throw new Error("Key not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case "SVFOP_CURRENT_DATE": - return 0; - case "SVFOP_CURRENT_TIME": - return 1; - case "SVFOP_CURRENT_TIME_N": - return 2; - case "SVFOP_CURRENT_TIMESTAMP": - return 3; - case "SVFOP_CURRENT_TIMESTAMP_N": - return 4; - case "SVFOP_LOCALTIME": - return 5; - case "SVFOP_LOCALTIME_N": - return 6; - case "SVFOP_LOCALTIMESTAMP": - return 7; - case "SVFOP_LOCALTIMESTAMP_N": - return 8; - case "SVFOP_CURRENT_ROLE": - return 9; - case "SVFOP_CURRENT_USER": - return 10; - case "SVFOP_USER": - return 11; - case "SVFOP_SESSION_USER": - return 12; - case "SVFOP_CURRENT_CATALOG": - return 13; - case "SVFOP_CURRENT_SCHEMA": - return 14; - default: - throw new Error("Key not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case "IS_XMLCONCAT": - return 0; - case "IS_XMLELEMENT": - return 1; - case "IS_XMLFOREST": - return 2; - case "IS_XMLPARSE": - return 3; - case "IS_XMLPI": - return 4; - case "IS_XMLROOT": - return 5; - case "IS_XMLSERIALIZE": - return 6; - case "IS_DOCUMENT": - return 7; - default: - throw new Error("Key not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case "XMLOPTION_DOCUMENT": - return 0; - case "XMLOPTION_CONTENT": - return 1; - default: - throw new Error("Key not recognized in enum XmlOptionType"); - } - } - case "JsonEncoding": - { - switch (key) { - case "JS_ENC_DEFAULT": - return 0; - case "JS_ENC_UTF8": - return 1; - case "JS_ENC_UTF16": - return 2; - case "JS_ENC_UTF32": - return 3; - default: - throw new Error("Key not recognized in enum JsonEncoding"); - } - } - case "JsonFormatType": - { - switch (key) { - case "JS_FORMAT_DEFAULT": - return 0; - case "JS_FORMAT_JSON": - return 1; - case "JS_FORMAT_JSONB": - return 2; - default: - throw new Error("Key not recognized in enum JsonFormatType"); - } - } - case "JsonConstructorType": - { - switch (key) { - case "JSCTOR_JSON_OBJECT": - return 0; - case "JSCTOR_JSON_ARRAY": - return 1; - case "JSCTOR_JSON_OBJECTAGG": - return 2; - case "JSCTOR_JSON_ARRAYAGG": - return 3; - case "JSCTOR_JSON_PARSE": - return 4; - case "JSCTOR_JSON_SCALAR": - return 5; - case "JSCTOR_JSON_SERIALIZE": - return 6; - default: - throw new Error("Key not recognized in enum JsonConstructorType"); - } - } - case "JsonValueType": - { - switch (key) { - case "JS_TYPE_ANY": - return 0; - case "JS_TYPE_OBJECT": - return 1; - case "JS_TYPE_ARRAY": - return 2; - case "JS_TYPE_SCALAR": - return 3; - default: - throw new Error("Key not recognized in enum JsonValueType"); - } - } - case "JsonWrapper": - { - switch (key) { - case "JSW_UNSPEC": - return 0; - case "JSW_NONE": - return 1; - case "JSW_CONDITIONAL": - return 2; - case "JSW_UNCONDITIONAL": - return 3; - default: - throw new Error("Key not recognized in enum JsonWrapper"); - } - } - case "JsonBehaviorType": - { - switch (key) { - case "JSON_BEHAVIOR_NULL": - return 0; - case "JSON_BEHAVIOR_ERROR": - return 1; - case "JSON_BEHAVIOR_EMPTY": - return 2; - case "JSON_BEHAVIOR_TRUE": - return 3; - case "JSON_BEHAVIOR_FALSE": - return 4; - case "JSON_BEHAVIOR_UNKNOWN": - return 5; - case "JSON_BEHAVIOR_EMPTY_ARRAY": - return 6; - case "JSON_BEHAVIOR_EMPTY_OBJECT": - return 7; - case "JSON_BEHAVIOR_DEFAULT": - return 8; - default: - throw new Error("Key not recognized in enum JsonBehaviorType"); - } - } - case "JsonExprOp": - { - switch (key) { - case "JSON_EXISTS_OP": - return 0; - case "JSON_QUERY_OP": - return 1; - case "JSON_VALUE_OP": - return 2; - case "JSON_TABLE_OP": - return 3; - default: - throw new Error("Key not recognized in enum JsonExprOp"); - } - } - case "NullTestType": - { - switch (key) { - case "IS_NULL": - return 0; - case "IS_NOT_NULL": - return 1; - default: - throw new Error("Key not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case "IS_TRUE": - return 0; - case "IS_NOT_TRUE": - return 1; - case "IS_FALSE": - return 2; - case "IS_NOT_FALSE": - return 3; - case "IS_UNKNOWN": - return 4; - case "IS_NOT_UNKNOWN": - return 5; - default: - throw new Error("Key not recognized in enum BoolTestType"); - } - } - case "MergeMatchKind": - { - switch (key) { - case "MERGE_WHEN_MATCHED": - return 0; - case "MERGE_WHEN_NOT_MATCHED_BY_SOURCE": - return 1; - case "MERGE_WHEN_NOT_MATCHED_BY_TARGET": - return 2; - default: - throw new Error("Key not recognized in enum MergeMatchKind"); - } - } - case "CmdType": - { - switch (key) { - case "CMD_UNKNOWN": - return 0; - case "CMD_SELECT": - return 1; - case "CMD_UPDATE": - return 2; - case "CMD_INSERT": - return 3; - case "CMD_DELETE": - return 4; - case "CMD_MERGE": - return 5; - case "CMD_UTILITY": - return 6; - case "CMD_NOTHING": - return 7; - default: - throw new Error("Key not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case "JOIN_INNER": - return 0; - case "JOIN_LEFT": - return 1; - case "JOIN_FULL": - return 2; - case "JOIN_RIGHT": - return 3; - case "JOIN_SEMI": - return 4; - case "JOIN_ANTI": - return 5; - case "JOIN_RIGHT_ANTI": - return 6; - case "JOIN_UNIQUE_OUTER": - return 7; - case "JOIN_UNIQUE_INNER": - return 8; - default: - throw new Error("Key not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case "AGG_PLAIN": - return 0; - case "AGG_SORTED": - return 1; - case "AGG_HASHED": - return 2; - case "AGG_MIXED": - return 3; - default: - throw new Error("Key not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case "AGGSPLIT_SIMPLE": - return 0; - case "AGGSPLIT_INITIAL_SERIAL": - return 1; - case "AGGSPLIT_FINAL_DESERIAL": - return 2; - default: - throw new Error("Key not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case "SETOPCMD_INTERSECT": - return 0; - case "SETOPCMD_INTERSECT_ALL": - return 1; - case "SETOPCMD_EXCEPT": - return 2; - case "SETOPCMD_EXCEPT_ALL": - return 3; - default: - throw new Error("Key not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case "SETOP_SORTED": - return 0; - case "SETOP_HASHED": - return 1; - default: - throw new Error("Key not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case "ONCONFLICT_NONE": - return 0; - case "ONCONFLICT_NOTHING": - return 1; - case "ONCONFLICT_UPDATE": - return 2; - default: - throw new Error("Key not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case "LIMIT_OPTION_DEFAULT": - return 0; - case "LIMIT_OPTION_COUNT": - return 1; - case "LIMIT_OPTION_WITH_TIES": - return 2; - default: - throw new Error("Key not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case "LCS_NONE": - return 0; - case "LCS_FORKEYSHARE": - return 1; - case "LCS_FORSHARE": - return 2; - case "LCS_FORNOKEYUPDATE": - return 3; - case "LCS_FORUPDATE": - return 4; - default: - throw new Error("Key not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case "LockWaitBlock": - return 0; - case "LockWaitSkip": - return 1; - case "LockWaitError": - return 2; - default: - throw new Error("Key not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case "LockTupleKeyShare": - return 0; - case "LockTupleShare": - return 1; - case "LockTupleNoKeyExclusive": - return 2; - case "LockTupleExclusive": - return 3; - default: - throw new Error("Key not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case "NO_KEYWORD": - return 0; - case "UNRESERVED_KEYWORD": - return 1; - case "COL_NAME_KEYWORD": - return 2; - case "TYPE_FUNC_NAME_KEYWORD": - return 3; - case "RESERVED_KEYWORD": - return 4; - default: - throw new Error("Key not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case "NUL": - return 0; - case "ASCII_36": - return 36; - case "ASCII_37": - return 37; - case "ASCII_40": - return 40; - case "ASCII_41": - return 41; - case "ASCII_42": - return 42; - case "ASCII_43": - return 43; - case "ASCII_44": - return 44; - case "ASCII_45": - return 45; - case "ASCII_46": - return 46; - case "ASCII_47": - return 47; - case "ASCII_58": - return 58; - case "ASCII_59": - return 59; - case "ASCII_60": - return 60; - case "ASCII_61": - return 61; - case "ASCII_62": - return 62; - case "ASCII_63": - return 63; - case "ASCII_91": - return 91; - case "ASCII_92": - return 92; - case "ASCII_93": - return 93; - case "ASCII_94": - return 94; - case "IDENT": - return 258; - case "UIDENT": - return 259; - case "FCONST": - return 260; - case "SCONST": - return 261; - case "USCONST": - return 262; - case "BCONST": - return 263; - case "XCONST": - return 264; - case "Op": - return 265; - case "ICONST": - return 266; - case "PARAM": - return 267; - case "TYPECAST": - return 268; - case "DOT_DOT": - return 269; - case "COLON_EQUALS": - return 270; - case "EQUALS_GREATER": - return 271; - case "LESS_EQUALS": - return 272; - case "GREATER_EQUALS": - return 273; - case "NOT_EQUALS": - return 274; - case "SQL_COMMENT": - return 275; - case "C_COMMENT": - return 276; - case "ABORT_P": - return 277; - case "ABSENT": - return 278; - case "ABSOLUTE_P": - return 279; - case "ACCESS": - return 280; - case "ACTION": - return 281; - case "ADD_P": - return 282; - case "ADMIN": - return 283; - case "AFTER": - return 284; - case "AGGREGATE": - return 285; - case "ALL": - return 286; - case "ALSO": - return 287; - case "ALTER": - return 288; - case "ALWAYS": - return 289; - case "ANALYSE": - return 290; - case "ANALYZE": - return 291; - case "AND": - return 292; - case "ANY": - return 293; - case "ARRAY": - return 294; - case "AS": - return 295; - case "ASC": - return 296; - case "ASENSITIVE": - return 297; - case "ASSERTION": - return 298; - case "ASSIGNMENT": - return 299; - case "ASYMMETRIC": - return 300; - case "ATOMIC": - return 301; - case "AT": - return 302; - case "ATTACH": - return 303; - case "ATTRIBUTE": - return 304; - case "AUTHORIZATION": - return 305; - case "BACKWARD": - return 306; - case "BEFORE": - return 307; - case "BEGIN_P": - return 308; - case "BETWEEN": - return 309; - case "BIGINT": - return 310; - case "BINARY": - return 311; - case "BIT": - return 312; - case "BOOLEAN_P": - return 313; - case "BOTH": - return 314; - case "BREADTH": - return 315; - case "BY": - return 316; - case "CACHE": - return 317; - case "CALL": - return 318; - case "CALLED": - return 319; - case "CASCADE": - return 320; - case "CASCADED": - return 321; - case "CASE": - return 322; - case "CAST": - return 323; - case "CATALOG_P": - return 324; - case "CHAIN": - return 325; - case "CHAR_P": - return 326; - case "CHARACTER": - return 327; - case "CHARACTERISTICS": - return 328; - case "CHECK": - return 329; - case "CHECKPOINT": - return 330; - case "CLASS": - return 331; - case "CLOSE": - return 332; - case "CLUSTER": - return 333; - case "COALESCE": - return 334; - case "COLLATE": - return 335; - case "COLLATION": - return 336; - case "COLUMN": - return 337; - case "COLUMNS": - return 338; - case "COMMENT": - return 339; - case "COMMENTS": - return 340; - case "COMMIT": - return 341; - case "COMMITTED": - return 342; - case "COMPRESSION": - return 343; - case "CONCURRENTLY": - return 344; - case "CONDITIONAL": - return 345; - case "CONFIGURATION": - return 346; - case "CONFLICT": - return 347; - case "CONNECTION": - return 348; - case "CONSTRAINT": - return 349; - case "CONSTRAINTS": - return 350; - case "CONTENT_P": - return 351; - case "CONTINUE_P": - return 352; - case "CONVERSION_P": - return 353; - case "COPY": - return 354; - case "COST": - return 355; - case "CREATE": - return 356; - case "CROSS": - return 357; - case "CSV": - return 358; - case "CUBE": - return 359; - case "CURRENT_P": - return 360; - case "CURRENT_CATALOG": - return 361; - case "CURRENT_DATE": - return 362; - case "CURRENT_ROLE": - return 363; - case "CURRENT_SCHEMA": - return 364; - case "CURRENT_TIME": - return 365; - case "CURRENT_TIMESTAMP": - return 366; - case "CURRENT_USER": - return 367; - case "CURSOR": - return 368; - case "CYCLE": - return 369; - case "DATA_P": - return 370; - case "DATABASE": - return 371; - case "DAY_P": - return 372; - case "DEALLOCATE": - return 373; - case "DEC": - return 374; - case "DECIMAL_P": - return 375; - case "DECLARE": - return 376; - case "DEFAULT": - return 377; - case "DEFAULTS": - return 378; - case "DEFERRABLE": - return 379; - case "DEFERRED": - return 380; - case "DEFINER": - return 381; - case "DELETE_P": - return 382; - case "DELIMITER": - return 383; - case "DELIMITERS": - return 384; - case "DEPENDS": - return 385; - case "DEPTH": - return 386; - case "DESC": - return 387; - case "DETACH": - return 388; - case "DICTIONARY": - return 389; - case "DISABLE_P": - return 390; - case "DISCARD": - return 391; - case "DISTINCT": - return 392; - case "DO": - return 393; - case "DOCUMENT_P": - return 394; - case "DOMAIN_P": - return 395; - case "DOUBLE_P": - return 396; - case "DROP": - return 397; - case "EACH": - return 398; - case "ELSE": - return 399; - case "EMPTY_P": - return 400; - case "ENABLE_P": - return 401; - case "ENCODING": - return 402; - case "ENCRYPTED": - return 403; - case "END_P": - return 404; - case "ENUM_P": - return 405; - case "ERROR_P": - return 406; - case "ESCAPE": - return 407; - case "EVENT": - return 408; - case "EXCEPT": - return 409; - case "EXCLUDE": - return 410; - case "EXCLUDING": - return 411; - case "EXCLUSIVE": - return 412; - case "EXECUTE": - return 413; - case "EXISTS": - return 414; - case "EXPLAIN": - return 415; - case "EXPRESSION": - return 416; - case "EXTENSION": - return 417; - case "EXTERNAL": - return 418; - case "EXTRACT": - return 419; - case "FALSE_P": - return 420; - case "FAMILY": - return 421; - case "FETCH": - return 422; - case "FILTER": - return 423; - case "FINALIZE": - return 424; - case "FIRST_P": - return 425; - case "FLOAT_P": - return 426; - case "FOLLOWING": - return 427; - case "FOR": - return 428; - case "FORCE": - return 429; - case "FOREIGN": - return 430; - case "FORMAT": - return 431; - case "FORWARD": - return 432; - case "FREEZE": - return 433; - case "FROM": - return 434; - case "FULL": - return 435; - case "FUNCTION": - return 436; - case "FUNCTIONS": - return 437; - case "GENERATED": - return 438; - case "GLOBAL": - return 439; - case "GRANT": - return 440; - case "GRANTED": - return 441; - case "GREATEST": - return 442; - case "GROUP_P": - return 443; - case "GROUPING": - return 444; - case "GROUPS": - return 445; - case "HANDLER": - return 446; - case "HAVING": - return 447; - case "HEADER_P": - return 448; - case "HOLD": - return 449; - case "HOUR_P": - return 450; - case "IDENTITY_P": - return 451; - case "IF_P": - return 452; - case "ILIKE": - return 453; - case "IMMEDIATE": - return 454; - case "IMMUTABLE": - return 455; - case "IMPLICIT_P": - return 456; - case "IMPORT_P": - return 457; - case "IN_P": - return 458; - case "INCLUDE": - return 459; - case "INCLUDING": - return 460; - case "INCREMENT": - return 461; - case "INDENT": - return 462; - case "INDEX": - return 463; - case "INDEXES": - return 464; - case "INHERIT": - return 465; - case "INHERITS": - return 466; - case "INITIALLY": - return 467; - case "INLINE_P": - return 468; - case "INNER_P": - return 469; - case "INOUT": - return 470; - case "INPUT_P": - return 471; - case "INSENSITIVE": - return 472; - case "INSERT": - return 473; - case "INSTEAD": - return 474; - case "INT_P": - return 475; - case "INTEGER": - return 476; - case "INTERSECT": - return 477; - case "INTERVAL": - return 478; - case "INTO": - return 479; - case "INVOKER": - return 480; - case "IS": - return 481; - case "ISNULL": - return 482; - case "ISOLATION": - return 483; - case "JOIN": - return 484; - case "JSON": - return 485; - case "JSON_ARRAY": - return 486; - case "JSON_ARRAYAGG": - return 487; - case "JSON_EXISTS": - return 488; - case "JSON_OBJECT": - return 489; - case "JSON_OBJECTAGG": - return 490; - case "JSON_QUERY": - return 491; - case "JSON_SCALAR": - return 492; - case "JSON_SERIALIZE": - return 493; - case "JSON_TABLE": - return 494; - case "JSON_VALUE": - return 495; - case "KEEP": - return 496; - case "KEY": - return 497; - case "KEYS": - return 498; - case "LABEL": - return 499; - case "LANGUAGE": - return 500; - case "LARGE_P": - return 501; - case "LAST_P": - return 502; - case "LATERAL_P": - return 503; - case "LEADING": - return 504; - case "LEAKPROOF": - return 505; - case "LEAST": - return 506; - case "LEFT": - return 507; - case "LEVEL": - return 508; - case "LIKE": - return 509; - case "LIMIT": - return 510; - case "LISTEN": - return 511; - case "LOAD": - return 512; - case "LOCAL": - return 513; - case "LOCALTIME": - return 514; - case "LOCALTIMESTAMP": - return 515; - case "LOCATION": - return 516; - case "LOCK_P": - return 517; - case "LOCKED": - return 518; - case "LOGGED": - return 519; - case "MAPPING": - return 520; - case "MATCH": - return 521; - case "MATCHED": - return 522; - case "MATERIALIZED": - return 523; - case "MAXVALUE": - return 524; - case "MERGE": - return 525; - case "MERGE_ACTION": - return 526; - case "METHOD": - return 527; - case "MINUTE_P": - return 528; - case "MINVALUE": - return 529; - case "MODE": - return 530; - case "MONTH_P": - return 531; - case "MOVE": - return 532; - case "NAME_P": - return 533; - case "NAMES": - return 534; - case "NATIONAL": - return 535; - case "NATURAL": - return 536; - case "NCHAR": - return 537; - case "NESTED": - return 538; - case "NEW": - return 539; - case "NEXT": - return 540; - case "NFC": - return 541; - case "NFD": - return 542; - case "NFKC": - return 543; - case "NFKD": - return 544; - case "NO": - return 545; - case "NONE": - return 546; - case "NORMALIZE": - return 547; - case "NORMALIZED": - return 548; - case "NOT": - return 549; - case "NOTHING": - return 550; - case "NOTIFY": - return 551; - case "NOTNULL": - return 552; - case "NOWAIT": - return 553; - case "NULL_P": - return 554; - case "NULLIF": - return 555; - case "NULLS_P": - return 556; - case "NUMERIC": - return 557; - case "OBJECT_P": - return 558; - case "OF": - return 559; - case "OFF": - return 560; - case "OFFSET": - return 561; - case "OIDS": - return 562; - case "OLD": - return 563; - case "OMIT": - return 564; - case "ON": - return 565; - case "ONLY": - return 566; - case "OPERATOR": - return 567; - case "OPTION": - return 568; - case "OPTIONS": - return 569; - case "OR": - return 570; - case "ORDER": - return 571; - case "ORDINALITY": - return 572; - case "OTHERS": - return 573; - case "OUT_P": - return 574; - case "OUTER_P": - return 575; - case "OVER": - return 576; - case "OVERLAPS": - return 577; - case "OVERLAY": - return 578; - case "OVERRIDING": - return 579; - case "OWNED": - return 580; - case "OWNER": - return 581; - case "PARALLEL": - return 582; - case "PARAMETER": - return 583; - case "PARSER": - return 584; - case "PARTIAL": - return 585; - case "PARTITION": - return 586; - case "PASSING": - return 587; - case "PASSWORD": - return 588; - case "PATH": - return 589; - case "PLACING": - return 590; - case "PLAN": - return 591; - case "PLANS": - return 592; - case "POLICY": - return 593; - case "POSITION": - return 594; - case "PRECEDING": - return 595; - case "PRECISION": - return 596; - case "PRESERVE": - return 597; - case "PREPARE": - return 598; - case "PREPARED": - return 599; - case "PRIMARY": - return 600; - case "PRIOR": - return 601; - case "PRIVILEGES": - return 602; - case "PROCEDURAL": - return 603; - case "PROCEDURE": - return 604; - case "PROCEDURES": - return 605; - case "PROGRAM": - return 606; - case "PUBLICATION": - return 607; - case "QUOTE": - return 608; - case "QUOTES": - return 609; - case "RANGE": - return 610; - case "READ": - return 611; - case "REAL": - return 612; - case "REASSIGN": - return 613; - case "RECHECK": - return 614; - case "RECURSIVE": - return 615; - case "REF_P": - return 616; - case "REFERENCES": - return 617; - case "REFERENCING": - return 618; - case "REFRESH": - return 619; - case "REINDEX": - return 620; - case "RELATIVE_P": - return 621; - case "RELEASE": - return 622; - case "RENAME": - return 623; - case "REPEATABLE": - return 624; - case "REPLACE": - return 625; - case "REPLICA": - return 626; - case "RESET": - return 627; - case "RESTART": - return 628; - case "RESTRICT": - return 629; - case "RETURN": - return 630; - case "RETURNING": - return 631; - case "RETURNS": - return 632; - case "REVOKE": - return 633; - case "RIGHT": - return 634; - case "ROLE": - return 635; - case "ROLLBACK": - return 636; - case "ROLLUP": - return 637; - case "ROUTINE": - return 638; - case "ROUTINES": - return 639; - case "ROW": - return 640; - case "ROWS": - return 641; - case "RULE": - return 642; - case "SAVEPOINT": - return 643; - case "SCALAR": - return 644; - case "SCHEMA": - return 645; - case "SCHEMAS": - return 646; - case "SCROLL": - return 647; - case "SEARCH": - return 648; - case "SECOND_P": - return 649; - case "SECURITY": - return 650; - case "SELECT": - return 651; - case "SEQUENCE": - return 652; - case "SEQUENCES": - return 653; - case "SERIALIZABLE": - return 654; - case "SERVER": - return 655; - case "SESSION": - return 656; - case "SESSION_USER": - return 657; - case "SET": - return 658; - case "SETS": - return 659; - case "SETOF": - return 660; - case "SHARE": - return 661; - case "SHOW": - return 662; - case "SIMILAR": - return 663; - case "SIMPLE": - return 664; - case "SKIP": - return 665; - case "SMALLINT": - return 666; - case "SNAPSHOT": - return 667; - case "SOME": - return 668; - case "SOURCE": - return 669; - case "SQL_P": - return 670; - case "STABLE": - return 671; - case "STANDALONE_P": - return 672; - case "START": - return 673; - case "STATEMENT": - return 674; - case "STATISTICS": - return 675; - case "STDIN": - return 676; - case "STDOUT": - return 677; - case "STORAGE": - return 678; - case "STORED": - return 679; - case "STRICT_P": - return 680; - case "STRING_P": - return 681; - case "STRIP_P": - return 682; - case "SUBSCRIPTION": - return 683; - case "SUBSTRING": - return 684; - case "SUPPORT": - return 685; - case "SYMMETRIC": - return 686; - case "SYSID": - return 687; - case "SYSTEM_P": - return 688; - case "SYSTEM_USER": - return 689; - case "TABLE": - return 690; - case "TABLES": - return 691; - case "TABLESAMPLE": - return 692; - case "TABLESPACE": - return 693; - case "TARGET": - return 694; - case "TEMP": - return 695; - case "TEMPLATE": - return 696; - case "TEMPORARY": - return 697; - case "TEXT_P": - return 698; - case "THEN": - return 699; - case "TIES": - return 700; - case "TIME": - return 701; - case "TIMESTAMP": - return 702; - case "TO": - return 703; - case "TRAILING": - return 704; - case "TRANSACTION": - return 705; - case "TRANSFORM": - return 706; - case "TREAT": - return 707; - case "TRIGGER": - return 708; - case "TRIM": - return 709; - case "TRUE_P": - return 710; - case "TRUNCATE": - return 711; - case "TRUSTED": - return 712; - case "TYPE_P": - return 713; - case "TYPES_P": - return 714; - case "UESCAPE": - return 715; - case "UNBOUNDED": - return 716; - case "UNCONDITIONAL": - return 717; - case "UNCOMMITTED": - return 718; - case "UNENCRYPTED": - return 719; - case "UNION": - return 720; - case "UNIQUE": - return 721; - case "UNKNOWN": - return 722; - case "UNLISTEN": - return 723; - case "UNLOGGED": - return 724; - case "UNTIL": - return 725; - case "UPDATE": - return 726; - case "USER": - return 727; - case "USING": - return 728; - case "VACUUM": - return 729; - case "VALID": - return 730; - case "VALIDATE": - return 731; - case "VALIDATOR": - return 732; - case "VALUE_P": - return 733; - case "VALUES": - return 734; - case "VARCHAR": - return 735; - case "VARIADIC": - return 736; - case "VARYING": - return 737; - case "VERBOSE": - return 738; - case "VERSION_P": - return 739; - case "VIEW": - return 740; - case "VIEWS": - return 741; - case "VOLATILE": - return 742; - case "WHEN": - return 743; - case "WHERE": - return 744; - case "WHITESPACE_P": - return 745; - case "WINDOW": - return 746; - case "WITH": - return 747; - case "WITHIN": - return 748; - case "WITHOUT": - return 749; - case "WORK": - return 750; - case "WRAPPER": - return 751; - case "WRITE": - return 752; - case "XML_P": - return 753; - case "XMLATTRIBUTES": - return 754; - case "XMLCONCAT": - return 755; - case "XMLELEMENT": - return 756; - case "XMLEXISTS": - return 757; - case "XMLFOREST": - return 758; - case "XMLNAMESPACES": - return 759; - case "XMLPARSE": - return 760; - case "XMLPI": - return 761; - case "XMLROOT": - return 762; - case "XMLSERIALIZE": - return 763; - case "XMLTABLE": - return 764; - case "YEAR_P": - return 765; - case "YES_P": - return 766; - case "ZONE": - return 767; - case "FORMAT_LA": - return 768; - case "NOT_LA": - return 769; - case "NULLS_LA": - return 770; - case "WITH_LA": - return 771; - case "WITHOUT_LA": - return 772; - case "MODE_TYPE_NAME": - return 773; - case "MODE_PLPGSQL_EXPR": - return 774; - case "MODE_PLPGSQL_ASSIGN1": - return 775; - case "MODE_PLPGSQL_ASSIGN2": - return 776; - case "MODE_PLPGSQL_ASSIGN3": - return 777; - case "UMINUS": - return 778; - default: - throw new Error("Key not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/17/enum-to-str.ts b/packages/transform/src/17/enum-to-str.ts deleted file mode 100644 index 4ab6107f..00000000 --- a/packages/transform/src/17/enum-to-str.ts +++ /dev/null @@ -1,2503 +0,0 @@ -/** -* This file was automatically generated by pg-proto-parser@1.29.1. -* DO NOT MODIFY IT BY HAND. Instead, modify the source proto file, -* and run the pg-proto-parser generate command to regenerate this file. -*/ -export type EnumType = "QuerySource" | "SortByDir" | "SortByNulls" | "SetQuantifier" | "A_Expr_Kind" | "RoleSpecType" | "TableLikeOption" | "DefElemAction" | "PartitionStrategy" | "PartitionRangeDatumKind" | "RTEKind" | "WCOKind" | "GroupingSetKind" | "CTEMaterialize" | "JsonQuotes" | "JsonTableColumnType" | "SetOperation" | "ObjectType" | "DropBehavior" | "AlterTableType" | "GrantTargetType" | "VariableSetKind" | "ConstrType" | "ImportForeignSchemaType" | "RoleStmtType" | "FetchDirection" | "FunctionParameterMode" | "TransactionStmtKind" | "ViewCheckOption" | "DiscardMode" | "ReindexObjectType" | "AlterTSConfigType" | "PublicationObjSpecType" | "AlterPublicationAction" | "AlterSubscriptionType" | "OverridingKind" | "OnCommitAction" | "TableFuncType" | "ParamKind" | "CoercionContext" | "CoercionForm" | "BoolExprType" | "SubLinkType" | "RowCompareType" | "MinMaxOp" | "SQLValueFunctionOp" | "XmlExprOp" | "XmlOptionType" | "JsonEncoding" | "JsonFormatType" | "JsonConstructorType" | "JsonValueType" | "JsonWrapper" | "JsonBehaviorType" | "JsonExprOp" | "NullTestType" | "BoolTestType" | "MergeMatchKind" | "CmdType" | "JoinType" | "AggStrategy" | "AggSplit" | "SetOpCmd" | "SetOpStrategy" | "OnConflictAction" | "LimitOption" | "LockClauseStrength" | "LockWaitPolicy" | "LockTupleMode" | "KeywordKind" | "Token"; -export const getEnumString = (enumType: EnumType, key: number): string => { - switch (enumType) { - case "QuerySource": - { - switch (key) { - case 0: - return "QSRC_ORIGINAL"; - case 1: - return "QSRC_PARSER"; - case 2: - return "QSRC_INSTEAD_RULE"; - case 3: - return "QSRC_QUAL_INSTEAD_RULE"; - case 4: - return "QSRC_NON_INSTEAD_RULE"; - default: - throw new Error("Value not recognized in enum QuerySource"); - } - } - case "SortByDir": - { - switch (key) { - case 0: - return "SORTBY_DEFAULT"; - case 1: - return "SORTBY_ASC"; - case 2: - return "SORTBY_DESC"; - case 3: - return "SORTBY_USING"; - default: - throw new Error("Value not recognized in enum SortByDir"); - } - } - case "SortByNulls": - { - switch (key) { - case 0: - return "SORTBY_NULLS_DEFAULT"; - case 1: - return "SORTBY_NULLS_FIRST"; - case 2: - return "SORTBY_NULLS_LAST"; - default: - throw new Error("Value not recognized in enum SortByNulls"); - } - } - case "SetQuantifier": - { - switch (key) { - case 0: - return "SET_QUANTIFIER_DEFAULT"; - case 1: - return "SET_QUANTIFIER_ALL"; - case 2: - return "SET_QUANTIFIER_DISTINCT"; - default: - throw new Error("Value not recognized in enum SetQuantifier"); - } - } - case "A_Expr_Kind": - { - switch (key) { - case 0: - return "AEXPR_OP"; - case 1: - return "AEXPR_OP_ANY"; - case 2: - return "AEXPR_OP_ALL"; - case 3: - return "AEXPR_DISTINCT"; - case 4: - return "AEXPR_NOT_DISTINCT"; - case 5: - return "AEXPR_NULLIF"; - case 6: - return "AEXPR_IN"; - case 7: - return "AEXPR_LIKE"; - case 8: - return "AEXPR_ILIKE"; - case 9: - return "AEXPR_SIMILAR"; - case 10: - return "AEXPR_BETWEEN"; - case 11: - return "AEXPR_NOT_BETWEEN"; - case 12: - return "AEXPR_BETWEEN_SYM"; - case 13: - return "AEXPR_NOT_BETWEEN_SYM"; - default: - throw new Error("Value not recognized in enum A_Expr_Kind"); - } - } - case "RoleSpecType": - { - switch (key) { - case 0: - return "ROLESPEC_CSTRING"; - case 1: - return "ROLESPEC_CURRENT_ROLE"; - case 2: - return "ROLESPEC_CURRENT_USER"; - case 3: - return "ROLESPEC_SESSION_USER"; - case 4: - return "ROLESPEC_PUBLIC"; - default: - throw new Error("Value not recognized in enum RoleSpecType"); - } - } - case "TableLikeOption": - { - switch (key) { - case 0: - return "CREATE_TABLE_LIKE_COMMENTS"; - case 1: - return "CREATE_TABLE_LIKE_COMPRESSION"; - case 2: - return "CREATE_TABLE_LIKE_CONSTRAINTS"; - case 3: - return "CREATE_TABLE_LIKE_DEFAULTS"; - case 4: - return "CREATE_TABLE_LIKE_GENERATED"; - case 5: - return "CREATE_TABLE_LIKE_IDENTITY"; - case 6: - return "CREATE_TABLE_LIKE_INDEXES"; - case 7: - return "CREATE_TABLE_LIKE_STATISTICS"; - case 8: - return "CREATE_TABLE_LIKE_STORAGE"; - case 9: - return "CREATE_TABLE_LIKE_ALL"; - default: - throw new Error("Value not recognized in enum TableLikeOption"); - } - } - case "DefElemAction": - { - switch (key) { - case 0: - return "DEFELEM_UNSPEC"; - case 1: - return "DEFELEM_SET"; - case 2: - return "DEFELEM_ADD"; - case 3: - return "DEFELEM_DROP"; - default: - throw new Error("Value not recognized in enum DefElemAction"); - } - } - case "PartitionStrategy": - { - switch (key) { - case 0: - return "PARTITION_STRATEGY_LIST"; - case 1: - return "PARTITION_STRATEGY_RANGE"; - case 2: - return "PARTITION_STRATEGY_HASH"; - default: - throw new Error("Value not recognized in enum PartitionStrategy"); - } - } - case "PartitionRangeDatumKind": - { - switch (key) { - case 0: - return "PARTITION_RANGE_DATUM_MINVALUE"; - case 1: - return "PARTITION_RANGE_DATUM_VALUE"; - case 2: - return "PARTITION_RANGE_DATUM_MAXVALUE"; - default: - throw new Error("Value not recognized in enum PartitionRangeDatumKind"); - } - } - case "RTEKind": - { - switch (key) { - case 0: - return "RTE_RELATION"; - case 1: - return "RTE_SUBQUERY"; - case 2: - return "RTE_JOIN"; - case 3: - return "RTE_FUNCTION"; - case 4: - return "RTE_TABLEFUNC"; - case 5: - return "RTE_VALUES"; - case 6: - return "RTE_CTE"; - case 7: - return "RTE_NAMEDTUPLESTORE"; - case 8: - return "RTE_RESULT"; - default: - throw new Error("Value not recognized in enum RTEKind"); - } - } - case "WCOKind": - { - switch (key) { - case 0: - return "WCO_VIEW_CHECK"; - case 1: - return "WCO_RLS_INSERT_CHECK"; - case 2: - return "WCO_RLS_UPDATE_CHECK"; - case 3: - return "WCO_RLS_CONFLICT_CHECK"; - case 4: - return "WCO_RLS_MERGE_UPDATE_CHECK"; - case 5: - return "WCO_RLS_MERGE_DELETE_CHECK"; - default: - throw new Error("Value not recognized in enum WCOKind"); - } - } - case "GroupingSetKind": - { - switch (key) { - case 0: - return "GROUPING_SET_EMPTY"; - case 1: - return "GROUPING_SET_SIMPLE"; - case 2: - return "GROUPING_SET_ROLLUP"; - case 3: - return "GROUPING_SET_CUBE"; - case 4: - return "GROUPING_SET_SETS"; - default: - throw new Error("Value not recognized in enum GroupingSetKind"); - } - } - case "CTEMaterialize": - { - switch (key) { - case 0: - return "CTEMaterializeDefault"; - case 1: - return "CTEMaterializeAlways"; - case 2: - return "CTEMaterializeNever"; - default: - throw new Error("Value not recognized in enum CTEMaterialize"); - } - } - case "JsonQuotes": - { - switch (key) { - case 0: - return "JS_QUOTES_UNSPEC"; - case 1: - return "JS_QUOTES_KEEP"; - case 2: - return "JS_QUOTES_OMIT"; - default: - throw new Error("Value not recognized in enum JsonQuotes"); - } - } - case "JsonTableColumnType": - { - switch (key) { - case 0: - return "JTC_FOR_ORDINALITY"; - case 1: - return "JTC_REGULAR"; - case 2: - return "JTC_EXISTS"; - case 3: - return "JTC_FORMATTED"; - case 4: - return "JTC_NESTED"; - default: - throw new Error("Value not recognized in enum JsonTableColumnType"); - } - } - case "SetOperation": - { - switch (key) { - case 0: - return "SETOP_NONE"; - case 1: - return "SETOP_UNION"; - case 2: - return "SETOP_INTERSECT"; - case 3: - return "SETOP_EXCEPT"; - default: - throw new Error("Value not recognized in enum SetOperation"); - } - } - case "ObjectType": - { - switch (key) { - case 0: - return "OBJECT_ACCESS_METHOD"; - case 1: - return "OBJECT_AGGREGATE"; - case 2: - return "OBJECT_AMOP"; - case 3: - return "OBJECT_AMPROC"; - case 4: - return "OBJECT_ATTRIBUTE"; - case 5: - return "OBJECT_CAST"; - case 6: - return "OBJECT_COLUMN"; - case 7: - return "OBJECT_COLLATION"; - case 8: - return "OBJECT_CONVERSION"; - case 9: - return "OBJECT_DATABASE"; - case 10: - return "OBJECT_DEFAULT"; - case 11: - return "OBJECT_DEFACL"; - case 12: - return "OBJECT_DOMAIN"; - case 13: - return "OBJECT_DOMCONSTRAINT"; - case 14: - return "OBJECT_EVENT_TRIGGER"; - case 15: - return "OBJECT_EXTENSION"; - case 16: - return "OBJECT_FDW"; - case 17: - return "OBJECT_FOREIGN_SERVER"; - case 18: - return "OBJECT_FOREIGN_TABLE"; - case 19: - return "OBJECT_FUNCTION"; - case 20: - return "OBJECT_INDEX"; - case 21: - return "OBJECT_LANGUAGE"; - case 22: - return "OBJECT_LARGEOBJECT"; - case 23: - return "OBJECT_MATVIEW"; - case 24: - return "OBJECT_OPCLASS"; - case 25: - return "OBJECT_OPERATOR"; - case 26: - return "OBJECT_OPFAMILY"; - case 27: - return "OBJECT_PARAMETER_ACL"; - case 28: - return "OBJECT_POLICY"; - case 29: - return "OBJECT_PROCEDURE"; - case 30: - return "OBJECT_PUBLICATION"; - case 31: - return "OBJECT_PUBLICATION_NAMESPACE"; - case 32: - return "OBJECT_PUBLICATION_REL"; - case 33: - return "OBJECT_ROLE"; - case 34: - return "OBJECT_ROUTINE"; - case 35: - return "OBJECT_RULE"; - case 36: - return "OBJECT_SCHEMA"; - case 37: - return "OBJECT_SEQUENCE"; - case 38: - return "OBJECT_SUBSCRIPTION"; - case 39: - return "OBJECT_STATISTIC_EXT"; - case 40: - return "OBJECT_TABCONSTRAINT"; - case 41: - return "OBJECT_TABLE"; - case 42: - return "OBJECT_TABLESPACE"; - case 43: - return "OBJECT_TRANSFORM"; - case 44: - return "OBJECT_TRIGGER"; - case 45: - return "OBJECT_TSCONFIGURATION"; - case 46: - return "OBJECT_TSDICTIONARY"; - case 47: - return "OBJECT_TSPARSER"; - case 48: - return "OBJECT_TSTEMPLATE"; - case 49: - return "OBJECT_TYPE"; - case 50: - return "OBJECT_USER_MAPPING"; - case 51: - return "OBJECT_VIEW"; - default: - throw new Error("Value not recognized in enum ObjectType"); - } - } - case "DropBehavior": - { - switch (key) { - case 0: - return "DROP_RESTRICT"; - case 1: - return "DROP_CASCADE"; - default: - throw new Error("Value not recognized in enum DropBehavior"); - } - } - case "AlterTableType": - { - switch (key) { - case 0: - return "AT_AddColumn"; - case 1: - return "AT_AddColumnToView"; - case 2: - return "AT_ColumnDefault"; - case 3: - return "AT_CookedColumnDefault"; - case 4: - return "AT_DropNotNull"; - case 5: - return "AT_SetNotNull"; - case 6: - return "AT_SetExpression"; - case 7: - return "AT_DropExpression"; - case 8: - return "AT_CheckNotNull"; - case 9: - return "AT_SetStatistics"; - case 10: - return "AT_SetOptions"; - case 11: - return "AT_ResetOptions"; - case 12: - return "AT_SetStorage"; - case 13: - return "AT_SetCompression"; - case 14: - return "AT_DropColumn"; - case 15: - return "AT_AddIndex"; - case 16: - return "AT_ReAddIndex"; - case 17: - return "AT_AddConstraint"; - case 18: - return "AT_ReAddConstraint"; - case 19: - return "AT_ReAddDomainConstraint"; - case 20: - return "AT_AlterConstraint"; - case 21: - return "AT_ValidateConstraint"; - case 22: - return "AT_AddIndexConstraint"; - case 23: - return "AT_DropConstraint"; - case 24: - return "AT_ReAddComment"; - case 25: - return "AT_AlterColumnType"; - case 26: - return "AT_AlterColumnGenericOptions"; - case 27: - return "AT_ChangeOwner"; - case 28: - return "AT_ClusterOn"; - case 29: - return "AT_DropCluster"; - case 30: - return "AT_SetLogged"; - case 31: - return "AT_SetUnLogged"; - case 32: - return "AT_DropOids"; - case 33: - return "AT_SetAccessMethod"; - case 34: - return "AT_SetTableSpace"; - case 35: - return "AT_SetRelOptions"; - case 36: - return "AT_ResetRelOptions"; - case 37: - return "AT_ReplaceRelOptions"; - case 38: - return "AT_EnableTrig"; - case 39: - return "AT_EnableAlwaysTrig"; - case 40: - return "AT_EnableReplicaTrig"; - case 41: - return "AT_DisableTrig"; - case 42: - return "AT_EnableTrigAll"; - case 43: - return "AT_DisableTrigAll"; - case 44: - return "AT_EnableTrigUser"; - case 45: - return "AT_DisableTrigUser"; - case 46: - return "AT_EnableRule"; - case 47: - return "AT_EnableAlwaysRule"; - case 48: - return "AT_EnableReplicaRule"; - case 49: - return "AT_DisableRule"; - case 50: - return "AT_AddInherit"; - case 51: - return "AT_DropInherit"; - case 52: - return "AT_AddOf"; - case 53: - return "AT_DropOf"; - case 54: - return "AT_ReplicaIdentity"; - case 55: - return "AT_EnableRowSecurity"; - case 56: - return "AT_DisableRowSecurity"; - case 57: - return "AT_ForceRowSecurity"; - case 58: - return "AT_NoForceRowSecurity"; - case 59: - return "AT_GenericOptions"; - case 60: - return "AT_AttachPartition"; - case 61: - return "AT_DetachPartition"; - case 62: - return "AT_DetachPartitionFinalize"; - case 63: - return "AT_AddIdentity"; - case 64: - return "AT_SetIdentity"; - case 65: - return "AT_DropIdentity"; - case 66: - return "AT_ReAddStatistics"; - default: - throw new Error("Value not recognized in enum AlterTableType"); - } - } - case "GrantTargetType": - { - switch (key) { - case 0: - return "ACL_TARGET_OBJECT"; - case 1: - return "ACL_TARGET_ALL_IN_SCHEMA"; - case 2: - return "ACL_TARGET_DEFAULTS"; - default: - throw new Error("Value not recognized in enum GrantTargetType"); - } - } - case "VariableSetKind": - { - switch (key) { - case 0: - return "VAR_SET_VALUE"; - case 1: - return "VAR_SET_DEFAULT"; - case 2: - return "VAR_SET_CURRENT"; - case 3: - return "VAR_SET_MULTI"; - case 4: - return "VAR_RESET"; - case 5: - return "VAR_RESET_ALL"; - default: - throw new Error("Value not recognized in enum VariableSetKind"); - } - } - case "ConstrType": - { - switch (key) { - case 0: - return "CONSTR_NULL"; - case 1: - return "CONSTR_NOTNULL"; - case 2: - return "CONSTR_DEFAULT"; - case 3: - return "CONSTR_IDENTITY"; - case 4: - return "CONSTR_GENERATED"; - case 5: - return "CONSTR_CHECK"; - case 6: - return "CONSTR_PRIMARY"; - case 7: - return "CONSTR_UNIQUE"; - case 8: - return "CONSTR_EXCLUSION"; - case 9: - return "CONSTR_FOREIGN"; - case 10: - return "CONSTR_ATTR_DEFERRABLE"; - case 11: - return "CONSTR_ATTR_NOT_DEFERRABLE"; - case 12: - return "CONSTR_ATTR_DEFERRED"; - case 13: - return "CONSTR_ATTR_IMMEDIATE"; - default: - throw new Error("Value not recognized in enum ConstrType"); - } - } - case "ImportForeignSchemaType": - { - switch (key) { - case 0: - return "FDW_IMPORT_SCHEMA_ALL"; - case 1: - return "FDW_IMPORT_SCHEMA_LIMIT_TO"; - case 2: - return "FDW_IMPORT_SCHEMA_EXCEPT"; - default: - throw new Error("Value not recognized in enum ImportForeignSchemaType"); - } - } - case "RoleStmtType": - { - switch (key) { - case 0: - return "ROLESTMT_ROLE"; - case 1: - return "ROLESTMT_USER"; - case 2: - return "ROLESTMT_GROUP"; - default: - throw new Error("Value not recognized in enum RoleStmtType"); - } - } - case "FetchDirection": - { - switch (key) { - case 0: - return "FETCH_FORWARD"; - case 1: - return "FETCH_BACKWARD"; - case 2: - return "FETCH_ABSOLUTE"; - case 3: - return "FETCH_RELATIVE"; - default: - throw new Error("Value not recognized in enum FetchDirection"); - } - } - case "FunctionParameterMode": - { - switch (key) { - case 0: - return "FUNC_PARAM_IN"; - case 1: - return "FUNC_PARAM_OUT"; - case 2: - return "FUNC_PARAM_INOUT"; - case 3: - return "FUNC_PARAM_VARIADIC"; - case 4: - return "FUNC_PARAM_TABLE"; - case 5: - return "FUNC_PARAM_DEFAULT"; - default: - throw new Error("Value not recognized in enum FunctionParameterMode"); - } - } - case "TransactionStmtKind": - { - switch (key) { - case 0: - return "TRANS_STMT_BEGIN"; - case 1: - return "TRANS_STMT_START"; - case 2: - return "TRANS_STMT_COMMIT"; - case 3: - return "TRANS_STMT_ROLLBACK"; - case 4: - return "TRANS_STMT_SAVEPOINT"; - case 5: - return "TRANS_STMT_RELEASE"; - case 6: - return "TRANS_STMT_ROLLBACK_TO"; - case 7: - return "TRANS_STMT_PREPARE"; - case 8: - return "TRANS_STMT_COMMIT_PREPARED"; - case 9: - return "TRANS_STMT_ROLLBACK_PREPARED"; - default: - throw new Error("Value not recognized in enum TransactionStmtKind"); - } - } - case "ViewCheckOption": - { - switch (key) { - case 0: - return "NO_CHECK_OPTION"; - case 1: - return "LOCAL_CHECK_OPTION"; - case 2: - return "CASCADED_CHECK_OPTION"; - default: - throw new Error("Value not recognized in enum ViewCheckOption"); - } - } - case "DiscardMode": - { - switch (key) { - case 0: - return "DISCARD_ALL"; - case 1: - return "DISCARD_PLANS"; - case 2: - return "DISCARD_SEQUENCES"; - case 3: - return "DISCARD_TEMP"; - default: - throw new Error("Value not recognized in enum DiscardMode"); - } - } - case "ReindexObjectType": - { - switch (key) { - case 0: - return "REINDEX_OBJECT_INDEX"; - case 1: - return "REINDEX_OBJECT_TABLE"; - case 2: - return "REINDEX_OBJECT_SCHEMA"; - case 3: - return "REINDEX_OBJECT_SYSTEM"; - case 4: - return "REINDEX_OBJECT_DATABASE"; - default: - throw new Error("Value not recognized in enum ReindexObjectType"); - } - } - case "AlterTSConfigType": - { - switch (key) { - case 0: - return "ALTER_TSCONFIG_ADD_MAPPING"; - case 1: - return "ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN"; - case 2: - return "ALTER_TSCONFIG_REPLACE_DICT"; - case 3: - return "ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN"; - case 4: - return "ALTER_TSCONFIG_DROP_MAPPING"; - default: - throw new Error("Value not recognized in enum AlterTSConfigType"); - } - } - case "PublicationObjSpecType": - { - switch (key) { - case 0: - return "PUBLICATIONOBJ_TABLE"; - case 1: - return "PUBLICATIONOBJ_TABLES_IN_SCHEMA"; - case 2: - return "PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA"; - case 3: - return "PUBLICATIONOBJ_CONTINUATION"; - default: - throw new Error("Value not recognized in enum PublicationObjSpecType"); - } - } - case "AlterPublicationAction": - { - switch (key) { - case 0: - return "AP_AddObjects"; - case 1: - return "AP_DropObjects"; - case 2: - return "AP_SetObjects"; - default: - throw new Error("Value not recognized in enum AlterPublicationAction"); - } - } - case "AlterSubscriptionType": - { - switch (key) { - case 0: - return "ALTER_SUBSCRIPTION_OPTIONS"; - case 1: - return "ALTER_SUBSCRIPTION_CONNECTION"; - case 2: - return "ALTER_SUBSCRIPTION_SET_PUBLICATION"; - case 3: - return "ALTER_SUBSCRIPTION_ADD_PUBLICATION"; - case 4: - return "ALTER_SUBSCRIPTION_DROP_PUBLICATION"; - case 5: - return "ALTER_SUBSCRIPTION_REFRESH"; - case 6: - return "ALTER_SUBSCRIPTION_ENABLED"; - case 7: - return "ALTER_SUBSCRIPTION_SKIP"; - default: - throw new Error("Value not recognized in enum AlterSubscriptionType"); - } - } - case "OverridingKind": - { - switch (key) { - case 0: - return "OVERRIDING_NOT_SET"; - case 1: - return "OVERRIDING_USER_VALUE"; - case 2: - return "OVERRIDING_SYSTEM_VALUE"; - default: - throw new Error("Value not recognized in enum OverridingKind"); - } - } - case "OnCommitAction": - { - switch (key) { - case 0: - return "ONCOMMIT_NOOP"; - case 1: - return "ONCOMMIT_PRESERVE_ROWS"; - case 2: - return "ONCOMMIT_DELETE_ROWS"; - case 3: - return "ONCOMMIT_DROP"; - default: - throw new Error("Value not recognized in enum OnCommitAction"); - } - } - case "TableFuncType": - { - switch (key) { - case 0: - return "TFT_XMLTABLE"; - case 1: - return "TFT_JSON_TABLE"; - default: - throw new Error("Value not recognized in enum TableFuncType"); - } - } - case "ParamKind": - { - switch (key) { - case 0: - return "PARAM_EXTERN"; - case 1: - return "PARAM_EXEC"; - case 2: - return "PARAM_SUBLINK"; - case 3: - return "PARAM_MULTIEXPR"; - default: - throw new Error("Value not recognized in enum ParamKind"); - } - } - case "CoercionContext": - { - switch (key) { - case 0: - return "COERCION_IMPLICIT"; - case 1: - return "COERCION_ASSIGNMENT"; - case 2: - return "COERCION_PLPGSQL"; - case 3: - return "COERCION_EXPLICIT"; - default: - throw new Error("Value not recognized in enum CoercionContext"); - } - } - case "CoercionForm": - { - switch (key) { - case 0: - return "COERCE_EXPLICIT_CALL"; - case 1: - return "COERCE_EXPLICIT_CAST"; - case 2: - return "COERCE_IMPLICIT_CAST"; - case 3: - return "COERCE_SQL_SYNTAX"; - default: - throw new Error("Value not recognized in enum CoercionForm"); - } - } - case "BoolExprType": - { - switch (key) { - case 0: - return "AND_EXPR"; - case 1: - return "OR_EXPR"; - case 2: - return "NOT_EXPR"; - default: - throw new Error("Value not recognized in enum BoolExprType"); - } - } - case "SubLinkType": - { - switch (key) { - case 0: - return "EXISTS_SUBLINK"; - case 1: - return "ALL_SUBLINK"; - case 2: - return "ANY_SUBLINK"; - case 3: - return "ROWCOMPARE_SUBLINK"; - case 4: - return "EXPR_SUBLINK"; - case 5: - return "MULTIEXPR_SUBLINK"; - case 6: - return "ARRAY_SUBLINK"; - case 7: - return "CTE_SUBLINK"; - default: - throw new Error("Value not recognized in enum SubLinkType"); - } - } - case "RowCompareType": - { - switch (key) { - case 0: - return "ROWCOMPARE_LT"; - case 1: - return "ROWCOMPARE_LE"; - case 2: - return "ROWCOMPARE_EQ"; - case 3: - return "ROWCOMPARE_GE"; - case 4: - return "ROWCOMPARE_GT"; - case 5: - return "ROWCOMPARE_NE"; - default: - throw new Error("Value not recognized in enum RowCompareType"); - } - } - case "MinMaxOp": - { - switch (key) { - case 0: - return "IS_GREATEST"; - case 1: - return "IS_LEAST"; - default: - throw new Error("Value not recognized in enum MinMaxOp"); - } - } - case "SQLValueFunctionOp": - { - switch (key) { - case 0: - return "SVFOP_CURRENT_DATE"; - case 1: - return "SVFOP_CURRENT_TIME"; - case 2: - return "SVFOP_CURRENT_TIME_N"; - case 3: - return "SVFOP_CURRENT_TIMESTAMP"; - case 4: - return "SVFOP_CURRENT_TIMESTAMP_N"; - case 5: - return "SVFOP_LOCALTIME"; - case 6: - return "SVFOP_LOCALTIME_N"; - case 7: - return "SVFOP_LOCALTIMESTAMP"; - case 8: - return "SVFOP_LOCALTIMESTAMP_N"; - case 9: - return "SVFOP_CURRENT_ROLE"; - case 10: - return "SVFOP_CURRENT_USER"; - case 11: - return "SVFOP_USER"; - case 12: - return "SVFOP_SESSION_USER"; - case 13: - return "SVFOP_CURRENT_CATALOG"; - case 14: - return "SVFOP_CURRENT_SCHEMA"; - default: - throw new Error("Value not recognized in enum SQLValueFunctionOp"); - } - } - case "XmlExprOp": - { - switch (key) { - case 0: - return "IS_XMLCONCAT"; - case 1: - return "IS_XMLELEMENT"; - case 2: - return "IS_XMLFOREST"; - case 3: - return "IS_XMLPARSE"; - case 4: - return "IS_XMLPI"; - case 5: - return "IS_XMLROOT"; - case 6: - return "IS_XMLSERIALIZE"; - case 7: - return "IS_DOCUMENT"; - default: - throw new Error("Value not recognized in enum XmlExprOp"); - } - } - case "XmlOptionType": - { - switch (key) { - case 0: - return "XMLOPTION_DOCUMENT"; - case 1: - return "XMLOPTION_CONTENT"; - default: - throw new Error("Value not recognized in enum XmlOptionType"); - } - } - case "JsonEncoding": - { - switch (key) { - case 0: - return "JS_ENC_DEFAULT"; - case 1: - return "JS_ENC_UTF8"; - case 2: - return "JS_ENC_UTF16"; - case 3: - return "JS_ENC_UTF32"; - default: - throw new Error("Value not recognized in enum JsonEncoding"); - } - } - case "JsonFormatType": - { - switch (key) { - case 0: - return "JS_FORMAT_DEFAULT"; - case 1: - return "JS_FORMAT_JSON"; - case 2: - return "JS_FORMAT_JSONB"; - default: - throw new Error("Value not recognized in enum JsonFormatType"); - } - } - case "JsonConstructorType": - { - switch (key) { - case 0: - return "JSCTOR_JSON_OBJECT"; - case 1: - return "JSCTOR_JSON_ARRAY"; - case 2: - return "JSCTOR_JSON_OBJECTAGG"; - case 3: - return "JSCTOR_JSON_ARRAYAGG"; - case 4: - return "JSCTOR_JSON_PARSE"; - case 5: - return "JSCTOR_JSON_SCALAR"; - case 6: - return "JSCTOR_JSON_SERIALIZE"; - default: - throw new Error("Value not recognized in enum JsonConstructorType"); - } - } - case "JsonValueType": - { - switch (key) { - case 0: - return "JS_TYPE_ANY"; - case 1: - return "JS_TYPE_OBJECT"; - case 2: - return "JS_TYPE_ARRAY"; - case 3: - return "JS_TYPE_SCALAR"; - default: - throw new Error("Value not recognized in enum JsonValueType"); - } - } - case "JsonWrapper": - { - switch (key) { - case 0: - return "JSW_UNSPEC"; - case 1: - return "JSW_NONE"; - case 2: - return "JSW_CONDITIONAL"; - case 3: - return "JSW_UNCONDITIONAL"; - default: - throw new Error("Value not recognized in enum JsonWrapper"); - } - } - case "JsonBehaviorType": - { - switch (key) { - case 0: - return "JSON_BEHAVIOR_NULL"; - case 1: - return "JSON_BEHAVIOR_ERROR"; - case 2: - return "JSON_BEHAVIOR_EMPTY"; - case 3: - return "JSON_BEHAVIOR_TRUE"; - case 4: - return "JSON_BEHAVIOR_FALSE"; - case 5: - return "JSON_BEHAVIOR_UNKNOWN"; - case 6: - return "JSON_BEHAVIOR_EMPTY_ARRAY"; - case 7: - return "JSON_BEHAVIOR_EMPTY_OBJECT"; - case 8: - return "JSON_BEHAVIOR_DEFAULT"; - default: - throw new Error("Value not recognized in enum JsonBehaviorType"); - } - } - case "JsonExprOp": - { - switch (key) { - case 0: - return "JSON_EXISTS_OP"; - case 1: - return "JSON_QUERY_OP"; - case 2: - return "JSON_VALUE_OP"; - case 3: - return "JSON_TABLE_OP"; - default: - throw new Error("Value not recognized in enum JsonExprOp"); - } - } - case "NullTestType": - { - switch (key) { - case 0: - return "IS_NULL"; - case 1: - return "IS_NOT_NULL"; - default: - throw new Error("Value not recognized in enum NullTestType"); - } - } - case "BoolTestType": - { - switch (key) { - case 0: - return "IS_TRUE"; - case 1: - return "IS_NOT_TRUE"; - case 2: - return "IS_FALSE"; - case 3: - return "IS_NOT_FALSE"; - case 4: - return "IS_UNKNOWN"; - case 5: - return "IS_NOT_UNKNOWN"; - default: - throw new Error("Value not recognized in enum BoolTestType"); - } - } - case "MergeMatchKind": - { - switch (key) { - case 0: - return "MERGE_WHEN_MATCHED"; - case 1: - return "MERGE_WHEN_NOT_MATCHED_BY_SOURCE"; - case 2: - return "MERGE_WHEN_NOT_MATCHED_BY_TARGET"; - default: - throw new Error("Value not recognized in enum MergeMatchKind"); - } - } - case "CmdType": - { - switch (key) { - case 0: - return "CMD_UNKNOWN"; - case 1: - return "CMD_SELECT"; - case 2: - return "CMD_UPDATE"; - case 3: - return "CMD_INSERT"; - case 4: - return "CMD_DELETE"; - case 5: - return "CMD_MERGE"; - case 6: - return "CMD_UTILITY"; - case 7: - return "CMD_NOTHING"; - default: - throw new Error("Value not recognized in enum CmdType"); - } - } - case "JoinType": - { - switch (key) { - case 0: - return "JOIN_INNER"; - case 1: - return "JOIN_LEFT"; - case 2: - return "JOIN_FULL"; - case 3: - return "JOIN_RIGHT"; - case 4: - return "JOIN_SEMI"; - case 5: - return "JOIN_ANTI"; - case 6: - return "JOIN_RIGHT_ANTI"; - case 7: - return "JOIN_UNIQUE_OUTER"; - case 8: - return "JOIN_UNIQUE_INNER"; - default: - throw new Error("Value not recognized in enum JoinType"); - } - } - case "AggStrategy": - { - switch (key) { - case 0: - return "AGG_PLAIN"; - case 1: - return "AGG_SORTED"; - case 2: - return "AGG_HASHED"; - case 3: - return "AGG_MIXED"; - default: - throw new Error("Value not recognized in enum AggStrategy"); - } - } - case "AggSplit": - { - switch (key) { - case 0: - return "AGGSPLIT_SIMPLE"; - case 1: - return "AGGSPLIT_INITIAL_SERIAL"; - case 2: - return "AGGSPLIT_FINAL_DESERIAL"; - default: - throw new Error("Value not recognized in enum AggSplit"); - } - } - case "SetOpCmd": - { - switch (key) { - case 0: - return "SETOPCMD_INTERSECT"; - case 1: - return "SETOPCMD_INTERSECT_ALL"; - case 2: - return "SETOPCMD_EXCEPT"; - case 3: - return "SETOPCMD_EXCEPT_ALL"; - default: - throw new Error("Value not recognized in enum SetOpCmd"); - } - } - case "SetOpStrategy": - { - switch (key) { - case 0: - return "SETOP_SORTED"; - case 1: - return "SETOP_HASHED"; - default: - throw new Error("Value not recognized in enum SetOpStrategy"); - } - } - case "OnConflictAction": - { - switch (key) { - case 0: - return "ONCONFLICT_NONE"; - case 1: - return "ONCONFLICT_NOTHING"; - case 2: - return "ONCONFLICT_UPDATE"; - default: - throw new Error("Value not recognized in enum OnConflictAction"); - } - } - case "LimitOption": - { - switch (key) { - case 0: - return "LIMIT_OPTION_DEFAULT"; - case 1: - return "LIMIT_OPTION_COUNT"; - case 2: - return "LIMIT_OPTION_WITH_TIES"; - default: - throw new Error("Value not recognized in enum LimitOption"); - } - } - case "LockClauseStrength": - { - switch (key) { - case 0: - return "LCS_NONE"; - case 1: - return "LCS_FORKEYSHARE"; - case 2: - return "LCS_FORSHARE"; - case 3: - return "LCS_FORNOKEYUPDATE"; - case 4: - return "LCS_FORUPDATE"; - default: - throw new Error("Value not recognized in enum LockClauseStrength"); - } - } - case "LockWaitPolicy": - { - switch (key) { - case 0: - return "LockWaitBlock"; - case 1: - return "LockWaitSkip"; - case 2: - return "LockWaitError"; - default: - throw new Error("Value not recognized in enum LockWaitPolicy"); - } - } - case "LockTupleMode": - { - switch (key) { - case 0: - return "LockTupleKeyShare"; - case 1: - return "LockTupleShare"; - case 2: - return "LockTupleNoKeyExclusive"; - case 3: - return "LockTupleExclusive"; - default: - throw new Error("Value not recognized in enum LockTupleMode"); - } - } - case "KeywordKind": - { - switch (key) { - case 0: - return "NO_KEYWORD"; - case 1: - return "UNRESERVED_KEYWORD"; - case 2: - return "COL_NAME_KEYWORD"; - case 3: - return "TYPE_FUNC_NAME_KEYWORD"; - case 4: - return "RESERVED_KEYWORD"; - default: - throw new Error("Value not recognized in enum KeywordKind"); - } - } - case "Token": - { - switch (key) { - case 0: - return "NUL"; - case 36: - return "ASCII_36"; - case 37: - return "ASCII_37"; - case 40: - return "ASCII_40"; - case 41: - return "ASCII_41"; - case 42: - return "ASCII_42"; - case 43: - return "ASCII_43"; - case 44: - return "ASCII_44"; - case 45: - return "ASCII_45"; - case 46: - return "ASCII_46"; - case 47: - return "ASCII_47"; - case 58: - return "ASCII_58"; - case 59: - return "ASCII_59"; - case 60: - return "ASCII_60"; - case 61: - return "ASCII_61"; - case 62: - return "ASCII_62"; - case 63: - return "ASCII_63"; - case 91: - return "ASCII_91"; - case 92: - return "ASCII_92"; - case 93: - return "ASCII_93"; - case 94: - return "ASCII_94"; - case 258: - return "IDENT"; - case 259: - return "UIDENT"; - case 260: - return "FCONST"; - case 261: - return "SCONST"; - case 262: - return "USCONST"; - case 263: - return "BCONST"; - case 264: - return "XCONST"; - case 265: - return "Op"; - case 266: - return "ICONST"; - case 267: - return "PARAM"; - case 268: - return "TYPECAST"; - case 269: - return "DOT_DOT"; - case 270: - return "COLON_EQUALS"; - case 271: - return "EQUALS_GREATER"; - case 272: - return "LESS_EQUALS"; - case 273: - return "GREATER_EQUALS"; - case 274: - return "NOT_EQUALS"; - case 275: - return "SQL_COMMENT"; - case 276: - return "C_COMMENT"; - case 277: - return "ABORT_P"; - case 278: - return "ABSENT"; - case 279: - return "ABSOLUTE_P"; - case 280: - return "ACCESS"; - case 281: - return "ACTION"; - case 282: - return "ADD_P"; - case 283: - return "ADMIN"; - case 284: - return "AFTER"; - case 285: - return "AGGREGATE"; - case 286: - return "ALL"; - case 287: - return "ALSO"; - case 288: - return "ALTER"; - case 289: - return "ALWAYS"; - case 290: - return "ANALYSE"; - case 291: - return "ANALYZE"; - case 292: - return "AND"; - case 293: - return "ANY"; - case 294: - return "ARRAY"; - case 295: - return "AS"; - case 296: - return "ASC"; - case 297: - return "ASENSITIVE"; - case 298: - return "ASSERTION"; - case 299: - return "ASSIGNMENT"; - case 300: - return "ASYMMETRIC"; - case 301: - return "ATOMIC"; - case 302: - return "AT"; - case 303: - return "ATTACH"; - case 304: - return "ATTRIBUTE"; - case 305: - return "AUTHORIZATION"; - case 306: - return "BACKWARD"; - case 307: - return "BEFORE"; - case 308: - return "BEGIN_P"; - case 309: - return "BETWEEN"; - case 310: - return "BIGINT"; - case 311: - return "BINARY"; - case 312: - return "BIT"; - case 313: - return "BOOLEAN_P"; - case 314: - return "BOTH"; - case 315: - return "BREADTH"; - case 316: - return "BY"; - case 317: - return "CACHE"; - case 318: - return "CALL"; - case 319: - return "CALLED"; - case 320: - return "CASCADE"; - case 321: - return "CASCADED"; - case 322: - return "CASE"; - case 323: - return "CAST"; - case 324: - return "CATALOG_P"; - case 325: - return "CHAIN"; - case 326: - return "CHAR_P"; - case 327: - return "CHARACTER"; - case 328: - return "CHARACTERISTICS"; - case 329: - return "CHECK"; - case 330: - return "CHECKPOINT"; - case 331: - return "CLASS"; - case 332: - return "CLOSE"; - case 333: - return "CLUSTER"; - case 334: - return "COALESCE"; - case 335: - return "COLLATE"; - case 336: - return "COLLATION"; - case 337: - return "COLUMN"; - case 338: - return "COLUMNS"; - case 339: - return "COMMENT"; - case 340: - return "COMMENTS"; - case 341: - return "COMMIT"; - case 342: - return "COMMITTED"; - case 343: - return "COMPRESSION"; - case 344: - return "CONCURRENTLY"; - case 345: - return "CONDITIONAL"; - case 346: - return "CONFIGURATION"; - case 347: - return "CONFLICT"; - case 348: - return "CONNECTION"; - case 349: - return "CONSTRAINT"; - case 350: - return "CONSTRAINTS"; - case 351: - return "CONTENT_P"; - case 352: - return "CONTINUE_P"; - case 353: - return "CONVERSION_P"; - case 354: - return "COPY"; - case 355: - return "COST"; - case 356: - return "CREATE"; - case 357: - return "CROSS"; - case 358: - return "CSV"; - case 359: - return "CUBE"; - case 360: - return "CURRENT_P"; - case 361: - return "CURRENT_CATALOG"; - case 362: - return "CURRENT_DATE"; - case 363: - return "CURRENT_ROLE"; - case 364: - return "CURRENT_SCHEMA"; - case 365: - return "CURRENT_TIME"; - case 366: - return "CURRENT_TIMESTAMP"; - case 367: - return "CURRENT_USER"; - case 368: - return "CURSOR"; - case 369: - return "CYCLE"; - case 370: - return "DATA_P"; - case 371: - return "DATABASE"; - case 372: - return "DAY_P"; - case 373: - return "DEALLOCATE"; - case 374: - return "DEC"; - case 375: - return "DECIMAL_P"; - case 376: - return "DECLARE"; - case 377: - return "DEFAULT"; - case 378: - return "DEFAULTS"; - case 379: - return "DEFERRABLE"; - case 380: - return "DEFERRED"; - case 381: - return "DEFINER"; - case 382: - return "DELETE_P"; - case 383: - return "DELIMITER"; - case 384: - return "DELIMITERS"; - case 385: - return "DEPENDS"; - case 386: - return "DEPTH"; - case 387: - return "DESC"; - case 388: - return "DETACH"; - case 389: - return "DICTIONARY"; - case 390: - return "DISABLE_P"; - case 391: - return "DISCARD"; - case 392: - return "DISTINCT"; - case 393: - return "DO"; - case 394: - return "DOCUMENT_P"; - case 395: - return "DOMAIN_P"; - case 396: - return "DOUBLE_P"; - case 397: - return "DROP"; - case 398: - return "EACH"; - case 399: - return "ELSE"; - case 400: - return "EMPTY_P"; - case 401: - return "ENABLE_P"; - case 402: - return "ENCODING"; - case 403: - return "ENCRYPTED"; - case 404: - return "END_P"; - case 405: - return "ENUM_P"; - case 406: - return "ERROR_P"; - case 407: - return "ESCAPE"; - case 408: - return "EVENT"; - case 409: - return "EXCEPT"; - case 410: - return "EXCLUDE"; - case 411: - return "EXCLUDING"; - case 412: - return "EXCLUSIVE"; - case 413: - return "EXECUTE"; - case 414: - return "EXISTS"; - case 415: - return "EXPLAIN"; - case 416: - return "EXPRESSION"; - case 417: - return "EXTENSION"; - case 418: - return "EXTERNAL"; - case 419: - return "EXTRACT"; - case 420: - return "FALSE_P"; - case 421: - return "FAMILY"; - case 422: - return "FETCH"; - case 423: - return "FILTER"; - case 424: - return "FINALIZE"; - case 425: - return "FIRST_P"; - case 426: - return "FLOAT_P"; - case 427: - return "FOLLOWING"; - case 428: - return "FOR"; - case 429: - return "FORCE"; - case 430: - return "FOREIGN"; - case 431: - return "FORMAT"; - case 432: - return "FORWARD"; - case 433: - return "FREEZE"; - case 434: - return "FROM"; - case 435: - return "FULL"; - case 436: - return "FUNCTION"; - case 437: - return "FUNCTIONS"; - case 438: - return "GENERATED"; - case 439: - return "GLOBAL"; - case 440: - return "GRANT"; - case 441: - return "GRANTED"; - case 442: - return "GREATEST"; - case 443: - return "GROUP_P"; - case 444: - return "GROUPING"; - case 445: - return "GROUPS"; - case 446: - return "HANDLER"; - case 447: - return "HAVING"; - case 448: - return "HEADER_P"; - case 449: - return "HOLD"; - case 450: - return "HOUR_P"; - case 451: - return "IDENTITY_P"; - case 452: - return "IF_P"; - case 453: - return "ILIKE"; - case 454: - return "IMMEDIATE"; - case 455: - return "IMMUTABLE"; - case 456: - return "IMPLICIT_P"; - case 457: - return "IMPORT_P"; - case 458: - return "IN_P"; - case 459: - return "INCLUDE"; - case 460: - return "INCLUDING"; - case 461: - return "INCREMENT"; - case 462: - return "INDENT"; - case 463: - return "INDEX"; - case 464: - return "INDEXES"; - case 465: - return "INHERIT"; - case 466: - return "INHERITS"; - case 467: - return "INITIALLY"; - case 468: - return "INLINE_P"; - case 469: - return "INNER_P"; - case 470: - return "INOUT"; - case 471: - return "INPUT_P"; - case 472: - return "INSENSITIVE"; - case 473: - return "INSERT"; - case 474: - return "INSTEAD"; - case 475: - return "INT_P"; - case 476: - return "INTEGER"; - case 477: - return "INTERSECT"; - case 478: - return "INTERVAL"; - case 479: - return "INTO"; - case 480: - return "INVOKER"; - case 481: - return "IS"; - case 482: - return "ISNULL"; - case 483: - return "ISOLATION"; - case 484: - return "JOIN"; - case 485: - return "JSON"; - case 486: - return "JSON_ARRAY"; - case 487: - return "JSON_ARRAYAGG"; - case 488: - return "JSON_EXISTS"; - case 489: - return "JSON_OBJECT"; - case 490: - return "JSON_OBJECTAGG"; - case 491: - return "JSON_QUERY"; - case 492: - return "JSON_SCALAR"; - case 493: - return "JSON_SERIALIZE"; - case 494: - return "JSON_TABLE"; - case 495: - return "JSON_VALUE"; - case 496: - return "KEEP"; - case 497: - return "KEY"; - case 498: - return "KEYS"; - case 499: - return "LABEL"; - case 500: - return "LANGUAGE"; - case 501: - return "LARGE_P"; - case 502: - return "LAST_P"; - case 503: - return "LATERAL_P"; - case 504: - return "LEADING"; - case 505: - return "LEAKPROOF"; - case 506: - return "LEAST"; - case 507: - return "LEFT"; - case 508: - return "LEVEL"; - case 509: - return "LIKE"; - case 510: - return "LIMIT"; - case 511: - return "LISTEN"; - case 512: - return "LOAD"; - case 513: - return "LOCAL"; - case 514: - return "LOCALTIME"; - case 515: - return "LOCALTIMESTAMP"; - case 516: - return "LOCATION"; - case 517: - return "LOCK_P"; - case 518: - return "LOCKED"; - case 519: - return "LOGGED"; - case 520: - return "MAPPING"; - case 521: - return "MATCH"; - case 522: - return "MATCHED"; - case 523: - return "MATERIALIZED"; - case 524: - return "MAXVALUE"; - case 525: - return "MERGE"; - case 526: - return "MERGE_ACTION"; - case 527: - return "METHOD"; - case 528: - return "MINUTE_P"; - case 529: - return "MINVALUE"; - case 530: - return "MODE"; - case 531: - return "MONTH_P"; - case 532: - return "MOVE"; - case 533: - return "NAME_P"; - case 534: - return "NAMES"; - case 535: - return "NATIONAL"; - case 536: - return "NATURAL"; - case 537: - return "NCHAR"; - case 538: - return "NESTED"; - case 539: - return "NEW"; - case 540: - return "NEXT"; - case 541: - return "NFC"; - case 542: - return "NFD"; - case 543: - return "NFKC"; - case 544: - return "NFKD"; - case 545: - return "NO"; - case 546: - return "NONE"; - case 547: - return "NORMALIZE"; - case 548: - return "NORMALIZED"; - case 549: - return "NOT"; - case 550: - return "NOTHING"; - case 551: - return "NOTIFY"; - case 552: - return "NOTNULL"; - case 553: - return "NOWAIT"; - case 554: - return "NULL_P"; - case 555: - return "NULLIF"; - case 556: - return "NULLS_P"; - case 557: - return "NUMERIC"; - case 558: - return "OBJECT_P"; - case 559: - return "OF"; - case 560: - return "OFF"; - case 561: - return "OFFSET"; - case 562: - return "OIDS"; - case 563: - return "OLD"; - case 564: - return "OMIT"; - case 565: - return "ON"; - case 566: - return "ONLY"; - case 567: - return "OPERATOR"; - case 568: - return "OPTION"; - case 569: - return "OPTIONS"; - case 570: - return "OR"; - case 571: - return "ORDER"; - case 572: - return "ORDINALITY"; - case 573: - return "OTHERS"; - case 574: - return "OUT_P"; - case 575: - return "OUTER_P"; - case 576: - return "OVER"; - case 577: - return "OVERLAPS"; - case 578: - return "OVERLAY"; - case 579: - return "OVERRIDING"; - case 580: - return "OWNED"; - case 581: - return "OWNER"; - case 582: - return "PARALLEL"; - case 583: - return "PARAMETER"; - case 584: - return "PARSER"; - case 585: - return "PARTIAL"; - case 586: - return "PARTITION"; - case 587: - return "PASSING"; - case 588: - return "PASSWORD"; - case 589: - return "PATH"; - case 590: - return "PLACING"; - case 591: - return "PLAN"; - case 592: - return "PLANS"; - case 593: - return "POLICY"; - case 594: - return "POSITION"; - case 595: - return "PRECEDING"; - case 596: - return "PRECISION"; - case 597: - return "PRESERVE"; - case 598: - return "PREPARE"; - case 599: - return "PREPARED"; - case 600: - return "PRIMARY"; - case 601: - return "PRIOR"; - case 602: - return "PRIVILEGES"; - case 603: - return "PROCEDURAL"; - case 604: - return "PROCEDURE"; - case 605: - return "PROCEDURES"; - case 606: - return "PROGRAM"; - case 607: - return "PUBLICATION"; - case 608: - return "QUOTE"; - case 609: - return "QUOTES"; - case 610: - return "RANGE"; - case 611: - return "READ"; - case 612: - return "REAL"; - case 613: - return "REASSIGN"; - case 614: - return "RECHECK"; - case 615: - return "RECURSIVE"; - case 616: - return "REF_P"; - case 617: - return "REFERENCES"; - case 618: - return "REFERENCING"; - case 619: - return "REFRESH"; - case 620: - return "REINDEX"; - case 621: - return "RELATIVE_P"; - case 622: - return "RELEASE"; - case 623: - return "RENAME"; - case 624: - return "REPEATABLE"; - case 625: - return "REPLACE"; - case 626: - return "REPLICA"; - case 627: - return "RESET"; - case 628: - return "RESTART"; - case 629: - return "RESTRICT"; - case 630: - return "RETURN"; - case 631: - return "RETURNING"; - case 632: - return "RETURNS"; - case 633: - return "REVOKE"; - case 634: - return "RIGHT"; - case 635: - return "ROLE"; - case 636: - return "ROLLBACK"; - case 637: - return "ROLLUP"; - case 638: - return "ROUTINE"; - case 639: - return "ROUTINES"; - case 640: - return "ROW"; - case 641: - return "ROWS"; - case 642: - return "RULE"; - case 643: - return "SAVEPOINT"; - case 644: - return "SCALAR"; - case 645: - return "SCHEMA"; - case 646: - return "SCHEMAS"; - case 647: - return "SCROLL"; - case 648: - return "SEARCH"; - case 649: - return "SECOND_P"; - case 650: - return "SECURITY"; - case 651: - return "SELECT"; - case 652: - return "SEQUENCE"; - case 653: - return "SEQUENCES"; - case 654: - return "SERIALIZABLE"; - case 655: - return "SERVER"; - case 656: - return "SESSION"; - case 657: - return "SESSION_USER"; - case 658: - return "SET"; - case 659: - return "SETS"; - case 660: - return "SETOF"; - case 661: - return "SHARE"; - case 662: - return "SHOW"; - case 663: - return "SIMILAR"; - case 664: - return "SIMPLE"; - case 665: - return "SKIP"; - case 666: - return "SMALLINT"; - case 667: - return "SNAPSHOT"; - case 668: - return "SOME"; - case 669: - return "SOURCE"; - case 670: - return "SQL_P"; - case 671: - return "STABLE"; - case 672: - return "STANDALONE_P"; - case 673: - return "START"; - case 674: - return "STATEMENT"; - case 675: - return "STATISTICS"; - case 676: - return "STDIN"; - case 677: - return "STDOUT"; - case 678: - return "STORAGE"; - case 679: - return "STORED"; - case 680: - return "STRICT_P"; - case 681: - return "STRING_P"; - case 682: - return "STRIP_P"; - case 683: - return "SUBSCRIPTION"; - case 684: - return "SUBSTRING"; - case 685: - return "SUPPORT"; - case 686: - return "SYMMETRIC"; - case 687: - return "SYSID"; - case 688: - return "SYSTEM_P"; - case 689: - return "SYSTEM_USER"; - case 690: - return "TABLE"; - case 691: - return "TABLES"; - case 692: - return "TABLESAMPLE"; - case 693: - return "TABLESPACE"; - case 694: - return "TARGET"; - case 695: - return "TEMP"; - case 696: - return "TEMPLATE"; - case 697: - return "TEMPORARY"; - case 698: - return "TEXT_P"; - case 699: - return "THEN"; - case 700: - return "TIES"; - case 701: - return "TIME"; - case 702: - return "TIMESTAMP"; - case 703: - return "TO"; - case 704: - return "TRAILING"; - case 705: - return "TRANSACTION"; - case 706: - return "TRANSFORM"; - case 707: - return "TREAT"; - case 708: - return "TRIGGER"; - case 709: - return "TRIM"; - case 710: - return "TRUE_P"; - case 711: - return "TRUNCATE"; - case 712: - return "TRUSTED"; - case 713: - return "TYPE_P"; - case 714: - return "TYPES_P"; - case 715: - return "UESCAPE"; - case 716: - return "UNBOUNDED"; - case 717: - return "UNCONDITIONAL"; - case 718: - return "UNCOMMITTED"; - case 719: - return "UNENCRYPTED"; - case 720: - return "UNION"; - case 721: - return "UNIQUE"; - case 722: - return "UNKNOWN"; - case 723: - return "UNLISTEN"; - case 724: - return "UNLOGGED"; - case 725: - return "UNTIL"; - case 726: - return "UPDATE"; - case 727: - return "USER"; - case 728: - return "USING"; - case 729: - return "VACUUM"; - case 730: - return "VALID"; - case 731: - return "VALIDATE"; - case 732: - return "VALIDATOR"; - case 733: - return "VALUE_P"; - case 734: - return "VALUES"; - case 735: - return "VARCHAR"; - case 736: - return "VARIADIC"; - case 737: - return "VARYING"; - case 738: - return "VERBOSE"; - case 739: - return "VERSION_P"; - case 740: - return "VIEW"; - case 741: - return "VIEWS"; - case 742: - return "VOLATILE"; - case 743: - return "WHEN"; - case 744: - return "WHERE"; - case 745: - return "WHITESPACE_P"; - case 746: - return "WINDOW"; - case 747: - return "WITH"; - case 748: - return "WITHIN"; - case 749: - return "WITHOUT"; - case 750: - return "WORK"; - case 751: - return "WRAPPER"; - case 752: - return "WRITE"; - case 753: - return "XML_P"; - case 754: - return "XMLATTRIBUTES"; - case 755: - return "XMLCONCAT"; - case 756: - return "XMLELEMENT"; - case 757: - return "XMLEXISTS"; - case 758: - return "XMLFOREST"; - case 759: - return "XMLNAMESPACES"; - case 760: - return "XMLPARSE"; - case 761: - return "XMLPI"; - case 762: - return "XMLROOT"; - case 763: - return "XMLSERIALIZE"; - case 764: - return "XMLTABLE"; - case 765: - return "YEAR_P"; - case 766: - return "YES_P"; - case 767: - return "ZONE"; - case 768: - return "FORMAT_LA"; - case 769: - return "NOT_LA"; - case 770: - return "NULLS_LA"; - case 771: - return "WITH_LA"; - case 772: - return "WITHOUT_LA"; - case 773: - return "MODE_TYPE_NAME"; - case 774: - return "MODE_PLPGSQL_EXPR"; - case 775: - return "MODE_PLPGSQL_ASSIGN1"; - case 776: - return "MODE_PLPGSQL_ASSIGN2"; - case 777: - return "MODE_PLPGSQL_ASSIGN3"; - case 778: - return "UMINUS"; - default: - throw new Error("Value not recognized in enum Token"); - } - } - default: - throw new Error("Enum type not recognized"); - } -}; \ No newline at end of file diff --git a/packages/transform/src/index.ts b/packages/transform/src/index.ts index 391bc441..5d4b89c4 100644 --- a/packages/transform/src/index.ts +++ b/packages/transform/src/index.ts @@ -22,4 +22,4 @@ export { PG14ToPG17Transformer } from './transformers-direct/v14-to-v17'; export { PG15ToPG17Transformer } from './transformers-direct/v15-to-v17'; export { PG16ToPG17Transformer } from './transformers-direct/v16-to-v17'; -export { PG13Node, PG14Node, PG15Node, PG16Node, PG17Node, PG13Types, PG14Types, PG15Types, PG16Types, PG17Types }; +export { PG13Node, PG14Node, PG15Node, PG16Node, PG17Node, PG13Types, PG14Types, PG15Types, PG16Types, PG17Types }; \ No newline at end of file diff --git a/packages/traverse/README.md b/packages/traverse/README.md new file mode 100644 index 00000000..0ba3377b --- /dev/null +++ b/packages/traverse/README.md @@ -0,0 +1,314 @@ +# @pgsql/traverse + +

+ +

+ + +

+ + + + +

+ + +PostgreSQL AST traversal utilities for pgsql-parser. This package provides a visitor pattern for traversing PostgreSQL Abstract Syntax Tree (AST) nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. + +## Installation + +```bash +npm install @pgsql/traverse +``` + +## Usage + +### Walk API (Recommended) + +The `walk` function provides improved traversal with NodePath context and early return support: + +```typescript +import { walk, NodePath } from '@pgsql/traverse'; +import type { Walker, Visitor } from '@pgsql/traverse'; + +// Using a simple walker function +const walker: Walker = (path: NodePath) => { + console.log(`Visiting ${path.tag} at path:`, path.path); + + // Return false to skip traversing children + if (path.tag === 'SelectStmt') { + return false; // Skip SELECT statement children + } +}; + +walk(ast, walker); + +// Using a visitor object (recommended for multiple node types) +const visitor: Visitor = { + SelectStmt: (path) => { + console.log('SELECT statement:', path.node); + }, + RangeVar: (path) => { + console.log('Table:', path.node.relname); + console.log('Path to table:', path.path); + console.log('Parent node:', path.parent?.tag); + } +}; + +walk(ast, visitor); +``` + +### NodePath Class + +The `NodePath` class provides rich context information: + +```typescript +class NodePath { + tag: TTag; // Node type (e.g., 'SelectStmt', 'RangeVar') + node: Node[TTag]; // The actual node data + parent: NodePath | null; // Parent NodePath (null for root) + keyPath: readonly (string | number)[]; // Full path array + + get path(): (string | number)[]; // Copy of keyPath + get key(): string | number; // Last element of path +} +``` + +### Runtime Schema Integration + +The new implementation uses PostgreSQL's runtime schema to precisely determine which fields contain Node types that need traversal, eliminating guesswork and improving accuracy. + +### Visit API + +The original `visit` function is still available for backward compatibility: + +```typescript +import { visit } from '@pgsql/traverse'; + +const visitor = { + SelectStmt: (node, ctx) => { + console.log('Found SELECT statement:', node); + console.log('Path:', ctx.path); + }, + RangeVar: (node, ctx) => { + console.log('Found table reference:', node.relname); + } +}; + +// Parse some SQL and traverse the AST +const ast = /* your parsed AST */; +visit(ast, visitor); +``` + +### Working with ParseResult + +```typescript +import { walk } from '@pgsql/traverse'; + +const visitor = { + ParseResult: (path) => { + console.log('Parse result version:', path.node.version); + console.log('Number of statements:', path.node.stmts.length); + }, + SelectStmt: (path) => { + console.log('SELECT statement found'); + } +}; + +walk(parseResult, visitor); +``` + +### Using Visitor Context + +The visitor context provides information about the current traversal state: + +```typescript +const visitor = { + RangeVar: (path) => { + console.log('Table name:', path.node.relname); + console.log('Path to this node:', path.path); + console.log('Parent node:', path.parent?.tag); + console.log('Key in parent:', path.key); + } +}; +``` + +### Collecting Information During Traversal + +```typescript +import { visit } from '@pgsql/traverse'; +import type { Visitor } from '@pgsql/traverse'; + +const tableNames: string[] = []; +const columnRefs: string[] = []; + +const visitor: Visitor = { + RangeVar: (node) => { + if (node.relname) { + tableNames.push(node.relname); + } + }, + ColumnRef: (node) => { + if (node.fields) { + node.fields.forEach(field => { + if (field.String?.sval) { + columnRefs.push(field.String.sval); + } + }); + } + } +}; + +visit(ast, visitor); + +console.log('Tables referenced:', tableNames); +console.log('Columns referenced:', columnRefs); +``` + +## API + +### `walk(root, callback, parent?, keyPath?)` + +Walks the tree of PostgreSQL AST nodes using runtime schema for precise traversal. + +**Parameters:** +- `root`: The AST node to traverse +- `callback`: A walker function or visitor object +- `parent?`: Optional parent NodePath (for internal use) +- `keyPath?`: Optional key path array (for internal use) + +**Example:** +```typescript +walk(ast, { + SelectStmt: (path) => { + // Handle SELECT statements + // Return false to skip children + }, + RangeVar: (path) => { + // Handle table references + } +}); +``` + +### `visit(node, visitor, ctx?)` (Legacy) + +Recursively visits a PostgreSQL AST node, calling any matching visitor functions. Maintained for backward compatibility. + +**Parameters:** +- `node`: The AST node to traverse +- `visitor`: An object with visitor functions for different node types +- `ctx?`: Optional initial visitor context + +### Types + +#### `Visitor` + +An object type where keys are node type names and values are walker functions: + +```typescript +type Visitor = { + [TTag in NodeTag]?: Walker>; +}; +``` + +#### `Walker` + +A function that receives a NodePath and can return false to skip children: + +```typescript +type Walker = ( + path: TNodePath, +) => boolean | void; +``` + +#### `NodePath` + +A class that encapsulates node traversal context: + +```typescript +class NodePath { + tag: TTag; // Node type + node: Node[TTag]; // Node data + parent: NodePath | null; // Parent path + keyPath: readonly (string | number)[]; // Full path + + get path(): (string | number)[]; // Path copy + get key(): string | number; // Current key +} +``` + +#### `VisitorContext` (Legacy) + +Context information provided to legacy visitor functions: + +```typescript +type VisitorContext = { + path: (string | number)[]; // Path to current node + parent: any; // Parent node + key: string | number; // Key in parent node +}; +``` + +#### `NodeTag` + +Union type of all PostgreSQL AST node type names: + +```typescript +type NodeTag = keyof Node; +``` + +## Supported Node Types + +This package works with all PostgreSQL AST node types defined in `@pgsql/types`, including: + +- `ParseResult` - Root parse result from libpg-query +- `SelectStmt` - SELECT statements +- `InsertStmt` - INSERT statements +- `UpdateStmt` - UPDATE statements +- `DeleteStmt` - DELETE statements +- `RangeVar` - Table references +- `ColumnRef` - Column references +- `A_Expr` - Expressions +- `A_Const` - Constants +- And many more... + +## Integration with pgsql-parser + +This package is designed to work seamlessly with the pgsql-parser ecosystem: + +```typescript +import { parse } from 'pgsql-parser'; +import { visit } from '@pgsql/traverse'; + +const sql = 'SELECT name, email FROM users WHERE age > 18'; +const ast = await parse(sql); + +const visitor = { + RangeVar: (node) => { + console.log('Table:', node.relname); + }, + ColumnRef: (node) => { + console.log('Column:', node.fields?.[0]?.String?.sval); + } +}; + +visit(ast, visitor); +``` + +## Related + +* [pgsql-parser](https://www.npmjs.com/package/pgsql-parser): The real PostgreSQL parser for Node.js, providing symmetric parsing and deparsing of SQL statements with actual PostgreSQL parser integration. +* [pgsql-deparser](https://www.npmjs.com/package/pgsql-deparser): A streamlined tool designed for converting PostgreSQL ASTs back into SQL queries, focusing solely on deparser functionality to complement `pgsql-parser`. +* [@pgsql/parser](https://www.npmjs.com/package/@pgsql/parser): Multi-version PostgreSQL parser with dynamic version selection at runtime, supporting PostgreSQL 15, 16, and 17 in a single package. +* [@pgsql/types](https://www.npmjs.com/package/@pgsql/types): Offers TypeScript type definitions for PostgreSQL AST nodes, facilitating type-safe construction, analysis, and manipulation of ASTs. +* [@pgsql/enums](https://www.npmjs.com/package/@pgsql/enums): Provides TypeScript enum definitions for PostgreSQL constants, enabling type-safe usage of PostgreSQL enums and constants in your applications. +* [@pgsql/utils](https://www.npmjs.com/package/@pgsql/utils): A comprehensive utility library for PostgreSQL, offering type-safe AST node creation and enum value conversions, simplifying the construction and manipulation of PostgreSQL ASTs. +* [@pgsql/traverse](https://www.npmjs.com/package/@pgsql/traverse): PostgreSQL AST traversal utilities for pgsql-parser, providing a visitor pattern for traversing PostgreSQL Abstract Syntax Tree nodes, similar to Babel's traverse functionality but specifically designed for PostgreSQL AST structures. +* [pg-proto-parser](https://www.npmjs.com/package/pg-proto-parser): A TypeScript tool that parses PostgreSQL Protocol Buffers definitions to generate TypeScript interfaces, utility functions, and JSON mappings for enums. +* [libpg-query](https://github.com/launchql/libpg-query-node): The real PostgreSQL parser exposed for Node.js, used primarily in `pgsql-parser` for parsing and deparsing SQL queries. + +## Disclaimer + +AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND. + +No developer or entity involved in creating Software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the Software code or Software CLI, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value. diff --git a/packages/traverse/__test__/traverse.test.ts b/packages/traverse/__test__/traverse.test.ts new file mode 100644 index 00000000..a5fb5025 --- /dev/null +++ b/packages/traverse/__test__/traverse.test.ts @@ -0,0 +1,393 @@ +import { visit, walk, NodePath } from '../src'; +import type { Visitor, Walker } from '../src'; + +describe('traverse', () => { + it('should visit SelectStmt nodes with new walk API', () => { + const selectStmtVisited: any[] = []; + const rangeVarVisited: any[] = []; + + const visitor: Visitor = { + SelectStmt: (path: NodePath) => { + selectStmtVisited.push({ node: path.node, ctx: { path: path.path, parent: path.parent?.node, key: path.key } }); + }, + RangeVar: (path: NodePath) => { + rangeVarVisited.push({ node: path.node, ctx: { path: path.path, parent: path.parent?.node, key: path.key } }); + } + }; + + const ast = { + SelectStmt: { + targetList: [ + { + ResTarget: { + val: { + ColumnRef: { + fields: [{ A_Star: {} }] + } + } + } + } + ], + fromClause: [ + { + RangeVar: { + relname: 'users', + inh: true, + relpersistence: 'p' + } + } + ], + limitOption: 'LIMIT_OPTION_DEFAULT', + op: 'SETOP_NONE' + } + }; + + walk(ast, visitor); + + expect(selectStmtVisited).toHaveLength(1); + expect(rangeVarVisited).toHaveLength(1); + expect(rangeVarVisited[0].node.relname).toBe('users'); + }); + + it('should provide NodePath with correct properties', () => { + const paths: NodePath[] = []; + + const walker: Walker = (path: NodePath) => { + paths.push(path); + }; + + const ast = { + SelectStmt: { + fromClause: [ + { + RangeVar: { + relname: 'users', + inh: true, + relpersistence: 'p' + } + } + ] + } + }; + + walk(ast, walker); + + const selectPath = paths.find(p => p.tag === 'SelectStmt'); + const rangeVarPath = paths.find(p => p.tag === 'RangeVar'); + + expect(selectPath).toBeDefined(); + expect(selectPath!.tag).toBe('SelectStmt'); + expect(selectPath!.parent).toBeNull(); + expect(selectPath!.path).toEqual([]); + + expect(rangeVarPath).toBeDefined(); + expect(rangeVarPath!.tag).toBe('RangeVar'); + expect(rangeVarPath!.parent).toBe(selectPath); + expect(rangeVarPath!.path).toEqual(['fromClause', 0]); + expect(rangeVarPath!.key).toBe(0); + }); + + it('should support early return to skip subtrees', () => { + const visitedNodes: string[] = []; + + const walker: Walker = (path: NodePath) => { + visitedNodes.push(path.tag); + + if (path.tag === 'SelectStmt') { + return false; + } + }; + + const ast = { + SelectStmt: { + fromClause: [ + { + RangeVar: { + relname: 'users', + inh: true, + relpersistence: 'p' + } + } + ] + } + }; + + walk(ast, walker); + + expect(visitedNodes).toEqual(['SelectStmt']); + expect(visitedNodes).not.toContain('RangeVar'); + }); + + it('should use runtime schema for precise traversal', () => { + const visitedNodes: string[] = []; + + const visitor: Visitor = { + A_Expr: (path: NodePath) => { + visitedNodes.push('A_Expr'); + }, + ColumnRef: (path: NodePath) => { + visitedNodes.push('ColumnRef'); + }, + A_Const: (path: NodePath) => { + visitedNodes.push('A_Const'); + } + }; + + const ast = { + A_Expr: { + kind: 'AEXPR_OP', + name: [{ String: { sval: '=' } }], + lexpr: { + ColumnRef: { + fields: [{ String: { sval: 'id' } }] + } + }, + rexpr: { + A_Const: { + ival: { Integer: { ival: 1 } } + } + } + } + }; + + walk(ast, visitor); + + expect(visitedNodes).toContain('A_Expr'); + expect(visitedNodes).toContain('ColumnRef'); + expect(visitedNodes).toContain('A_Const'); + }); + + it('should maintain backward compatibility with visit function', () => { + const selectStmtVisited: any[] = []; + const rangeVarVisited: any[] = []; + + const visitor = { + SelectStmt: (node: any, ctx: any) => { + selectStmtVisited.push({ node, ctx }); + }, + RangeVar: (node: any, ctx: any) => { + rangeVarVisited.push({ node, ctx }); + } + }; + + const ast = { + SelectStmt: { + fromClause: [ + { + RangeVar: { + relname: 'users', + inh: true, + relpersistence: 'p' + } + } + ] + } + }; + + visit(ast, visitor); + + expect(selectStmtVisited).toHaveLength(1); + expect(rangeVarVisited).toHaveLength(1); + expect(rangeVarVisited[0].node.relname).toBe('users'); + }); + + it('should handle ParseResult nodes', () => { + const parseResultVisited: any[] = []; + const rawStmtVisited: any[] = []; + const selectStmtVisited: any[] = []; + + const visitor = { + ParseResult: (node: any, ctx: any) => { + parseResultVisited.push({ node, ctx }); + }, + RawStmt: (node: any, ctx: any) => { + rawStmtVisited.push({ node, ctx }); + }, + SelectStmt: (node: any, ctx: any) => { + selectStmtVisited.push({ node, ctx }); + } + }; + + const parseResult = { + ParseResult: { + version: 170004, + stmts: [ + { + RawStmt: { + stmt: { + SelectStmt: { + targetList: [] as any[], + limitOption: 'LIMIT_OPTION_DEFAULT', + op: 'SETOP_NONE' + } + } + } + } + ] + } + }; + + visit(parseResult, visitor); + + expect(parseResultVisited).toHaveLength(1); + expect(rawStmtVisited).toHaveLength(1); + expect(selectStmtVisited).toHaveLength(1); + expect(parseResultVisited[0].node.version).toBe(170004); + expect(rawStmtVisited[0].node.stmt).toBeDefined(); + expect(selectStmtVisited[0].node.limitOption).toBe('LIMIT_OPTION_DEFAULT'); + }); + + it('should provide correct visitor context', () => { + const contexts: any[] = []; + + const visitor = { + RangeVar: (node: any, ctx: any) => { + contexts.push(ctx); + } + }; + + const ast = { + SelectStmt: { + fromClause: [ + { + RangeVar: { + relname: 'users', + inh: true, + relpersistence: 'p' + } + } + ] + } + }; + + visit(ast, visitor); + + expect(contexts).toHaveLength(1); + expect(contexts[0].path).toEqual(['fromClause', 0]); + expect(contexts[0].key).toBe(0); + }); + + it('should handle null and undefined nodes gracefully', () => { + const visitor = { + SelectStmt: () => { + throw new Error('Should not be called'); + } + }; + + expect(() => visit(null as any, visitor)).not.toThrow(); + expect(() => visit(undefined as any, visitor)).not.toThrow(); + expect(() => visit('string' as any, visitor)).not.toThrow(); + }); + + it('should handle nested complex AST structures', () => { + const visitedNodes: string[] = []; + + const visitor = { + SelectStmt: () => visitedNodes.push('SelectStmt'), + ResTarget: () => visitedNodes.push('ResTarget'), + ColumnRef: () => visitedNodes.push('ColumnRef'), + A_Star: () => visitedNodes.push('A_Star'), + RangeVar: () => visitedNodes.push('RangeVar'), + A_Expr: () => visitedNodes.push('A_Expr'), + A_Const: () => visitedNodes.push('A_Const') + }; + + const complexAst = { + SelectStmt: { + targetList: [ + { + ResTarget: { + val: { + ColumnRef: { + fields: [{ A_Star: {} }] + } + } + } + } + ], + fromClause: [ + { + RangeVar: { + relname: 'users', + inh: true, + relpersistence: 'p' + } + } + ], + whereClause: { + A_Expr: { + kind: 'AEXPR_OP', + name: [{ String: { sval: '=' } }], + lexpr: { + ColumnRef: { + fields: [{ String: { sval: 'id' } }] + } + }, + rexpr: { + A_Const: { + ival: { Integer: { ival: 1 } } + } + } + } + }, + limitOption: 'LIMIT_OPTION_DEFAULT', + op: 'SETOP_NONE' + } + }; + + visit(complexAst, visitor); + + expect(visitedNodes).toContain('SelectStmt'); + expect(visitedNodes).toContain('ResTarget'); + expect(visitedNodes).toContain('ColumnRef'); + expect(visitedNodes).toContain('A_Star'); + expect(visitedNodes).toContain('RangeVar'); + expect(visitedNodes).toContain('A_Expr'); + expect(visitedNodes).toContain('A_Const'); + }); + + it('should handle arrays of nodes correctly', () => { + const targetListVisited: any[] = []; + + const visitor = { + ResTarget: (node: any, ctx: any) => { + targetListVisited.push({ node, ctx }); + } + }; + + const ast = { + SelectStmt: { + targetList: [ + { + ResTarget: { + val: { + ColumnRef: { + fields: [{ String: { sval: 'name' } }] + } + } + } + }, + { + ResTarget: { + val: { + ColumnRef: { + fields: [{ String: { sval: 'email' } }] + } + } + } + } + ], + limitOption: 'LIMIT_OPTION_DEFAULT', + op: 'SETOP_NONE' + } + }; + + visit(ast, visitor); + + expect(targetListVisited).toHaveLength(2); + expect(targetListVisited[0].ctx.key).toBe(0); + expect(targetListVisited[1].ctx.key).toBe(1); + expect(targetListVisited[0].ctx.path).toEqual(['targetList', 0]); + expect(targetListVisited[1].ctx.path).toEqual(['targetList', 1]); + }); +}); diff --git a/packages/traverse/jest.config.js b/packages/traverse/jest.config.js new file mode 100644 index 00000000..057a9420 --- /dev/null +++ b/packages/traverse/jest.config.js @@ -0,0 +1,18 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + transform: { + '^.+\\.tsx?$': [ + 'ts-jest', + { + babelConfig: false, + tsconfig: 'tsconfig.json', + }, + ], + }, + transformIgnorePatterns: [`/node_modules/*`], + testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + modulePathIgnorePatterns: ['dist/*'] +}; diff --git a/packages/traverse/package.json b/packages/traverse/package.json new file mode 100644 index 00000000..6c11ea87 --- /dev/null +++ b/packages/traverse/package.json @@ -0,0 +1,46 @@ +{ + "name": "@pgsql/traverse", + "version": "17.0.0", + "author": "Dan Lynch ", + "description": "PostgreSQL AST traversal utilities for pgsql-parser", + "main": "index.js", + "module": "esm/index.js", + "types": "index.d.ts", + "homepage": "https://github.com/launchql/pgsql-parser", + "license": "SEE LICENSE IN LICENSE", + "publishConfig": { + "access": "public", + "directory": "dist" + }, + "repository": { + "type": "git", + "url": "https://github.com/launchql/pgsql-parser" + }, + "bugs": { + "url": "https://github.com/launchql/pgsql-parser/issues" + }, + "scripts": { + "copy": "copyfiles -f ../../LICENSE README.md package.json dist", + "clean": "rimraf dist", + "prepare": "npm run build", + "build": "npm run clean && tsc && tsc -p tsconfig.esm.json && npm run copy", + "build:dev": "npm run clean && tsc --declarationMap && tsc -p tsconfig.esm.json && npm run copy", + "build:proto": "ts-node scripts/pg-proto-parser", + "lint": "eslint . --fix", + "test": "jest", + "test:watch": "jest --watch" + }, + "dependencies": { + "@pgsql/types": "^17.6.1", + "pg-proto-parser": "^1.29.1" + }, + "keywords": [ + "sql", + "postgres", + "postgresql", + "pg", + "ast", + "traverse", + "visitor" + ] +} diff --git a/packages/traverse/scripts/pg-proto-parser.ts b/packages/traverse/scripts/pg-proto-parser.ts new file mode 100644 index 00000000..a98d1386 --- /dev/null +++ b/packages/traverse/scripts/pg-proto-parser.ts @@ -0,0 +1,22 @@ +import { PgProtoParser, PgProtoParserOptions } from 'pg-proto-parser'; +import { resolve, join } from 'path'; + +const versions = ['17']; +const baseDir = resolve(join(__dirname, '../../../__fixtures__/proto')); + +for (const version of versions) { + const inFile = join(baseDir, `${version}-latest.proto`); + const outDir = resolve(join(__dirname, `../src/${version}`)); + + const options: PgProtoParserOptions = { + outDir, + runtimeSchema: { + enabled: true, + filename: 'runtime-schema.ts', + format: 'typescript' + } + }; + + const parser = new PgProtoParser(inFile, options); + parser.write(); +} diff --git a/packages/transform/src/17/runtime-schema.ts b/packages/traverse/src/17/runtime-schema.ts similarity index 100% rename from packages/transform/src/17/runtime-schema.ts rename to packages/traverse/src/17/runtime-schema.ts diff --git a/packages/traverse/src/index.ts b/packages/traverse/src/index.ts new file mode 100644 index 00000000..127dc14a --- /dev/null +++ b/packages/traverse/src/index.ts @@ -0,0 +1,2 @@ +export { walk, visit, NodePath } from './traverse'; +export type { Visitor, VisitorContext, Walker, NodeTag } from './traverse'; diff --git a/packages/traverse/src/traverse.ts b/packages/traverse/src/traverse.ts new file mode 100644 index 00000000..9f6e7db4 --- /dev/null +++ b/packages/traverse/src/traverse.ts @@ -0,0 +1,147 @@ + +import type { Node } from '@pgsql/types'; +import type { NodeSpec } from './17/runtime-schema'; +import { runtimeSchema } from './17/runtime-schema'; + +const schemaMap = new Map(runtimeSchema.map((spec: NodeSpec) => [spec.name, spec])); + +export type NodeTag = keyof Node; + +export class NodePath { + constructor( + public tag: TTag, + public node: any, + public parent: NodePath | null = null, + public keyPath: readonly (string | number)[] = [] + ) {} + + get path(): (string | number)[] { + return [...this.keyPath]; + } + + get key(): string | number { + return this.keyPath[this.keyPath.length - 1] ?? ''; + } +} + +export type Walker = ( + path: TNodePath, +) => boolean | void; + +export type Visitor = { + [key: string]: Walker; +}; + +/** + * Walks the tree of PostgreSQL AST nodes using runtime schema for precise traversal. + * + * If a callback returns `false`, the walk will continue to the next sibling + * node, rather than recurse into the children of the current node. + */ +export function walk( + root: any, + callback: Walker | Visitor, + parent: NodePath | null = null, + keyPath: readonly (string | number)[] = [], +): void { + const actualCallback: Walker = typeof callback === 'function' + ? callback + : (path: NodePath) => { + const visitor = callback as Visitor; + const visitFn = visitor[path.tag]; + return visitFn ? visitFn(path) : undefined; + }; + + if (Array.isArray(root)) { + root.forEach((node, index) => { + walk(node, actualCallback, parent, [...keyPath, index]); + }); + } else if (typeof root === 'object' && root !== null) { + const keys = Object.keys(root); + if (keys.length === 1 && /^[A-Z]/.test(keys[0])) { + const tag = keys[0]; + const nodeData = root[tag]; + const path = new NodePath(tag, nodeData, parent, keyPath); + + if (actualCallback(path) === false) { + return; + } + + const nodeSpec = schemaMap.get(tag); + if (nodeSpec) { + for (const field of nodeSpec.fields) { + if (field.type === 'Node' && nodeData[field.name] != null) { + const value = nodeData[field.name]; + if (field.isArray && Array.isArray(value)) { + value.forEach((item, index) => { + walk(item, actualCallback, path, [...path.keyPath, field.name, index]); + }); + } else if (!field.isArray) { + walk(value, actualCallback, path, [...path.keyPath, field.name]); + } + } + } + } else { + for (const key in nodeData) { + const value = nodeData[key]; + if (Array.isArray(value)) { + value.forEach((item, index) => { + if (typeof item === 'object' && item !== null) { + walk(item, actualCallback, path, [...path.keyPath, key, index]); + } + }); + } else if (typeof value === 'object' && value !== null) { + walk(value, actualCallback, path, [...path.keyPath, key]); + } + } + } + } else { + for (const key of keys) { + walk(root[key], actualCallback, parent, [...keyPath, key]); + } + } + } +} + +export type VisitorContext = { + path: (string | number)[]; + parent: any; + key: string | number; +}; + +export function visit( + node: any, + visitor: { [key: string]: (node: any, ctx: VisitorContext) => void }, + ctx: VisitorContext = { path: [], parent: null, key: '' } +): void { + if (node == null || typeof node !== 'object') return; + + const nodeType = Object.keys(node)[0] as string; + const nodeData = node[nodeType]; + + const visitFn = visitor[nodeType]; + if (visitFn) { + visitFn(nodeData, ctx); + } + + for (const key in nodeData) { + const value = (nodeData as any)[key]; + if (Array.isArray(value)) { + value.forEach((item, index) => { + if (typeof item === 'object' && item !== null && Object.keys(item).length === 1) { + visit(item, visitor, { + parent: value, + key: index, + path: [...ctx.path, key, index], + }); + } + }); + } else if (typeof value === 'object' && value !== null && Object.keys(value).length === 1) { + visit(value, visitor, { + parent: nodeData, + key, + path: [...ctx.path, key], + }); + } + } +} diff --git a/packages/traverse/tsconfig.esm.json b/packages/traverse/tsconfig.esm.json new file mode 100644 index 00000000..800d7506 --- /dev/null +++ b/packages/traverse/tsconfig.esm.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist/esm", + "module": "es2022", + "rootDir": "src/", + "declaration": false + } +} diff --git a/packages/traverse/tsconfig.json b/packages/traverse/tsconfig.json new file mode 100644 index 00000000..1a9d5696 --- /dev/null +++ b/packages/traverse/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "src/" + }, + "include": ["src/**/*.ts"], + "exclude": ["dist", "node_modules", "**/*.spec.*", "**/*.test.*"] +}