#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals, missing_docs)]
use rupg_common::SqlState;
use crate::nodes::{Equal, List, NodeType, Out, Str, w};
pub const PG_INT16_MAX: i32 = 32767;
pub const NO_NULLTREATMENT: i32 = 0;
pub const PARSER_IGNORE_NULLS: i32 = 1;
pub const PARSER_RESPECT_NULLS: i32 = 2;
pub const FRAMEOPTION_NONDEFAULT: i32 = 1;
pub const FRAMEOPTION_RANGE: i32 = 2;
pub const FRAMEOPTION_ROWS: i32 = 4;
pub const FRAMEOPTION_GROUPS: i32 = 8;
pub const FRAMEOPTION_BETWEEN: i32 = 16;
pub const FRAMEOPTION_START_UNBOUNDED_PRECEDING: i32 = 32;
pub const FRAMEOPTION_END_UNBOUNDED_PRECEDING: i32 = 64;
pub const FRAMEOPTION_START_UNBOUNDED_FOLLOWING: i32 = 128;
pub const FRAMEOPTION_START_CURRENT_ROW: i32 = 512;
pub const FRAMEOPTION_END_CURRENT_ROW: i32 = 1024;
pub const FRAMEOPTION_START_OFFSET_PRECEDING: i32 = 2048;
pub const FRAMEOPTION_END_OFFSET_PRECEDING: i32 = 4096;
pub const FRAMEOPTION_START_OFFSET_FOLLOWING: i32 = 8192;
pub const FRAMEOPTION_EXCLUDE_CURRENT_ROW: i32 = 32768;
pub const FRAMEOPTION_EXCLUDE_GROUP: i32 = 65536;
pub const FRAMEOPTION_EXCLUDE_TIES: i32 = 131072;
pub const FRAMEOPTION_DEFAULTS: i32 = 1058;
pub const FKCONSTR_ACTION_NOACTION: u8 = b'a';
pub const FKCONSTR_ACTION_RESTRICT: u8 = b'r';
pub const FKCONSTR_ACTION_CASCADE: u8 = b'c';
pub const FKCONSTR_ACTION_SETNULL: u8 = b'n';
pub const FKCONSTR_ACTION_SETDEFAULT: u8 = b'd';
pub const FKCONSTR_MATCH_FULL: u8 = b'f';
pub const FKCONSTR_MATCH_PARTIAL: u8 = b'p';
pub const FKCONSTR_MATCH_SIMPLE: u8 = b's';
pub const OPCLASS_ITEM_OPERATOR: i32 = 1;
pub const OPCLASS_ITEM_FUNCTION: i32 = 2;
pub const OPCLASS_ITEM_STORAGETYPE: i32 = 3;
pub const CURSOR_OPT_BINARY: i32 = 1;
pub const CURSOR_OPT_SCROLL: i32 = 2;
pub const CURSOR_OPT_NO_SCROLL: i32 = 4;
pub const CURSOR_OPT_INSENSITIVE: i32 = 8;
pub const CURSOR_OPT_ASENSITIVE: i32 = 16;
pub const CURSOR_OPT_HOLD: i32 = 32;
pub const CURSOR_OPT_FAST_PLAN: i32 = 256;
pub const FETCH_ALL: i64 = 9223372036854775807;
pub const RELPERSISTENCE_PERMANENT: u8 = b'p';
pub const RELPERSISTENCE_UNLOGGED: u8 = b'u';
pub const RELPERSISTENCE_TEMP: u8 = b't';
pub const REPLICA_IDENTITY_DEFAULT: u8 = b'd';
pub const REPLICA_IDENTITY_NOTHING: u8 = b'n';
pub const REPLICA_IDENTITY_FULL: u8 = b'f';
pub const REPLICA_IDENTITY_INDEX: u8 = b'i';
pub const AMTYPE_INDEX: u8 = b'i';
pub const AMTYPE_TABLE: u8 = b't';
pub const ATTRIBUTE_IDENTITY_ALWAYS: u8 = b'a';
pub const ATTRIBUTE_IDENTITY_BY_DEFAULT: u8 = b'd';
pub const ATTRIBUTE_GENERATED_STORED: u8 = b's';
pub const ATTRIBUTE_GENERATED_VIRTUAL: u8 = b'v';
pub const TRIGGER_TYPE_BEFORE: i32 = 2;
pub const TRIGGER_TYPE_INSERT: i32 = 4;
pub const TRIGGER_TYPE_DELETE: i32 = 8;
pub const TRIGGER_TYPE_UPDATE: i32 = 16;
pub const TRIGGER_TYPE_TRUNCATE: i32 = 32;
pub const TRIGGER_TYPE_INSTEAD: i32 = 64;
pub const TRIGGER_TYPE_AFTER: i32 = 0;
pub const DEFAULT_INDEX_TYPE: &str = "btree";
pub const TRIGGER_FIRES_ON_ORIGIN: u8 = b'O';
pub const TRIGGER_FIRES_ALWAYS: u8 = b'A';
pub const TRIGGER_FIRES_ON_REPLICA: u8 = b'R';
pub const TRIGGER_DISABLED: u8 = b'D';
pub const MONTH: i32 = 1;
pub const YEAR: i32 = 2;
pub const DAY: i32 = 3;
pub const HOUR: i32 = 10;
pub const MINUTE: i32 = 11;
pub const SECOND: i32 = 12;
pub const INTERVAL_FULL_RANGE: i32 = 32767;
pub const AccessShareLock: i32 = 1;
pub const RowShareLock: i32 = 2;
pub const RowExclusiveLock: i32 = 3;
pub const ShareUpdateExclusiveLock: i32 = 4;
pub const ShareLock: i32 = 5;
pub const ShareRowExclusiveLock: i32 = 6;
pub const ExclusiveLock: i32 = 7;
pub const AccessExclusiveLock: i32 = 8;
pub const InvalidRelFileNumber: u32 = 0;
pub const ERRCODE_FEATURE_NOT_SUPPORTED: SqlState = SqlState::FEATURE_NOT_SUPPORTED;
pub const ERRCODE_INVALID_PARAMETER_VALUE: SqlState = SqlState::INVALID_PARAMETER_VALUE;
pub const ERRCODE_SYNTAX_ERROR: SqlState = SqlState::SYNTAX_ERROR;
pub const ERRCODE_WINDOWING_ERROR: SqlState = SqlState::WINDOWING_ERROR;
pub const ERRCODE_RESERVED_NAME: SqlState = SqlState::RESERVED_NAME;
pub const ERRCODE_DUPLICATE_OBJECT: SqlState = SqlState::DUPLICATE_OBJECT;
pub const InvalidOid: u32 = 0;
pub const TEXTOID: u32 = 25;
pub const InvalidSubTransactionId: u32 = 0;
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct CmdType(pub i32);
impl CmdType {
pub const CMD_UNKNOWN: CmdType = CmdType(0);
pub const CMD_SELECT: CmdType = CmdType(1);
pub const CMD_UPDATE: CmdType = CmdType(2);
pub const CMD_INSERT: CmdType = CmdType(3);
pub const CMD_DELETE: CmdType = CmdType(4);
pub const CMD_MERGE: CmdType = CmdType(5);
pub const CMD_UTILITY: CmdType = CmdType(6);
pub const CMD_NOTHING: CmdType = CmdType(7);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JoinType(pub i32);
impl JoinType {
pub const JOIN_INNER: JoinType = JoinType(0);
pub const JOIN_LEFT: JoinType = JoinType(1);
pub const JOIN_FULL: JoinType = JoinType(2);
pub const JOIN_RIGHT: JoinType = JoinType(3);
pub const JOIN_SEMI: JoinType = JoinType(4);
pub const JOIN_ANTI: JoinType = JoinType(5);
pub const JOIN_RIGHT_SEMI: JoinType = JoinType(6);
pub const JOIN_RIGHT_ANTI: JoinType = JoinType(7);
pub const JOIN_UNIQUE_OUTER: JoinType = JoinType(8);
pub const JOIN_UNIQUE_INNER: JoinType = JoinType(9);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct OnConflictAction(pub i32);
impl OnConflictAction {
pub const ONCONFLICT_NONE: OnConflictAction = OnConflictAction(0);
pub const ONCONFLICT_NOTHING: OnConflictAction = OnConflictAction(1);
pub const ONCONFLICT_UPDATE: OnConflictAction = OnConflictAction(2);
pub const ONCONFLICT_SELECT: OnConflictAction = OnConflictAction(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct LimitOption(pub i32);
impl LimitOption {
pub const LIMIT_OPTION_COUNT: LimitOption = LimitOption(0);
pub const LIMIT_OPTION_WITH_TIES: LimitOption = LimitOption(1);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct LockClauseStrength(pub i32);
impl LockClauseStrength {
pub const LCS_NONE: LockClauseStrength = LockClauseStrength(0);
pub const LCS_FORKEYSHARE: LockClauseStrength = LockClauseStrength(1);
pub const LCS_FORSHARE: LockClauseStrength = LockClauseStrength(2);
pub const LCS_FORNOKEYUPDATE: LockClauseStrength = LockClauseStrength(3);
pub const LCS_FORUPDATE: LockClauseStrength = LockClauseStrength(4);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct LockWaitPolicy(pub i32);
impl LockWaitPolicy {
pub const LockWaitBlock: LockWaitPolicy = LockWaitPolicy(0);
pub const LockWaitSkip: LockWaitPolicy = LockWaitPolicy(1);
pub const LockWaitError: LockWaitPolicy = LockWaitPolicy(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct OverridingKind(pub i32);
impl OverridingKind {
pub const OVERRIDING_NOT_SET: OverridingKind = OverridingKind(0);
pub const OVERRIDING_USER_VALUE: OverridingKind = OverridingKind(1);
pub const OVERRIDING_SYSTEM_VALUE: OverridingKind = OverridingKind(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct OnCommitAction(pub i32);
impl OnCommitAction {
pub const ONCOMMIT_NOOP: OnCommitAction = OnCommitAction(0);
pub const ONCOMMIT_PRESERVE_ROWS: OnCommitAction = OnCommitAction(1);
pub const ONCOMMIT_DELETE_ROWS: OnCommitAction = OnCommitAction(2);
pub const ONCOMMIT_DROP: OnCommitAction = OnCommitAction(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct CoercionContext(pub i32);
impl CoercionContext {
pub const COERCION_IMPLICIT: CoercionContext = CoercionContext(0);
pub const COERCION_ASSIGNMENT: CoercionContext = CoercionContext(1);
pub const COERCION_PLPGSQL: CoercionContext = CoercionContext(2);
pub const COERCION_EXPLICIT: CoercionContext = CoercionContext(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct CoercionForm(pub i32);
impl CoercionForm {
pub const COERCE_EXPLICIT_CALL: CoercionForm = CoercionForm(0);
pub const COERCE_EXPLICIT_CAST: CoercionForm = CoercionForm(1);
pub const COERCE_IMPLICIT_CAST: CoercionForm = CoercionForm(2);
pub const COERCE_SQL_SYNTAX: CoercionForm = CoercionForm(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct BoolExprType(pub i32);
impl BoolExprType {
pub const AND_EXPR: BoolExprType = BoolExprType(0);
pub const OR_EXPR: BoolExprType = BoolExprType(1);
pub const NOT_EXPR: BoolExprType = BoolExprType(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct SubLinkType(pub i32);
impl SubLinkType {
pub const EXISTS_SUBLINK: SubLinkType = SubLinkType(0);
pub const ALL_SUBLINK: SubLinkType = SubLinkType(1);
pub const ANY_SUBLINK: SubLinkType = SubLinkType(2);
pub const ROWCOMPARE_SUBLINK: SubLinkType = SubLinkType(3);
pub const EXPR_SUBLINK: SubLinkType = SubLinkType(4);
pub const MULTIEXPR_SUBLINK: SubLinkType = SubLinkType(5);
pub const ARRAY_SUBLINK: SubLinkType = SubLinkType(6);
pub const CTE_SUBLINK: SubLinkType = SubLinkType(7);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct MinMaxOp(pub i32);
impl MinMaxOp {
pub const IS_GREATEST: MinMaxOp = MinMaxOp(0);
pub const IS_LEAST: MinMaxOp = MinMaxOp(1);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct SQLValueFunctionOp(pub i32);
impl SQLValueFunctionOp {
pub const SVFOP_CURRENT_DATE: SQLValueFunctionOp = SQLValueFunctionOp(0);
pub const SVFOP_CURRENT_TIME: SQLValueFunctionOp = SQLValueFunctionOp(1);
pub const SVFOP_CURRENT_TIME_N: SQLValueFunctionOp = SQLValueFunctionOp(2);
pub const SVFOP_CURRENT_TIMESTAMP: SQLValueFunctionOp = SQLValueFunctionOp(3);
pub const SVFOP_CURRENT_TIMESTAMP_N: SQLValueFunctionOp = SQLValueFunctionOp(4);
pub const SVFOP_LOCALTIME: SQLValueFunctionOp = SQLValueFunctionOp(5);
pub const SVFOP_LOCALTIME_N: SQLValueFunctionOp = SQLValueFunctionOp(6);
pub const SVFOP_LOCALTIMESTAMP: SQLValueFunctionOp = SQLValueFunctionOp(7);
pub const SVFOP_LOCALTIMESTAMP_N: SQLValueFunctionOp = SQLValueFunctionOp(8);
pub const SVFOP_CURRENT_ROLE: SQLValueFunctionOp = SQLValueFunctionOp(9);
pub const SVFOP_CURRENT_USER: SQLValueFunctionOp = SQLValueFunctionOp(10);
pub const SVFOP_USER: SQLValueFunctionOp = SQLValueFunctionOp(11);
pub const SVFOP_SESSION_USER: SQLValueFunctionOp = SQLValueFunctionOp(12);
pub const SVFOP_CURRENT_CATALOG: SQLValueFunctionOp = SQLValueFunctionOp(13);
pub const SVFOP_CURRENT_SCHEMA: SQLValueFunctionOp = SQLValueFunctionOp(14);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct XmlExprOp(pub i32);
impl XmlExprOp {
pub const IS_XMLCONCAT: XmlExprOp = XmlExprOp(0);
pub const IS_XMLELEMENT: XmlExprOp = XmlExprOp(1);
pub const IS_XMLFOREST: XmlExprOp = XmlExprOp(2);
pub const IS_XMLPARSE: XmlExprOp = XmlExprOp(3);
pub const IS_XMLPI: XmlExprOp = XmlExprOp(4);
pub const IS_XMLROOT: XmlExprOp = XmlExprOp(5);
pub const IS_XMLSERIALIZE: XmlExprOp = XmlExprOp(6);
pub const IS_DOCUMENT: XmlExprOp = XmlExprOp(7);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct XmlOptionType(pub i32);
impl XmlOptionType {
pub const XMLOPTION_DOCUMENT: XmlOptionType = XmlOptionType(0);
pub const XMLOPTION_CONTENT: XmlOptionType = XmlOptionType(1);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonEncoding(pub i32);
impl JsonEncoding {
pub const JS_ENC_DEFAULT: JsonEncoding = JsonEncoding(0);
pub const JS_ENC_UTF8: JsonEncoding = JsonEncoding(1);
pub const JS_ENC_UTF16: JsonEncoding = JsonEncoding(2);
pub const JS_ENC_UTF32: JsonEncoding = JsonEncoding(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonFormatType(pub i32);
impl JsonFormatType {
pub const JS_FORMAT_DEFAULT: JsonFormatType = JsonFormatType(0);
pub const JS_FORMAT_JSON: JsonFormatType = JsonFormatType(1);
pub const JS_FORMAT_JSONB: JsonFormatType = JsonFormatType(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonValueType(pub i32);
impl JsonValueType {
pub const JS_TYPE_ANY: JsonValueType = JsonValueType(0);
pub const JS_TYPE_OBJECT: JsonValueType = JsonValueType(1);
pub const JS_TYPE_ARRAY: JsonValueType = JsonValueType(2);
pub const JS_TYPE_SCALAR: JsonValueType = JsonValueType(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonWrapper(pub i32);
impl JsonWrapper {
pub const JSW_UNSPEC: JsonWrapper = JsonWrapper(0);
pub const JSW_NONE: JsonWrapper = JsonWrapper(1);
pub const JSW_CONDITIONAL: JsonWrapper = JsonWrapper(2);
pub const JSW_UNCONDITIONAL: JsonWrapper = JsonWrapper(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonBehaviorType(pub i32);
impl JsonBehaviorType {
pub const JSON_BEHAVIOR_NULL: JsonBehaviorType = JsonBehaviorType(0);
pub const JSON_BEHAVIOR_ERROR: JsonBehaviorType = JsonBehaviorType(1);
pub const JSON_BEHAVIOR_EMPTY: JsonBehaviorType = JsonBehaviorType(2);
pub const JSON_BEHAVIOR_TRUE: JsonBehaviorType = JsonBehaviorType(3);
pub const JSON_BEHAVIOR_FALSE: JsonBehaviorType = JsonBehaviorType(4);
pub const JSON_BEHAVIOR_UNKNOWN: JsonBehaviorType = JsonBehaviorType(5);
pub const JSON_BEHAVIOR_EMPTY_ARRAY: JsonBehaviorType = JsonBehaviorType(6);
pub const JSON_BEHAVIOR_EMPTY_OBJECT: JsonBehaviorType = JsonBehaviorType(7);
pub const JSON_BEHAVIOR_DEFAULT: JsonBehaviorType = JsonBehaviorType(8);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonExprOp(pub i32);
impl JsonExprOp {
pub const JSON_EXISTS_OP: JsonExprOp = JsonExprOp(0);
pub const JSON_QUERY_OP: JsonExprOp = JsonExprOp(1);
pub const JSON_VALUE_OP: JsonExprOp = JsonExprOp(2);
pub const JSON_TABLE_OP: JsonExprOp = JsonExprOp(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct NullTestType(pub i32);
impl NullTestType {
pub const IS_NULL: NullTestType = NullTestType(0);
pub const IS_NOT_NULL: NullTestType = NullTestType(1);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct BoolTestType(pub i32);
impl BoolTestType {
pub const IS_TRUE: BoolTestType = BoolTestType(0);
pub const IS_NOT_TRUE: BoolTestType = BoolTestType(1);
pub const IS_FALSE: BoolTestType = BoolTestType(2);
pub const IS_NOT_FALSE: BoolTestType = BoolTestType(3);
pub const IS_UNKNOWN: BoolTestType = BoolTestType(4);
pub const IS_NOT_UNKNOWN: BoolTestType = BoolTestType(5);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct MergeMatchKind(pub i32);
impl MergeMatchKind {
pub const MERGE_WHEN_MATCHED: MergeMatchKind = MergeMatchKind(0);
pub const MERGE_WHEN_NOT_MATCHED_BY_SOURCE: MergeMatchKind = MergeMatchKind(1);
pub const MERGE_WHEN_NOT_MATCHED_BY_TARGET: MergeMatchKind = MergeMatchKind(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct SortByDir(pub i32);
impl SortByDir {
pub const SORTBY_DEFAULT: SortByDir = SortByDir(0);
pub const SORTBY_ASC: SortByDir = SortByDir(1);
pub const SORTBY_DESC: SortByDir = SortByDir(2);
pub const SORTBY_USING: SortByDir = SortByDir(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct SortByNulls(pub i32);
impl SortByNulls {
pub const SORTBY_NULLS_DEFAULT: SortByNulls = SortByNulls(0);
pub const SORTBY_NULLS_FIRST: SortByNulls = SortByNulls(1);
pub const SORTBY_NULLS_LAST: SortByNulls = SortByNulls(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct SetQuantifier(pub i32);
impl SetQuantifier {
pub const SET_QUANTIFIER_DEFAULT: SetQuantifier = SetQuantifier(0);
pub const SET_QUANTIFIER_ALL: SetQuantifier = SetQuantifier(1);
pub const SET_QUANTIFIER_DISTINCT: SetQuantifier = SetQuantifier(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct A_Expr_Kind(pub i32);
impl A_Expr_Kind {
pub const AEXPR_OP: A_Expr_Kind = A_Expr_Kind(0);
pub const AEXPR_OP_ANY: A_Expr_Kind = A_Expr_Kind(1);
pub const AEXPR_OP_ALL: A_Expr_Kind = A_Expr_Kind(2);
pub const AEXPR_DISTINCT: A_Expr_Kind = A_Expr_Kind(3);
pub const AEXPR_NOT_DISTINCT: A_Expr_Kind = A_Expr_Kind(4);
pub const AEXPR_NULLIF: A_Expr_Kind = A_Expr_Kind(5);
pub const AEXPR_IN: A_Expr_Kind = A_Expr_Kind(6);
pub const AEXPR_LIKE: A_Expr_Kind = A_Expr_Kind(7);
pub const AEXPR_ILIKE: A_Expr_Kind = A_Expr_Kind(8);
pub const AEXPR_SIMILAR: A_Expr_Kind = A_Expr_Kind(9);
pub const AEXPR_BETWEEN: A_Expr_Kind = A_Expr_Kind(10);
pub const AEXPR_NOT_BETWEEN: A_Expr_Kind = A_Expr_Kind(11);
pub const AEXPR_BETWEEN_SYM: A_Expr_Kind = A_Expr_Kind(12);
pub const AEXPR_NOT_BETWEEN_SYM: A_Expr_Kind = A_Expr_Kind(13);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct RoleSpecType(pub i32);
impl RoleSpecType {
pub const ROLESPEC_CSTRING: RoleSpecType = RoleSpecType(0);
pub const ROLESPEC_CURRENT_ROLE: RoleSpecType = RoleSpecType(1);
pub const ROLESPEC_CURRENT_USER: RoleSpecType = RoleSpecType(2);
pub const ROLESPEC_SESSION_USER: RoleSpecType = RoleSpecType(3);
pub const ROLESPEC_PUBLIC: RoleSpecType = RoleSpecType(4);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct TableLikeOption(pub i32);
impl TableLikeOption {
pub const CREATE_TABLE_LIKE_COMMENTS: TableLikeOption = TableLikeOption(1);
pub const CREATE_TABLE_LIKE_COMPRESSION: TableLikeOption = TableLikeOption(2);
pub const CREATE_TABLE_LIKE_CONSTRAINTS: TableLikeOption = TableLikeOption(4);
pub const CREATE_TABLE_LIKE_DEFAULTS: TableLikeOption = TableLikeOption(8);
pub const CREATE_TABLE_LIKE_GENERATED: TableLikeOption = TableLikeOption(16);
pub const CREATE_TABLE_LIKE_IDENTITY: TableLikeOption = TableLikeOption(32);
pub const CREATE_TABLE_LIKE_INDEXES: TableLikeOption = TableLikeOption(64);
pub const CREATE_TABLE_LIKE_STATISTICS: TableLikeOption = TableLikeOption(128);
pub const CREATE_TABLE_LIKE_STORAGE: TableLikeOption = TableLikeOption(256);
pub const CREATE_TABLE_LIKE_ALL: TableLikeOption = TableLikeOption(2147483647);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct DefElemAction(pub i32);
impl DefElemAction {
pub const DEFELEM_UNSPEC: DefElemAction = DefElemAction(0);
pub const DEFELEM_SET: DefElemAction = DefElemAction(1);
pub const DEFELEM_ADD: DefElemAction = DefElemAction(2);
pub const DEFELEM_DROP: DefElemAction = DefElemAction(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct PartitionStrategy(pub i32);
impl PartitionStrategy {
pub const PARTITION_STRATEGY_LIST: PartitionStrategy = PartitionStrategy(108);
pub const PARTITION_STRATEGY_RANGE: PartitionStrategy = PartitionStrategy(114);
pub const PARTITION_STRATEGY_HASH: PartitionStrategy = PartitionStrategy(104);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct GroupingSetKind(pub i32);
impl GroupingSetKind {
pub const GROUPING_SET_EMPTY: GroupingSetKind = GroupingSetKind(0);
pub const GROUPING_SET_SIMPLE: GroupingSetKind = GroupingSetKind(1);
pub const GROUPING_SET_ROLLUP: GroupingSetKind = GroupingSetKind(2);
pub const GROUPING_SET_CUBE: GroupingSetKind = GroupingSetKind(3);
pub const GROUPING_SET_SETS: GroupingSetKind = GroupingSetKind(4);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct CTEMaterialize(pub i32);
impl CTEMaterialize {
pub const CTEMaterializeDefault: CTEMaterialize = CTEMaterialize(0);
pub const CTEMaterializeAlways: CTEMaterialize = CTEMaterialize(1);
pub const CTEMaterializeNever: CTEMaterialize = CTEMaterialize(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct ReturningOptionKind(pub i32);
impl ReturningOptionKind {
pub const RETURNING_OPTION_OLD: ReturningOptionKind = ReturningOptionKind(0);
pub const RETURNING_OPTION_NEW: ReturningOptionKind = ReturningOptionKind(1);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonQuotes(pub i32);
impl JsonQuotes {
pub const JS_QUOTES_UNSPEC: JsonQuotes = JsonQuotes(0);
pub const JS_QUOTES_KEEP: JsonQuotes = JsonQuotes(1);
pub const JS_QUOTES_OMIT: JsonQuotes = JsonQuotes(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct JsonTableColumnType(pub i32);
impl JsonTableColumnType {
pub const JTC_FOR_ORDINALITY: JsonTableColumnType = JsonTableColumnType(0);
pub const JTC_REGULAR: JsonTableColumnType = JsonTableColumnType(1);
pub const JTC_EXISTS: JsonTableColumnType = JsonTableColumnType(2);
pub const JTC_FORMATTED: JsonTableColumnType = JsonTableColumnType(3);
pub const JTC_NESTED: JsonTableColumnType = JsonTableColumnType(4);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct SetOperation(pub i32);
impl SetOperation {
pub const SETOP_NONE: SetOperation = SetOperation(0);
pub const SETOP_UNION: SetOperation = SetOperation(1);
pub const SETOP_INTERSECT: SetOperation = SetOperation(2);
pub const SETOP_EXCEPT: SetOperation = SetOperation(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct ObjectType(pub i32);
impl ObjectType {
pub const OBJECT_ACCESS_METHOD: ObjectType = ObjectType(0);
pub const OBJECT_AGGREGATE: ObjectType = ObjectType(1);
pub const OBJECT_AMOP: ObjectType = ObjectType(2);
pub const OBJECT_AMPROC: ObjectType = ObjectType(3);
pub const OBJECT_ATTRIBUTE: ObjectType = ObjectType(4);
pub const OBJECT_CAST: ObjectType = ObjectType(5);
pub const OBJECT_COLUMN: ObjectType = ObjectType(6);
pub const OBJECT_COLLATION: ObjectType = ObjectType(7);
pub const OBJECT_CONVERSION: ObjectType = ObjectType(8);
pub const OBJECT_DATABASE: ObjectType = ObjectType(9);
pub const OBJECT_DEFAULT: ObjectType = ObjectType(10);
pub const OBJECT_DEFACL: ObjectType = ObjectType(11);
pub const OBJECT_DOMAIN: ObjectType = ObjectType(12);
pub const OBJECT_DOMCONSTRAINT: ObjectType = ObjectType(13);
pub const OBJECT_EVENT_TRIGGER: ObjectType = ObjectType(14);
pub const OBJECT_EXTENSION: ObjectType = ObjectType(15);
pub const OBJECT_FDW: ObjectType = ObjectType(16);
pub const OBJECT_FOREIGN_SERVER: ObjectType = ObjectType(17);
pub const OBJECT_FOREIGN_TABLE: ObjectType = ObjectType(18);
pub const OBJECT_FUNCTION: ObjectType = ObjectType(19);
pub const OBJECT_INDEX: ObjectType = ObjectType(20);
pub const OBJECT_LANGUAGE: ObjectType = ObjectType(21);
pub const OBJECT_LARGEOBJECT: ObjectType = ObjectType(22);
pub const OBJECT_MATVIEW: ObjectType = ObjectType(23);
pub const OBJECT_OPCLASS: ObjectType = ObjectType(24);
pub const OBJECT_OPERATOR: ObjectType = ObjectType(25);
pub const OBJECT_OPFAMILY: ObjectType = ObjectType(26);
pub const OBJECT_PARAMETER_ACL: ObjectType = ObjectType(27);
pub const OBJECT_POLICY: ObjectType = ObjectType(28);
pub const OBJECT_PROCEDURE: ObjectType = ObjectType(29);
pub const OBJECT_PUBLICATION: ObjectType = ObjectType(30);
pub const OBJECT_PUBLICATION_EXCLUDED_REL: ObjectType = ObjectType(31);
pub const OBJECT_PUBLICATION_NAMESPACE: ObjectType = ObjectType(32);
pub const OBJECT_PUBLICATION_REL: ObjectType = ObjectType(33);
pub const OBJECT_ROLE: ObjectType = ObjectType(34);
pub const OBJECT_ROUTINE: ObjectType = ObjectType(35);
pub const OBJECT_RULE: ObjectType = ObjectType(36);
pub const OBJECT_SCHEMA: ObjectType = ObjectType(37);
pub const OBJECT_SEQUENCE: ObjectType = ObjectType(38);
pub const OBJECT_SUBSCRIPTION: ObjectType = ObjectType(39);
pub const OBJECT_STATISTIC_EXT: ObjectType = ObjectType(40);
pub const OBJECT_TABCONSTRAINT: ObjectType = ObjectType(41);
pub const OBJECT_TABLE: ObjectType = ObjectType(42);
pub const OBJECT_TABLESPACE: ObjectType = ObjectType(43);
pub const OBJECT_TRANSFORM: ObjectType = ObjectType(44);
pub const OBJECT_TRIGGER: ObjectType = ObjectType(45);
pub const OBJECT_TSCONFIGURATION: ObjectType = ObjectType(46);
pub const OBJECT_TSDICTIONARY: ObjectType = ObjectType(47);
pub const OBJECT_TSPARSER: ObjectType = ObjectType(48);
pub const OBJECT_TSTEMPLATE: ObjectType = ObjectType(49);
pub const OBJECT_TYPE: ObjectType = ObjectType(50);
pub const OBJECT_USER_MAPPING: ObjectType = ObjectType(51);
pub const OBJECT_VIEW: ObjectType = ObjectType(52);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct DropBehavior(pub i32);
impl DropBehavior {
pub const DROP_RESTRICT: DropBehavior = DropBehavior(0);
pub const DROP_CASCADE: DropBehavior = DropBehavior(1);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct AlterTableType(pub i32);
impl AlterTableType {
pub const AT_AddColumn: AlterTableType = AlterTableType(0);
pub const AT_AddColumnToView: AlterTableType = AlterTableType(1);
pub const AT_ColumnDefault: AlterTableType = AlterTableType(2);
pub const AT_CookedColumnDefault: AlterTableType = AlterTableType(3);
pub const AT_DropNotNull: AlterTableType = AlterTableType(4);
pub const AT_SetNotNull: AlterTableType = AlterTableType(5);
pub const AT_SetExpression: AlterTableType = AlterTableType(6);
pub const AT_DropExpression: AlterTableType = AlterTableType(7);
pub const AT_SetStatistics: AlterTableType = AlterTableType(8);
pub const AT_SetOptions: AlterTableType = AlterTableType(9);
pub const AT_ResetOptions: AlterTableType = AlterTableType(10);
pub const AT_SetStorage: AlterTableType = AlterTableType(11);
pub const AT_SetCompression: AlterTableType = AlterTableType(12);
pub const AT_DropColumn: AlterTableType = AlterTableType(13);
pub const AT_AddIndex: AlterTableType = AlterTableType(14);
pub const AT_ReAddIndex: AlterTableType = AlterTableType(15);
pub const AT_AddConstraint: AlterTableType = AlterTableType(16);
pub const AT_ReAddConstraint: AlterTableType = AlterTableType(17);
pub const AT_ReAddDomainConstraint: AlterTableType = AlterTableType(18);
pub const AT_AlterConstraint: AlterTableType = AlterTableType(19);
pub const AT_ValidateConstraint: AlterTableType = AlterTableType(20);
pub const AT_AddIndexConstraint: AlterTableType = AlterTableType(21);
pub const AT_DropConstraint: AlterTableType = AlterTableType(22);
pub const AT_ReAddComment: AlterTableType = AlterTableType(23);
pub const AT_AlterColumnType: AlterTableType = AlterTableType(24);
pub const AT_AlterColumnGenericOptions: AlterTableType = AlterTableType(25);
pub const AT_ChangeOwner: AlterTableType = AlterTableType(26);
pub const AT_ClusterOn: AlterTableType = AlterTableType(27);
pub const AT_DropCluster: AlterTableType = AlterTableType(28);
pub const AT_SetLogged: AlterTableType = AlterTableType(29);
pub const AT_SetUnLogged: AlterTableType = AlterTableType(30);
pub const AT_DropOids: AlterTableType = AlterTableType(31);
pub const AT_SetAccessMethod: AlterTableType = AlterTableType(32);
pub const AT_SetTableSpace: AlterTableType = AlterTableType(33);
pub const AT_SetRelOptions: AlterTableType = AlterTableType(34);
pub const AT_ResetRelOptions: AlterTableType = AlterTableType(35);
pub const AT_ReplaceRelOptions: AlterTableType = AlterTableType(36);
pub const AT_EnableTrig: AlterTableType = AlterTableType(37);
pub const AT_EnableAlwaysTrig: AlterTableType = AlterTableType(38);
pub const AT_EnableReplicaTrig: AlterTableType = AlterTableType(39);
pub const AT_DisableTrig: AlterTableType = AlterTableType(40);
pub const AT_EnableTrigAll: AlterTableType = AlterTableType(41);
pub const AT_DisableTrigAll: AlterTableType = AlterTableType(42);
pub const AT_EnableTrigUser: AlterTableType = AlterTableType(43);
pub const AT_DisableTrigUser: AlterTableType = AlterTableType(44);
pub const AT_EnableRule: AlterTableType = AlterTableType(45);
pub const AT_EnableAlwaysRule: AlterTableType = AlterTableType(46);
pub const AT_EnableReplicaRule: AlterTableType = AlterTableType(47);
pub const AT_DisableRule: AlterTableType = AlterTableType(48);
pub const AT_AddInherit: AlterTableType = AlterTableType(49);
pub const AT_DropInherit: AlterTableType = AlterTableType(50);
pub const AT_AddOf: AlterTableType = AlterTableType(51);
pub const AT_DropOf: AlterTableType = AlterTableType(52);
pub const AT_ReplicaIdentity: AlterTableType = AlterTableType(53);
pub const AT_EnableRowSecurity: AlterTableType = AlterTableType(54);
pub const AT_DisableRowSecurity: AlterTableType = AlterTableType(55);
pub const AT_ForceRowSecurity: AlterTableType = AlterTableType(56);
pub const AT_NoForceRowSecurity: AlterTableType = AlterTableType(57);
pub const AT_GenericOptions: AlterTableType = AlterTableType(58);
pub const AT_AttachPartition: AlterTableType = AlterTableType(59);
pub const AT_DetachPartition: AlterTableType = AlterTableType(60);
pub const AT_DetachPartitionFinalize: AlterTableType = AlterTableType(61);
pub const AT_AddIdentity: AlterTableType = AlterTableType(62);
pub const AT_SetIdentity: AlterTableType = AlterTableType(63);
pub const AT_DropIdentity: AlterTableType = AlterTableType(64);
pub const AT_ReAddStatistics: AlterTableType = AlterTableType(65);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct AlterDomainType(pub i32);
impl AlterDomainType {
pub const AD_AlterDefault: AlterDomainType = AlterDomainType(84);
pub const AD_DropNotNull: AlterDomainType = AlterDomainType(78);
pub const AD_SetNotNull: AlterDomainType = AlterDomainType(79);
pub const AD_AddConstraint: AlterDomainType = AlterDomainType(67);
pub const AD_DropConstraint: AlterDomainType = AlterDomainType(88);
pub const AD_ValidateConstraint: AlterDomainType = AlterDomainType(86);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct GrantTargetType(pub i32);
impl GrantTargetType {
pub const ACL_TARGET_OBJECT: GrantTargetType = GrantTargetType(0);
pub const ACL_TARGET_ALL_IN_SCHEMA: GrantTargetType = GrantTargetType(1);
pub const ACL_TARGET_DEFAULTS: GrantTargetType = GrantTargetType(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct VariableSetKind(pub i32);
impl VariableSetKind {
pub const VAR_SET_VALUE: VariableSetKind = VariableSetKind(0);
pub const VAR_SET_DEFAULT: VariableSetKind = VariableSetKind(1);
pub const VAR_SET_CURRENT: VariableSetKind = VariableSetKind(2);
pub const VAR_SET_MULTI: VariableSetKind = VariableSetKind(3);
pub const VAR_RESET: VariableSetKind = VariableSetKind(4);
pub const VAR_RESET_ALL: VariableSetKind = VariableSetKind(5);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct ConstrType(pub i32);
impl ConstrType {
pub const CONSTR_NULL: ConstrType = ConstrType(0);
pub const CONSTR_NOTNULL: ConstrType = ConstrType(1);
pub const CONSTR_DEFAULT: ConstrType = ConstrType(2);
pub const CONSTR_IDENTITY: ConstrType = ConstrType(3);
pub const CONSTR_GENERATED: ConstrType = ConstrType(4);
pub const CONSTR_CHECK: ConstrType = ConstrType(5);
pub const CONSTR_PRIMARY: ConstrType = ConstrType(6);
pub const CONSTR_UNIQUE: ConstrType = ConstrType(7);
pub const CONSTR_EXCLUSION: ConstrType = ConstrType(8);
pub const CONSTR_FOREIGN: ConstrType = ConstrType(9);
pub const CONSTR_ATTR_DEFERRABLE: ConstrType = ConstrType(10);
pub const CONSTR_ATTR_NOT_DEFERRABLE: ConstrType = ConstrType(11);
pub const CONSTR_ATTR_DEFERRED: ConstrType = ConstrType(12);
pub const CONSTR_ATTR_IMMEDIATE: ConstrType = ConstrType(13);
pub const CONSTR_ATTR_ENFORCED: ConstrType = ConstrType(14);
pub const CONSTR_ATTR_NOT_ENFORCED: ConstrType = ConstrType(15);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct ImportForeignSchemaType(pub i32);
impl ImportForeignSchemaType {
pub const FDW_IMPORT_SCHEMA_ALL: ImportForeignSchemaType = ImportForeignSchemaType(0);
pub const FDW_IMPORT_SCHEMA_LIMIT_TO: ImportForeignSchemaType = ImportForeignSchemaType(1);
pub const FDW_IMPORT_SCHEMA_EXCEPT: ImportForeignSchemaType = ImportForeignSchemaType(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct RoleStmtType(pub i32);
impl RoleStmtType {
pub const ROLESTMT_ROLE: RoleStmtType = RoleStmtType(0);
pub const ROLESTMT_USER: RoleStmtType = RoleStmtType(1);
pub const ROLESTMT_GROUP: RoleStmtType = RoleStmtType(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct FetchDirection(pub i32);
impl FetchDirection {
pub const FETCH_FORWARD: FetchDirection = FetchDirection(0);
pub const FETCH_BACKWARD: FetchDirection = FetchDirection(1);
pub const FETCH_ABSOLUTE: FetchDirection = FetchDirection(2);
pub const FETCH_RELATIVE: FetchDirection = FetchDirection(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct FetchDirectionKeywords(pub i32);
impl FetchDirectionKeywords {
pub const FETCH_KEYWORD_NONE: FetchDirectionKeywords = FetchDirectionKeywords(0);
pub const FETCH_KEYWORD_NEXT: FetchDirectionKeywords = FetchDirectionKeywords(1);
pub const FETCH_KEYWORD_PRIOR: FetchDirectionKeywords = FetchDirectionKeywords(2);
pub const FETCH_KEYWORD_FIRST: FetchDirectionKeywords = FetchDirectionKeywords(3);
pub const FETCH_KEYWORD_LAST: FetchDirectionKeywords = FetchDirectionKeywords(4);
pub const FETCH_KEYWORD_ABSOLUTE: FetchDirectionKeywords = FetchDirectionKeywords(5);
pub const FETCH_KEYWORD_RELATIVE: FetchDirectionKeywords = FetchDirectionKeywords(6);
pub const FETCH_KEYWORD_ALL: FetchDirectionKeywords = FetchDirectionKeywords(7);
pub const FETCH_KEYWORD_FORWARD: FetchDirectionKeywords = FetchDirectionKeywords(8);
pub const FETCH_KEYWORD_FORWARD_ALL: FetchDirectionKeywords = FetchDirectionKeywords(9);
pub const FETCH_KEYWORD_BACKWARD: FetchDirectionKeywords = FetchDirectionKeywords(10);
pub const FETCH_KEYWORD_BACKWARD_ALL: FetchDirectionKeywords = FetchDirectionKeywords(11);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct FunctionParameterMode(pub i32);
impl FunctionParameterMode {
pub const FUNC_PARAM_IN: FunctionParameterMode = FunctionParameterMode(105);
pub const FUNC_PARAM_OUT: FunctionParameterMode = FunctionParameterMode(111);
pub const FUNC_PARAM_INOUT: FunctionParameterMode = FunctionParameterMode(98);
pub const FUNC_PARAM_VARIADIC: FunctionParameterMode = FunctionParameterMode(118);
pub const FUNC_PARAM_TABLE: FunctionParameterMode = FunctionParameterMode(116);
pub const FUNC_PARAM_DEFAULT: FunctionParameterMode = FunctionParameterMode(100);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct TransactionStmtKind(pub i32);
impl TransactionStmtKind {
pub const TRANS_STMT_BEGIN: TransactionStmtKind = TransactionStmtKind(0);
pub const TRANS_STMT_START: TransactionStmtKind = TransactionStmtKind(1);
pub const TRANS_STMT_COMMIT: TransactionStmtKind = TransactionStmtKind(2);
pub const TRANS_STMT_ROLLBACK: TransactionStmtKind = TransactionStmtKind(3);
pub const TRANS_STMT_SAVEPOINT: TransactionStmtKind = TransactionStmtKind(4);
pub const TRANS_STMT_RELEASE: TransactionStmtKind = TransactionStmtKind(5);
pub const TRANS_STMT_ROLLBACK_TO: TransactionStmtKind = TransactionStmtKind(6);
pub const TRANS_STMT_PREPARE: TransactionStmtKind = TransactionStmtKind(7);
pub const TRANS_STMT_COMMIT_PREPARED: TransactionStmtKind = TransactionStmtKind(8);
pub const TRANS_STMT_ROLLBACK_PREPARED: TransactionStmtKind = TransactionStmtKind(9);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct ViewCheckOption(pub i32);
impl ViewCheckOption {
pub const NO_CHECK_OPTION: ViewCheckOption = ViewCheckOption(0);
pub const LOCAL_CHECK_OPTION: ViewCheckOption = ViewCheckOption(1);
pub const CASCADED_CHECK_OPTION: ViewCheckOption = ViewCheckOption(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct RepackCommand(pub i32);
impl RepackCommand {
pub const REPACK_COMMAND_CLUSTER: RepackCommand = RepackCommand(1);
pub const REPACK_COMMAND_REPACK: RepackCommand = RepackCommand(2);
pub const REPACK_COMMAND_VACUUMFULL: RepackCommand = RepackCommand(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct DiscardMode(pub i32);
impl DiscardMode {
pub const DISCARD_ALL: DiscardMode = DiscardMode(0);
pub const DISCARD_PLANS: DiscardMode = DiscardMode(1);
pub const DISCARD_SEQUENCES: DiscardMode = DiscardMode(2);
pub const DISCARD_TEMP: DiscardMode = DiscardMode(3);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct ReindexObjectType(pub i32);
impl ReindexObjectType {
pub const REINDEX_OBJECT_INDEX: ReindexObjectType = ReindexObjectType(0);
pub const REINDEX_OBJECT_TABLE: ReindexObjectType = ReindexObjectType(1);
pub const REINDEX_OBJECT_SCHEMA: ReindexObjectType = ReindexObjectType(2);
pub const REINDEX_OBJECT_SYSTEM: ReindexObjectType = ReindexObjectType(3);
pub const REINDEX_OBJECT_DATABASE: ReindexObjectType = ReindexObjectType(4);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct AlterTSConfigType(pub i32);
impl AlterTSConfigType {
pub const ALTER_TSCONFIG_ADD_MAPPING: AlterTSConfigType = AlterTSConfigType(0);
pub const ALTER_TSCONFIG_ALTER_MAPPING_FOR_TOKEN: AlterTSConfigType = AlterTSConfigType(1);
pub const ALTER_TSCONFIG_REPLACE_DICT: AlterTSConfigType = AlterTSConfigType(2);
pub const ALTER_TSCONFIG_REPLACE_DICT_FOR_TOKEN: AlterTSConfigType = AlterTSConfigType(3);
pub const ALTER_TSCONFIG_DROP_MAPPING: AlterTSConfigType = AlterTSConfigType(4);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct PublicationObjSpecType(pub i32);
impl PublicationObjSpecType {
pub const PUBLICATIONOBJ_TABLE: PublicationObjSpecType = PublicationObjSpecType(0);
pub const PUBLICATIONOBJ_EXCEPT_TABLE: PublicationObjSpecType = PublicationObjSpecType(1);
pub const PUBLICATIONOBJ_TABLES_IN_SCHEMA: PublicationObjSpecType = PublicationObjSpecType(2);
pub const PUBLICATIONOBJ_TABLES_IN_CUR_SCHEMA: PublicationObjSpecType =
PublicationObjSpecType(3);
pub const PUBLICATIONOBJ_CONTINUATION: PublicationObjSpecType = PublicationObjSpecType(4);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct PublicationAllObjType(pub i32);
impl PublicationAllObjType {
pub const PUBLICATION_ALL_TABLES: PublicationAllObjType = PublicationAllObjType(0);
pub const PUBLICATION_ALL_SEQUENCES: PublicationAllObjType = PublicationAllObjType(1);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct AlterPublicationAction(pub i32);
impl AlterPublicationAction {
pub const AP_AddObjects: AlterPublicationAction = AlterPublicationAction(0);
pub const AP_DropObjects: AlterPublicationAction = AlterPublicationAction(1);
pub const AP_SetObjects: AlterPublicationAction = AlterPublicationAction(2);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct AlterSubscriptionType(pub i32);
impl AlterSubscriptionType {
pub const ALTER_SUBSCRIPTION_OPTIONS: AlterSubscriptionType = AlterSubscriptionType(0);
pub const ALTER_SUBSCRIPTION_SERVER: AlterSubscriptionType = AlterSubscriptionType(1);
pub const ALTER_SUBSCRIPTION_CONNECTION: AlterSubscriptionType = AlterSubscriptionType(2);
pub const ALTER_SUBSCRIPTION_SET_PUBLICATION: AlterSubscriptionType = AlterSubscriptionType(3);
pub const ALTER_SUBSCRIPTION_ADD_PUBLICATION: AlterSubscriptionType = AlterSubscriptionType(4);
pub const ALTER_SUBSCRIPTION_DROP_PUBLICATION: AlterSubscriptionType = AlterSubscriptionType(5);
pub const ALTER_SUBSCRIPTION_REFRESH_PUBLICATION: AlterSubscriptionType =
AlterSubscriptionType(6);
pub const ALTER_SUBSCRIPTION_REFRESH_SEQUENCES: AlterSubscriptionType =
AlterSubscriptionType(7);
pub const ALTER_SUBSCRIPTION_ENABLED: AlterSubscriptionType = AlterSubscriptionType(8);
pub const ALTER_SUBSCRIPTION_SKIP: AlterSubscriptionType = AlterSubscriptionType(9);
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct XmlStandaloneType(pub i32);
impl XmlStandaloneType {
pub const XML_STANDALONE_YES: XmlStandaloneType = XmlStandaloneType(0);
pub const XML_STANDALONE_NO: XmlStandaloneType = XmlStandaloneType(1);
pub const XML_STANDALONE_NO_VALUE: XmlStandaloneType = XmlStandaloneType(2);
pub const XML_STANDALONE_OMITTED: XmlStandaloneType = XmlStandaloneType(3);
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ATAlterConstraint {
pub conname: Option<Str>,
pub alterEnforceability: bool,
pub is_enforced: bool,
pub alterDeferrability: bool,
pub deferrable: bool,
pub initdeferred: bool,
pub alterInheritability: bool,
pub noinherit: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct A_ArrayExpr {
pub elements: List,
pub list_start: i32,
pub list_end: i32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct A_Const {
pub val: Option<Node>,
pub isnull: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct A_Expr {
pub kind: A_Expr_Kind,
pub name: List,
pub lexpr: Option<Node>,
pub rexpr: Option<Node>,
pub rexpr_list_start: i32,
pub rexpr_list_end: i32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct A_Indices {
pub is_slice: bool,
pub lidx: Option<Node>,
pub uidx: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct A_Indirection {
pub arg: Option<Node>,
pub indirection: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct A_Star {}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AccessPriv {
pub priv_name: Option<Str>,
pub cols: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct Alias {
pub aliasname: Option<Str>,
pub colnames: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterCollationStmt {
pub collname: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterDatabaseRefreshCollStmt {
pub dbname: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterDatabaseSetStmt {
pub dbname: Option<Str>,
pub setstmt: Option<Box<VariableSetStmt>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterDatabaseStmt {
pub dbname: Option<Str>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterDefaultPrivilegesStmt {
pub options: List,
pub action: Option<Box<GrantStmt>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterDomainStmt {
pub subtype: AlterDomainType,
pub typeName: List,
pub name: Option<Str>,
pub def: Option<Node>,
pub behavior: DropBehavior,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterEnumStmt {
pub typeName: List,
pub oldVal: Option<Str>,
pub newVal: Option<Str>,
pub newValNeighbor: Option<Str>,
pub newValIsAfter: bool,
pub skipIfNewValExists: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterEventTrigStmt {
pub trigname: Option<Str>,
pub tgenabled: u8,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterExtensionContentsStmt {
pub extname: Option<Str>,
pub action: i32,
pub objtype: ObjectType,
pub object: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterExtensionStmt {
pub extname: Option<Str>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterFdwStmt {
pub fdwname: Option<Str>,
pub func_options: List,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterForeignServerStmt {
pub servername: Option<Str>,
pub version: Option<Str>,
pub options: List,
pub has_version: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterFunctionStmt {
pub objtype: ObjectType,
pub func: Option<Box<ObjectWithArgs>>,
pub actions: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterObjectDependsStmt {
pub objectType: ObjectType,
pub relation: Option<Box<RangeVar>>,
pub object: Option<Node>,
pub extname: Option<Node>,
pub remove: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterObjectSchemaStmt {
pub objectType: ObjectType,
pub relation: Option<Box<RangeVar>>,
pub object: Option<Node>,
pub newschema: Option<Str>,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterOpFamilyStmt {
pub opfamilyname: List,
pub amname: Option<Str>,
pub isDrop: bool,
pub items: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterOperatorStmt {
pub opername: Option<Box<ObjectWithArgs>>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterOwnerStmt {
pub objectType: ObjectType,
pub relation: Option<Box<RangeVar>>,
pub object: Option<Node>,
pub newowner: Option<Box<RoleSpec>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterPolicyStmt {
pub policy_name: Option<Str>,
pub table: Option<Box<RangeVar>>,
pub roles: List,
pub qual: Option<Node>,
pub with_check: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterPublicationStmt {
pub pubname: Option<Str>,
pub options: List,
pub pubobjects: List,
pub action: AlterPublicationAction,
pub for_all_tables: bool,
pub for_all_sequences: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterRoleSetStmt {
pub role: Option<Box<RoleSpec>>,
pub database: Option<Str>,
pub setstmt: Option<Box<VariableSetStmt>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterRoleStmt {
pub role: Option<Box<RoleSpec>>,
pub options: List,
pub action: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterSeqStmt {
pub sequence: Option<Box<RangeVar>>,
pub options: List,
pub for_identity: bool,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterStatsStmt {
pub defnames: List,
pub stxstattarget: Option<Node>,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterSubscriptionStmt {
pub kind: AlterSubscriptionType,
pub subname: Option<Str>,
pub servername: Option<Str>,
pub conninfo: Option<Str>,
pub publication: List,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterSystemStmt {
pub setstmt: Option<Box<VariableSetStmt>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterTSConfigurationStmt {
pub kind: AlterTSConfigType,
pub cfgname: List,
pub tokentype: List,
pub dicts: List,
pub r#override: bool,
pub replace: bool,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterTSDictionaryStmt {
pub dictname: List,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterTableCmd {
pub subtype: AlterTableType,
pub name: Option<Str>,
pub num: i16,
pub newowner: Option<Box<RoleSpec>>,
pub def: Option<Node>,
pub behavior: DropBehavior,
pub missing_ok: bool,
pub recurse: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterTableMoveAllStmt {
pub orig_tablespacename: Option<Str>,
pub objtype: ObjectType,
pub roles: List,
pub new_tablespacename: Option<Str>,
pub nowait: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterTableSpaceOptionsStmt {
pub tablespacename: Option<Str>,
pub options: List,
pub isReset: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterTableStmt {
pub relation: Option<Box<RangeVar>>,
pub cmds: List,
pub objtype: ObjectType,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterTypeStmt {
pub typeName: List,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct AlterUserMappingStmt {
pub user: Option<Box<RoleSpec>>,
pub servername: Option<Str>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct BoolExpr {
pub boolop: BoolExprType,
pub args: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct BooleanTest {
pub arg: Option<Node>,
pub booltesttype: BoolTestType,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CTECycleClause {
pub cycle_col_list: List,
pub cycle_mark_column: Option<Str>,
pub cycle_mark_value: Option<Node>,
pub cycle_mark_default: Option<Node>,
pub cycle_path_column: Option<Str>,
pub location: i32,
pub cycle_mark_type: u32,
pub cycle_mark_typmod: i32,
pub cycle_mark_collation: u32,
pub cycle_mark_neop: u32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CTESearchClause {
pub search_col_list: List,
pub search_breadth_first: bool,
pub search_seq_column: Option<Str>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CallStmt {
pub funccall: Option<Box<FuncCall>>,
pub funcexpr: Option<Node>,
pub outargs: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CaseExpr {
pub casetype: u32,
pub casecollid: u32,
pub arg: Option<Node>,
pub args: List,
pub defresult: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CaseWhen {
pub expr: Option<Node>,
pub result: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CheckPointStmt {
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ClosePortalStmt {
pub portalname: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CoalesceExpr {
pub coalescetype: u32,
pub coalescecollid: u32,
pub args: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CollateClause {
pub arg: Option<Node>,
pub collname: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ColumnDef {
pub colname: Option<Str>,
pub typeName: Option<Box<TypeName>>,
pub compression: Option<Str>,
pub inhcount: i16,
pub is_local: bool,
pub is_not_null: bool,
pub is_from_type: bool,
pub storage: u8,
pub storage_name: Option<Str>,
pub raw_default: Option<Node>,
pub cooked_default: Option<Node>,
pub identity: u8,
pub identitySequence: Option<Box<RangeVar>>,
pub generated: u8,
pub collClause: Option<Box<CollateClause>>,
pub collOid: u32,
pub constraints: List,
pub fdwoptions: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ColumnRef {
pub fields: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CommentStmt {
pub objtype: ObjectType,
pub object: Option<Node>,
pub comment: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CommonTableExpr {
pub ctename: Option<Str>,
pub aliascolnames: List,
pub ctematerialized: CTEMaterialize,
pub ctequery: Option<Node>,
pub search_clause: Option<Box<CTESearchClause>>,
pub cycle_clause: Option<Box<CTECycleClause>>,
pub location: i32,
pub cterecursive: bool,
pub cterefcount: i32,
pub ctecolnames: List,
pub ctecoltypes: List,
pub ctecoltypmods: List,
pub ctecolcollations: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CompositeTypeStmt {
pub typevar: Option<Box<RangeVar>>,
pub coldeflist: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct Constraint {
pub contype: ConstrType,
pub conname: Option<Str>,
pub deferrable: bool,
pub initdeferred: bool,
pub is_enforced: bool,
pub skip_validation: bool,
pub initially_valid: bool,
pub is_no_inherit: bool,
pub raw_expr: Option<Node>,
pub cooked_expr: Option<Str>,
pub generated_when: u8,
pub generated_kind: u8,
pub nulls_not_distinct: bool,
pub keys: List,
pub without_overlaps: bool,
pub including: List,
pub exclusions: List,
pub options: List,
pub indexname: Option<Str>,
pub indexspace: Option<Str>,
pub reset_default_tblspc: bool,
pub access_method: Option<Str>,
pub where_clause: Option<Node>,
pub pktable: Option<Box<RangeVar>>,
pub fk_attrs: List,
pub pk_attrs: List,
pub fk_with_period: bool,
pub pk_with_period: bool,
pub fk_matchtype: u8,
pub fk_upd_action: u8,
pub fk_del_action: u8,
pub fk_del_set_cols: List,
pub old_conpfeqop: List,
pub old_pktable_oid: u32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ConstraintsSetStmt {
pub constraints: List,
pub deferred: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CopyStmt {
pub relation: Option<Box<RangeVar>>,
pub query: Option<Node>,
pub attlist: List,
pub is_from: bool,
pub is_program: bool,
pub filename: Option<Str>,
pub options: List,
pub whereClause: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateAmStmt {
pub amname: Option<Str>,
pub handler_name: List,
pub amtype: u8,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateCastStmt {
pub sourcetype: Option<Box<TypeName>>,
pub targettype: Option<Box<TypeName>>,
pub func: Option<Box<ObjectWithArgs>>,
pub context: CoercionContext,
pub inout: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateConversionStmt {
pub conversion_name: List,
pub for_encoding_name: Option<Str>,
pub to_encoding_name: Option<Str>,
pub func_name: List,
pub def: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateDomainStmt {
pub domainname: List,
pub typeName: Option<Box<TypeName>>,
pub collClause: Option<Box<CollateClause>>,
pub constraints: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateEnumStmt {
pub typeName: List,
pub vals: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateEventTrigStmt {
pub trigname: Option<Str>,
pub eventname: Option<Str>,
pub whenclause: List,
pub funcname: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateExtensionStmt {
pub extname: Option<Str>,
pub if_not_exists: bool,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateFdwStmt {
pub fdwname: Option<Str>,
pub func_options: List,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateForeignServerStmt {
pub servername: Option<Str>,
pub servertype: Option<Str>,
pub version: Option<Str>,
pub fdwname: Option<Str>,
pub if_not_exists: bool,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateForeignTableStmt {
pub base: CreateStmt,
pub servername: Option<Str>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateFunctionStmt {
pub is_procedure: bool,
pub replace: bool,
pub funcname: List,
pub parameters: List,
pub returnType: Option<Box<TypeName>>,
pub options: List,
pub sql_body: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateOpClassItem {
pub itemtype: i32,
pub name: Option<Box<ObjectWithArgs>>,
pub number: i32,
pub order_family: List,
pub class_args: List,
pub storedtype: Option<Box<TypeName>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateOpClassStmt {
pub opclassname: List,
pub opfamilyname: List,
pub amname: Option<Str>,
pub datatype: Option<Box<TypeName>>,
pub items: List,
pub isDefault: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateOpFamilyStmt {
pub opfamilyname: List,
pub amname: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreatePLangStmt {
pub replace: bool,
pub plname: Option<Str>,
pub plhandler: List,
pub plinline: List,
pub plvalidator: List,
pub pltrusted: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreatePolicyStmt {
pub policy_name: Option<Str>,
pub table: Option<Box<RangeVar>>,
pub cmd_name: Option<Str>,
pub permissive: bool,
pub roles: List,
pub qual: Option<Node>,
pub with_check: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreatePublicationStmt {
pub pubname: Option<Str>,
pub options: List,
pub pubobjects: List,
pub for_all_tables: bool,
pub for_all_sequences: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateRangeStmt {
pub typeName: List,
pub params: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateRoleStmt {
pub stmt_type: RoleStmtType,
pub role: Option<Str>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateSchemaStmt {
pub schemaname: Option<Str>,
pub authrole: Option<Box<RoleSpec>>,
pub schemaElts: List,
pub if_not_exists: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateSeqStmt {
pub sequence: Option<Box<RangeVar>>,
pub options: List,
pub ownerId: u32,
pub for_identity: bool,
pub if_not_exists: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateStatsStmt {
pub defnames: List,
pub stat_types: List,
pub exprs: List,
pub relations: List,
pub stxcomment: Option<Str>,
pub transformed: bool,
pub if_not_exists: bool,
pub owner: u32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateStmt {
pub relation: Option<Box<RangeVar>>,
pub tableElts: List,
pub inhRelations: List,
pub partbound: Option<Box<PartitionBoundSpec>>,
pub partspec: Option<Box<PartitionSpec>>,
pub ofTypename: Option<Box<TypeName>>,
pub constraints: List,
pub nnconstraints: List,
pub options: List,
pub oncommit: OnCommitAction,
pub tablespacename: Option<Str>,
pub accessMethod: Option<Str>,
pub if_not_exists: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateSubscriptionStmt {
pub subname: Option<Str>,
pub servername: Option<Str>,
pub conninfo: Option<Str>,
pub publication: List,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateTableAsStmt {
pub query: Option<Node>,
pub into: Option<Box<IntoClause>>,
pub objtype: ObjectType,
pub is_select_into: bool,
pub if_not_exists: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateTableSpaceStmt {
pub tablespacename: Option<Str>,
pub owner: Option<Box<RoleSpec>>,
pub location: Option<Str>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateTransformStmt {
pub replace: bool,
pub type_name: Option<Box<TypeName>>,
pub lang: Option<Str>,
pub fromsql: Option<Box<ObjectWithArgs>>,
pub tosql: Option<Box<ObjectWithArgs>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateTrigStmt {
pub replace: bool,
pub isconstraint: bool,
pub trigname: Option<Str>,
pub relation: Option<Box<RangeVar>>,
pub funcname: List,
pub args: List,
pub row: bool,
pub timing: i16,
pub events: i16,
pub columns: List,
pub whenClause: Option<Node>,
pub transitionRels: List,
pub deferrable: bool,
pub initdeferred: bool,
pub constrrel: Option<Box<RangeVar>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreateUserMappingStmt {
pub user: Option<Box<RoleSpec>>,
pub servername: Option<Str>,
pub if_not_exists: bool,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CreatedbStmt {
pub dbname: Option<Str>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct CurrentOfExpr {
pub cvarno: u32,
pub cursor_name: Option<Str>,
pub cursor_param: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DeallocateStmt {
pub name: Option<Str>,
pub isall: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DeclareCursorStmt {
pub portalname: Option<Str>,
pub options: i32,
pub query: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DefElem {
pub defnamespace: Option<Str>,
pub defname: Option<Str>,
pub arg: Option<Node>,
pub defaction: DefElemAction,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DefineStmt {
pub kind: ObjectType,
pub oldstyle: bool,
pub defnames: List,
pub args: List,
pub definition: List,
pub if_not_exists: bool,
pub replace: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DeleteStmt {
pub relation: Option<Box<RangeVar>>,
pub usingClause: List,
pub whereClause: Option<Node>,
pub returningClause: Option<Box<ReturningClause>>,
pub withClause: Option<Box<WithClause>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DiscardStmt {
pub target: DiscardMode,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DoStmt {
pub args: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DropOwnedStmt {
pub roles: List,
pub behavior: DropBehavior,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DropRoleStmt {
pub roles: List,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DropStmt {
pub objects: List,
pub removeType: ObjectType,
pub behavior: DropBehavior,
pub missing_ok: bool,
pub concurrent: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DropSubscriptionStmt {
pub subname: Option<Str>,
pub missing_ok: bool,
pub behavior: DropBehavior,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DropTableSpaceStmt {
pub tablespacename: Option<Str>,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DropUserMappingStmt {
pub user: Option<Box<RoleSpec>>,
pub servername: Option<Str>,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct DropdbStmt {
pub dbname: Option<Str>,
pub missing_ok: bool,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ExecuteStmt {
pub name: Option<Str>,
pub params: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ExplainStmt {
pub query: Option<Node>,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct FetchStmt {
pub direction: FetchDirection,
pub howMany: i64,
pub portalname: Option<Str>,
pub ismove: bool,
pub direction_keyword: FetchDirectionKeywords,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct FuncCall {
pub funcname: List,
pub args: List,
pub agg_order: List,
pub agg_filter: Option<Node>,
pub over: Option<Box<WindowDef>>,
pub ignore_nulls: i32,
pub agg_within_group: bool,
pub agg_star: bool,
pub agg_distinct: bool,
pub func_variadic: bool,
pub funcformat: CoercionForm,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct FunctionParameter {
pub name: Option<Str>,
pub argType: Option<Box<TypeName>>,
pub mode: FunctionParameterMode,
pub defexpr: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct GrantRoleStmt {
pub granted_roles: List,
pub grantee_roles: List,
pub is_grant: bool,
pub opt: List,
pub grantor: Option<Box<RoleSpec>>,
pub behavior: DropBehavior,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct GrantStmt {
pub is_grant: bool,
pub targtype: GrantTargetType,
pub objtype: ObjectType,
pub objects: List,
pub privileges: List,
pub grantees: List,
pub grant_option: bool,
pub grantor: Option<Box<RoleSpec>>,
pub behavior: DropBehavior,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct GroupingFunc {
pub args: List,
pub refs: List,
pub cols: List,
pub agglevelsup: u32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct GroupingSet {
pub kind: GroupingSetKind,
pub content: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ImportForeignSchemaStmt {
pub server_name: Option<Str>,
pub remote_schema: Option<Str>,
pub local_schema: Option<Str>,
pub list_type: ImportForeignSchemaType,
pub table_list: List,
pub options: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct IndexElem {
pub name: Option<Str>,
pub expr: Option<Node>,
pub indexcolname: Option<Str>,
pub collation: List,
pub opclass: List,
pub opclassopts: List,
pub ordering: SortByDir,
pub nulls_ordering: SortByNulls,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct IndexStmt {
pub idxname: Option<Str>,
pub relation: Option<Box<RangeVar>>,
pub accessMethod: Option<Str>,
pub tableSpace: Option<Str>,
pub indexParams: List,
pub indexIncludingParams: List,
pub options: List,
pub whereClause: Option<Node>,
pub excludeOpNames: List,
pub idxcomment: Option<Str>,
pub indexOid: u32,
pub oldNumber: u32,
pub oldCreateSubid: u32,
pub oldFirstRelfilelocatorSubid: u32,
pub unique: bool,
pub nulls_not_distinct: bool,
pub primary: bool,
pub isconstraint: bool,
pub iswithoutoverlaps: bool,
pub deferrable: bool,
pub initdeferred: bool,
pub transformed: bool,
pub concurrent: bool,
pub if_not_exists: bool,
pub reset_default_tblspc: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct InferClause {
pub indexElems: List,
pub whereClause: Option<Node>,
pub conname: Option<Str>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct InsertStmt {
pub relation: Option<Box<RangeVar>>,
pub cols: List,
pub selectStmt: Option<Node>,
pub onConflictClause: Option<Box<OnConflictClause>>,
pub returningClause: Option<Box<ReturningClause>>,
pub withClause: Option<Box<WithClause>>,
pub r#override: OverridingKind,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct IntoClause {
pub rel: Option<Box<RangeVar>>,
pub colNames: List,
pub accessMethod: Option<Str>,
pub options: List,
pub onCommit: OnCommitAction,
pub tableSpaceName: Option<Str>,
pub viewQuery: Option<Node>,
pub skipData: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JoinExpr {
pub jointype: JoinType,
pub isNatural: bool,
pub larg: Option<Node>,
pub rarg: Option<Node>,
pub usingClause: List,
pub join_using_alias: Option<Box<Alias>>,
pub quals: Option<Node>,
pub alias: Option<Box<Alias>>,
pub rtindex: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonAggConstructor {
pub output: Option<Box<JsonOutput>>,
pub agg_filter: Option<Node>,
pub agg_order: List,
pub over: Option<Box<WindowDef>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonArgument {
pub val: Option<Box<JsonValueExpr>>,
pub name: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonArrayAgg {
pub constructor: Option<Box<JsonAggConstructor>>,
pub arg: Option<Box<JsonValueExpr>>,
pub absent_on_null: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonArrayConstructor {
pub exprs: List,
pub output: Option<Box<JsonOutput>>,
pub absent_on_null: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonArrayQueryConstructor {
pub query: Option<Node>,
pub output: Option<Box<JsonOutput>>,
pub format: Option<Box<JsonFormat>>,
pub absent_on_null: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonBehavior {
pub btype: JsonBehaviorType,
pub expr: Option<Node>,
pub coerce: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonFormat {
pub format_type: JsonFormatType,
pub encoding: JsonEncoding,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonFuncExpr {
pub op: JsonExprOp,
pub column_name: Option<Str>,
pub context_item: Option<Box<JsonValueExpr>>,
pub pathspec: Option<Node>,
pub passing: List,
pub output: Option<Box<JsonOutput>>,
pub on_empty: Option<Box<JsonBehavior>>,
pub on_error: Option<Box<JsonBehavior>>,
pub wrapper: JsonWrapper,
pub quotes: JsonQuotes,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonIsPredicate {
pub expr: Option<Node>,
pub format: Option<Box<JsonFormat>>,
pub item_type: JsonValueType,
pub unique_keys: bool,
pub exprBaseType: u32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonKeyValue {
pub key: Option<Node>,
pub value: Option<Box<JsonValueExpr>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonObjectAgg {
pub constructor: Option<Box<JsonAggConstructor>>,
pub arg: Option<Box<JsonKeyValue>>,
pub absent_on_null: bool,
pub unique: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonObjectConstructor {
pub exprs: List,
pub output: Option<Box<JsonOutput>>,
pub absent_on_null: bool,
pub unique: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonOutput {
pub typeName: Option<Box<TypeName>>,
pub returning: Option<Box<JsonReturning>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonParseExpr {
pub expr: Option<Box<JsonValueExpr>>,
pub output: Option<Box<JsonOutput>>,
pub unique_keys: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonReturning {
pub format: Option<Box<JsonFormat>>,
pub typid: u32,
pub typmod: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonScalarExpr {
pub expr: Option<Node>,
pub output: Option<Box<JsonOutput>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonSerializeExpr {
pub expr: Option<Box<JsonValueExpr>>,
pub output: Option<Box<JsonOutput>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonTable {
pub context_item: Option<Box<JsonValueExpr>>,
pub pathspec: Option<Box<JsonTablePathSpec>>,
pub passing: List,
pub columns: List,
pub on_error: Option<Box<JsonBehavior>>,
pub alias: Option<Box<Alias>>,
pub lateral: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonTableColumn {
pub coltype: JsonTableColumnType,
pub name: Option<Str>,
pub typeName: Option<Box<TypeName>>,
pub pathspec: Option<Box<JsonTablePathSpec>>,
pub format: Option<Box<JsonFormat>>,
pub wrapper: JsonWrapper,
pub quotes: JsonQuotes,
pub columns: List,
pub on_empty: Option<Box<JsonBehavior>>,
pub on_error: Option<Box<JsonBehavior>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonTablePathSpec {
pub string: Option<Node>,
pub name: Option<Str>,
pub name_location: i32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct JsonValueExpr {
pub raw_expr: Option<Node>,
pub formatted_expr: Option<Node>,
pub format: Option<Box<JsonFormat>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ListenStmt {
pub conditionname: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct LoadStmt {
pub filename: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct LockStmt {
pub relations: List,
pub mode: i32,
pub nowait: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct LockingClause {
pub lockedRels: List,
pub strength: LockClauseStrength,
pub waitPolicy: LockWaitPolicy,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MergeStmt {
pub relation: Option<Box<RangeVar>>,
pub sourceRelation: Option<Node>,
pub joinCondition: Option<Node>,
pub mergeWhenClauses: List,
pub returningClause: Option<Box<ReturningClause>>,
pub withClause: Option<Box<WithClause>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MergeSupportFunc {
pub msftype: u32,
pub msfcollid: u32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MergeWhenClause {
pub matchKind: MergeMatchKind,
pub commandType: CmdType,
pub r#override: OverridingKind,
pub condition: Option<Node>,
pub targetList: List,
pub values: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MinMaxExpr {
pub minmaxtype: u32,
pub minmaxcollid: u32,
pub inputcollid: u32,
pub op: MinMaxOp,
pub args: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct MultiAssignRef {
pub source: Option<Node>,
pub colno: i32,
pub ncolumns: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct NamedArgExpr {
pub arg: Option<Node>,
pub name: Option<Str>,
pub argnumber: i32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct NotifyStmt {
pub conditionname: Option<Str>,
pub payload: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct NullTest {
pub arg: Option<Node>,
pub nulltesttype: NullTestType,
pub argisrow: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ObjectWithArgs {
pub objname: List,
pub objargs: List,
pub objfuncargs: List,
pub args_unspecified: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct OnConflictClause {
pub action: OnConflictAction,
pub infer: Option<Box<InferClause>>,
pub lockStrength: LockClauseStrength,
pub targetList: List,
pub whereClause: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PLAssignStmt {
pub name: Option<Str>,
pub indirection: List,
pub nnames: i32,
pub val: Option<Box<SelectStmt>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ParamRef {
pub number: i32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PartitionBoundSpec {
pub strategy: u8,
pub is_default: bool,
pub modulus: i32,
pub remainder: i32,
pub listdatums: List,
pub lowerdatums: List,
pub upperdatums: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PartitionCmd {
pub name: Option<Box<RangeVar>>,
pub bound: Option<Box<PartitionBoundSpec>>,
pub concurrent: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PartitionElem {
pub name: Option<Str>,
pub expr: Option<Node>,
pub collation: List,
pub opclass: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PartitionSpec {
pub strategy: PartitionStrategy,
pub partParams: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PrepareStmt {
pub name: Option<Str>,
pub argtypes: List,
pub query: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PublicationAllObjSpec {
pub pubobjtype: PublicationAllObjType,
pub except_tables: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PublicationObjSpec {
pub pubobjtype: PublicationObjSpecType,
pub name: Option<Str>,
pub pubtable: Option<Box<PublicationTable>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct PublicationTable {
pub relation: Option<Box<RangeVar>>,
pub whereClause: Option<Node>,
pub columns: List,
pub except: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RangeFunction {
pub lateral: bool,
pub ordinality: bool,
pub is_rowsfrom: bool,
pub functions: List,
pub alias: Option<Box<Alias>>,
pub coldeflist: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RangeSubselect {
pub lateral: bool,
pub subquery: Option<Node>,
pub alias: Option<Box<Alias>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RangeTableFunc {
pub lateral: bool,
pub docexpr: Option<Node>,
pub rowexpr: Option<Node>,
pub namespaces: List,
pub columns: List,
pub alias: Option<Box<Alias>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RangeTableFuncCol {
pub colname: Option<Str>,
pub typeName: Option<Box<TypeName>>,
pub for_ordinality: bool,
pub is_not_null: bool,
pub colexpr: Option<Node>,
pub coldefexpr: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RangeTableSample {
pub relation: Option<Node>,
pub method: List,
pub args: List,
pub repeatable: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RangeVar {
pub catalogname: Option<Str>,
pub schemaname: Option<Str>,
pub relname: Option<Str>,
pub inh: bool,
pub relpersistence: u8,
pub alias: Option<Box<Alias>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RawStmt {
pub stmt: Option<Node>,
pub stmt_location: i32,
pub stmt_len: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ReassignOwnedStmt {
pub roles: List,
pub newrole: Option<Box<RoleSpec>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RefreshMatViewStmt {
pub concurrent: bool,
pub skipData: bool,
pub relation: Option<Box<RangeVar>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ReindexStmt {
pub kind: ReindexObjectType,
pub relation: Option<Box<RangeVar>>,
pub name: Option<Str>,
pub params: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RenameStmt {
pub renameType: ObjectType,
pub relationType: ObjectType,
pub relation: Option<Box<RangeVar>>,
pub object: Option<Node>,
pub subname: Option<Str>,
pub newname: Option<Str>,
pub behavior: DropBehavior,
pub missing_ok: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RepackStmt {
pub command: RepackCommand,
pub relation: Option<Box<VacuumRelation>>,
pub indexname: Option<Str>,
pub usingindex: bool,
pub params: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ReplicaIdentityStmt {
pub identity_type: u8,
pub name: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ResTarget {
pub name: Option<Str>,
pub indirection: List,
pub val: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ReturnStmt {
pub returnval: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ReturningClause {
pub options: List,
pub exprs: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ReturningOption {
pub option: ReturningOptionKind,
pub value: Option<Str>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RoleSpec {
pub roletype: RoleSpecType,
pub rolename: Option<Str>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RowExpr {
pub args: List,
pub row_typeid: u32,
pub row_format: CoercionForm,
pub colnames: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct RuleStmt {
pub relation: Option<Box<RangeVar>>,
pub rulename: Option<Str>,
pub whereClause: Option<Node>,
pub event: CmdType,
pub instead: bool,
pub actions: List,
pub replace: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SQLValueFunction {
pub op: SQLValueFunctionOp,
pub r#type: u32,
pub typmod: i32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SecLabelStmt {
pub objtype: ObjectType,
pub object: Option<Node>,
pub provider: Option<Str>,
pub label: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SelectStmt {
pub distinctClause: List,
pub intoClause: Option<Box<IntoClause>>,
pub targetList: List,
pub fromClause: List,
pub whereClause: Option<Node>,
pub groupClause: List,
pub groupDistinct: bool,
pub havingClause: Option<Node>,
pub windowClause: List,
pub valuesLists: List,
pub sortClause: List,
pub limitOffset: Option<Node>,
pub limitCount: Option<Node>,
pub limitOption: LimitOption,
pub lockingClause: List,
pub withClause: Option<Box<WithClause>>,
pub op: SetOperation,
pub all: bool,
pub larg: Option<Box<SelectStmt>>,
pub rarg: Option<Box<SelectStmt>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SetToDefault {
pub typeId: u32,
pub typeMod: i32,
pub collation: u32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SortBy {
pub node: Option<Node>,
pub sortby_dir: SortByDir,
pub sortby_nulls: SortByNulls,
pub useOp: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct StatsElem {
pub name: Option<Str>,
pub expr: Option<Node>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SubLink {
pub subLinkType: SubLinkType,
pub subLinkId: i32,
pub testexpr: Option<Node>,
pub operName: List,
pub subselect: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct TableLikeClause {
pub relation: Option<Box<RangeVar>>,
pub options: u32,
pub relationOid: u32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct TransactionStmt {
pub kind: TransactionStmtKind,
pub options: List,
pub savepoint_name: Option<Str>,
pub gid: Option<Str>,
pub chain: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct TriggerTransition {
pub name: Option<Str>,
pub isNew: bool,
pub isTable: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct TruncateStmt {
pub relations: List,
pub restart_seqs: bool,
pub behavior: DropBehavior,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct TypeCast {
pub arg: Option<Node>,
pub typeName: Option<Box<TypeName>>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct TypeName {
pub names: List,
pub typeOid: u32,
pub setof: bool,
pub pct_type: bool,
pub typmods: List,
pub typemod: i32,
pub arrayBounds: List,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct UnlistenStmt {
pub conditionname: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct UpdateStmt {
pub relation: Option<Box<RangeVar>>,
pub targetList: List,
pub whereClause: Option<Node>,
pub fromClause: List,
pub returningClause: Option<Box<ReturningClause>>,
pub withClause: Option<Box<WithClause>>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct VacuumRelation {
pub relation: Option<Box<RangeVar>>,
pub oid: u32,
pub va_cols: List,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct VacuumStmt {
pub options: List,
pub rels: List,
pub is_vacuumcmd: bool,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct VariableSetStmt {
pub kind: VariableSetKind,
pub name: Option<Str>,
pub args: List,
pub jumble_args: bool,
pub is_local: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct VariableShowStmt {
pub name: Option<Str>,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ViewStmt {
pub view: Option<Box<RangeVar>>,
pub aliases: List,
pub query: Option<Node>,
pub replace: bool,
pub options: List,
pub withCheckOption: ViewCheckOption,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WaitStmt {
pub lsn_literal: Option<Str>,
pub options: List,
pub lsn_location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WindowDef {
pub name: Option<Str>,
pub refname: Option<Str>,
pub partitionClause: List,
pub orderClause: List,
pub frameOptions: i32,
pub startOffset: Option<Node>,
pub endOffset: Option<Node>,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct WithClause {
pub ctes: List,
pub recursive: bool,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct XmlExpr {
pub op: XmlExprOp,
pub name: Option<Str>,
pub named_args: List,
pub arg_names: List,
pub args: List,
pub xmloption: XmlOptionType,
pub indent: bool,
pub r#type: u32,
pub typmod: i32,
pub location: i32,
}
#[derive(Clone, Debug, Default, PartialEq)]
pub struct XmlSerialize {
pub xmloption: XmlOptionType,
pub expr: Option<Node>,
pub typeName: Option<Box<TypeName>>,
pub indent: bool,
pub location: i32,
}
impl Out for ATAlterConstraint {
fn out(&self, s: &mut String) {
s.push_str("ATALTERCONSTRAINT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "conname", self.conname.as_deref());
w::bool(s, prefix, "alterEnforceability", self.alterEnforceability);
w::bool(s, prefix, "is_enforced", self.is_enforced);
w::bool(s, prefix, "alterDeferrability", self.alterDeferrability);
w::bool(s, prefix, "deferrable", self.deferrable);
w::bool(s, prefix, "initdeferred", self.initdeferred);
w::bool(s, prefix, "alterInheritability", self.alterInheritability);
w::bool(s, prefix, "noinherit", self.noinherit);
}
}
impl Out for A_ArrayExpr {
fn out(&self, s: &mut String) {
s.push_str("A_ARRAYEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "elements", &self.elements);
w::int(s, prefix, "list_start", self.list_start);
w::int(s, prefix, "list_end", self.list_end);
w::int(s, prefix, "location", self.location);
}
}
impl Out for A_Indices {
fn out(&self, s: &mut String) {
s.push_str("A_INDICES");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "is_slice", self.is_slice);
w::node(s, prefix, "lidx", self.lidx.as_ref());
w::node(s, prefix, "uidx", self.uidx.as_ref());
}
}
impl Out for A_Indirection {
fn out(&self, s: &mut String) {
s.push_str("A_INDIRECTION");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "arg", self.arg.as_ref());
w::list(s, prefix, "indirection", &self.indirection);
}
}
impl Out for A_Star {
fn out(&self, s: &mut String) {
s.push_str("A_STAR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
let _ = (s, prefix);
}
}
impl Out for AccessPriv {
fn out(&self, s: &mut String) {
s.push_str("ACCESSPRIV");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "priv_name", self.priv_name.as_deref());
w::list(s, prefix, "cols", &self.cols);
}
}
impl Out for Alias {
fn out(&self, s: &mut String) {
s.push_str("ALIAS");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "aliasname", self.aliasname.as_deref());
w::list(s, prefix, "colnames", &self.colnames);
}
}
impl Out for AlterCollationStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERCOLLATIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "collname", &self.collname);
}
}
impl Out for AlterDatabaseRefreshCollStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERDATABASEREFRESHCOLLSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "dbname", self.dbname.as_deref());
}
}
impl Out for AlterDatabaseSetStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERDATABASESETSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "dbname", self.dbname.as_deref());
w::boxed(s, prefix, "setstmt", self.setstmt.as_deref());
}
}
impl Out for AlterDatabaseStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERDATABASESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "dbname", self.dbname.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for AlterDefaultPrivilegesStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERDEFAULTPRIVILEGESSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "options", &self.options);
w::boxed(s, prefix, "action", self.action.as_deref());
}
}
impl Out for AlterDomainStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERDOMAINSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "subtype", self.subtype.0);
w::list(s, prefix, "typeName", &self.typeName);
w::text(s, prefix, "name", self.name.as_deref());
w::node(s, prefix, "def", self.def.as_ref());
w::int(s, prefix, "behavior", self.behavior.0);
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for AlterEnumStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERENUMSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "typeName", &self.typeName);
w::text(s, prefix, "oldVal", self.oldVal.as_deref());
w::text(s, prefix, "newVal", self.newVal.as_deref());
w::text(s, prefix, "newValNeighbor", self.newValNeighbor.as_deref());
w::bool(s, prefix, "newValIsAfter", self.newValIsAfter);
w::bool(s, prefix, "skipIfNewValExists", self.skipIfNewValExists);
}
}
impl Out for AlterEventTrigStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEREVENTTRIGSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "trigname", self.trigname.as_deref());
w::char(s, prefix, "tgenabled", self.tgenabled);
}
}
impl Out for AlterExtensionContentsStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEREXTENSIONCONTENTSSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "extname", self.extname.as_deref());
w::int(s, prefix, "action", self.action);
w::int(s, prefix, "objtype", self.objtype.0);
w::node(s, prefix, "object", self.object.as_ref());
}
}
impl Out for AlterExtensionStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEREXTENSIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "extname", self.extname.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for AlterFdwStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERFDWSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "fdwname", self.fdwname.as_deref());
w::list(s, prefix, "func_options", &self.func_options);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for AlterForeignServerStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERFOREIGNSERVERSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "servername", self.servername.as_deref());
w::text(s, prefix, "version", self.version.as_deref());
w::list(s, prefix, "options", &self.options);
w::bool(s, prefix, "has_version", self.has_version);
}
}
impl Out for AlterFunctionStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERFUNCTIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "objtype", self.objtype.0);
w::boxed(s, prefix, "func", self.func.as_deref());
w::list(s, prefix, "actions", &self.actions);
}
}
impl Out for AlterObjectDependsStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEROBJECTDEPENDSSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "objectType", self.objectType.0);
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::node(s, prefix, "object", self.object.as_ref());
w::node(s, prefix, "extname", self.extname.as_ref());
w::bool(s, prefix, "remove", self.remove);
}
}
impl Out for AlterObjectSchemaStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEROBJECTSCHEMASTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "objectType", self.objectType.0);
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::node(s, prefix, "object", self.object.as_ref());
w::text(s, prefix, "newschema", self.newschema.as_deref());
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for AlterOpFamilyStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEROPFAMILYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "opfamilyname", &self.opfamilyname);
w::text(s, prefix, "amname", self.amname.as_deref());
w::bool(s, prefix, "isDrop", self.isDrop);
w::list(s, prefix, "items", &self.items);
}
}
impl Out for AlterOperatorStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEROPERATORSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "opername", self.opername.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for AlterOwnerStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTEROWNERSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "objectType", self.objectType.0);
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::node(s, prefix, "object", self.object.as_ref());
w::boxed(s, prefix, "newowner", self.newowner.as_deref());
}
}
impl Out for AlterPolicyStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERPOLICYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "policy_name", self.policy_name.as_deref());
w::boxed(s, prefix, "table", self.table.as_deref());
w::list(s, prefix, "roles", &self.roles);
w::node(s, prefix, "qual", self.qual.as_ref());
w::node(s, prefix, "with_check", self.with_check.as_ref());
}
}
impl Out for AlterPublicationStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERPUBLICATIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "pubname", self.pubname.as_deref());
w::list(s, prefix, "options", &self.options);
w::list(s, prefix, "pubobjects", &self.pubobjects);
w::int(s, prefix, "action", self.action.0);
w::bool(s, prefix, "for_all_tables", self.for_all_tables);
w::bool(s, prefix, "for_all_sequences", self.for_all_sequences);
}
}
impl Out for AlterRoleSetStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERROLESETSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "role", self.role.as_deref());
w::text(s, prefix, "database", self.database.as_deref());
w::boxed(s, prefix, "setstmt", self.setstmt.as_deref());
}
}
impl Out for AlterRoleStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERROLESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "role", self.role.as_deref());
w::list(s, prefix, "options", &self.options);
w::int(s, prefix, "action", self.action);
}
}
impl Out for AlterSeqStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERSEQSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "sequence", self.sequence.as_deref());
w::list(s, prefix, "options", &self.options);
w::bool(s, prefix, "for_identity", self.for_identity);
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for AlterStatsStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERSTATSSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "defnames", &self.defnames);
w::node(s, prefix, "stxstattarget", self.stxstattarget.as_ref());
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for AlterSubscriptionStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERSUBSCRIPTIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "kind", self.kind.0);
w::text(s, prefix, "subname", self.subname.as_deref());
w::text(s, prefix, "servername", self.servername.as_deref());
w::text(s, prefix, "conninfo", self.conninfo.as_deref());
w::list(s, prefix, "publication", &self.publication);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for AlterSystemStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERSYSTEMSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "setstmt", self.setstmt.as_deref());
}
}
impl Out for AlterTSConfigurationStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERTSCONFIGURATIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "kind", self.kind.0);
w::list(s, prefix, "cfgname", &self.cfgname);
w::list(s, prefix, "tokentype", &self.tokentype);
w::list(s, prefix, "dicts", &self.dicts);
w::bool(s, prefix, "override", self.r#override);
w::bool(s, prefix, "replace", self.replace);
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for AlterTSDictionaryStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERTSDICTIONARYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "dictname", &self.dictname);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for AlterTableCmd {
fn out(&self, s: &mut String) {
s.push_str("ALTERTABLECMD");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "subtype", self.subtype.0);
w::text(s, prefix, "name", self.name.as_deref());
w::int(s, prefix, "num", self.num);
w::boxed(s, prefix, "newowner", self.newowner.as_deref());
w::node(s, prefix, "def", self.def.as_ref());
w::int(s, prefix, "behavior", self.behavior.0);
w::bool(s, prefix, "missing_ok", self.missing_ok);
w::bool(s, prefix, "recurse", self.recurse);
}
}
impl Out for AlterTableMoveAllStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERTABLEMOVEALLSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "orig_tablespacename", self.orig_tablespacename.as_deref());
w::int(s, prefix, "objtype", self.objtype.0);
w::list(s, prefix, "roles", &self.roles);
w::text(s, prefix, "new_tablespacename", self.new_tablespacename.as_deref());
w::bool(s, prefix, "nowait", self.nowait);
}
}
impl Out for AlterTableSpaceOptionsStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERTABLESPACEOPTIONSSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
w::list(s, prefix, "options", &self.options);
w::bool(s, prefix, "isReset", self.isReset);
}
}
impl Out for AlterTableStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERTABLESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::list(s, prefix, "cmds", &self.cmds);
w::int(s, prefix, "objtype", self.objtype.0);
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for AlterTypeStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERTYPESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "typeName", &self.typeName);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for AlterUserMappingStmt {
fn out(&self, s: &mut String) {
s.push_str("ALTERUSERMAPPINGSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "user", self.user.as_deref());
w::text(s, prefix, "servername", self.servername.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for BooleanTest {
fn out(&self, s: &mut String) {
s.push_str("BOOLEANTEST");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "arg", self.arg.as_ref());
w::int(s, prefix, "booltesttype", self.booltesttype.0);
w::int(s, prefix, "location", self.location);
}
}
impl Out for CTECycleClause {
fn out(&self, s: &mut String) {
s.push_str("CTECYCLECLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "cycle_col_list", &self.cycle_col_list);
w::text(s, prefix, "cycle_mark_column", self.cycle_mark_column.as_deref());
w::node(s, prefix, "cycle_mark_value", self.cycle_mark_value.as_ref());
w::node(s, prefix, "cycle_mark_default", self.cycle_mark_default.as_ref());
w::text(s, prefix, "cycle_path_column", self.cycle_path_column.as_deref());
w::int(s, prefix, "location", self.location);
w::int(s, prefix, "cycle_mark_type", self.cycle_mark_type);
w::int(s, prefix, "cycle_mark_typmod", self.cycle_mark_typmod);
w::int(s, prefix, "cycle_mark_collation", self.cycle_mark_collation);
w::int(s, prefix, "cycle_mark_neop", self.cycle_mark_neop);
}
}
impl Out for CTESearchClause {
fn out(&self, s: &mut String) {
s.push_str("CTESEARCHCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "search_col_list", &self.search_col_list);
w::bool(s, prefix, "search_breadth_first", self.search_breadth_first);
w::text(s, prefix, "search_seq_column", self.search_seq_column.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for CallStmt {
fn out(&self, s: &mut String) {
s.push_str("CALLSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "funccall", self.funccall.as_deref());
w::node(s, prefix, "funcexpr", self.funcexpr.as_ref());
w::list(s, prefix, "outargs", &self.outargs);
}
}
impl Out for CaseExpr {
fn out(&self, s: &mut String) {
s.push_str("CASEEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "casetype", self.casetype);
w::int(s, prefix, "casecollid", self.casecollid);
w::node(s, prefix, "arg", self.arg.as_ref());
w::list(s, prefix, "args", &self.args);
w::node(s, prefix, "defresult", self.defresult.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for CaseWhen {
fn out(&self, s: &mut String) {
s.push_str("CASEWHEN");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "expr", self.expr.as_ref());
w::node(s, prefix, "result", self.result.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for CheckPointStmt {
fn out(&self, s: &mut String) {
s.push_str("CHECKPOINTSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "options", &self.options);
}
}
impl Out for ClosePortalStmt {
fn out(&self, s: &mut String) {
s.push_str("CLOSEPORTALSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "portalname", self.portalname.as_deref());
}
}
impl Out for CoalesceExpr {
fn out(&self, s: &mut String) {
s.push_str("COALESCEEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "coalescetype", self.coalescetype);
w::int(s, prefix, "coalescecollid", self.coalescecollid);
w::list(s, prefix, "args", &self.args);
w::int(s, prefix, "location", self.location);
}
}
impl Out for CollateClause {
fn out(&self, s: &mut String) {
s.push_str("COLLATECLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "arg", self.arg.as_ref());
w::list(s, prefix, "collname", &self.collname);
w::int(s, prefix, "location", self.location);
}
}
impl Out for ColumnDef {
fn out(&self, s: &mut String) {
s.push_str("COLUMNDEF");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "colname", self.colname.as_deref());
w::boxed(s, prefix, "typeName", self.typeName.as_deref());
w::text(s, prefix, "compression", self.compression.as_deref());
w::int(s, prefix, "inhcount", self.inhcount);
w::bool(s, prefix, "is_local", self.is_local);
w::bool(s, prefix, "is_not_null", self.is_not_null);
w::bool(s, prefix, "is_from_type", self.is_from_type);
w::char(s, prefix, "storage", self.storage);
w::text(s, prefix, "storage_name", self.storage_name.as_deref());
w::node(s, prefix, "raw_default", self.raw_default.as_ref());
w::node(s, prefix, "cooked_default", self.cooked_default.as_ref());
w::char(s, prefix, "identity", self.identity);
w::boxed(s, prefix, "identitySequence", self.identitySequence.as_deref());
w::char(s, prefix, "generated", self.generated);
w::boxed(s, prefix, "collClause", self.collClause.as_deref());
w::int(s, prefix, "collOid", self.collOid);
w::list(s, prefix, "constraints", &self.constraints);
w::list(s, prefix, "fdwoptions", &self.fdwoptions);
w::int(s, prefix, "location", self.location);
}
}
impl Out for ColumnRef {
fn out(&self, s: &mut String) {
s.push_str("COLUMNREF");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "fields", &self.fields);
w::int(s, prefix, "location", self.location);
}
}
impl Out for CommentStmt {
fn out(&self, s: &mut String) {
s.push_str("COMMENTSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "objtype", self.objtype.0);
w::node(s, prefix, "object", self.object.as_ref());
w::text(s, prefix, "comment", self.comment.as_deref());
}
}
impl Out for CommonTableExpr {
fn out(&self, s: &mut String) {
s.push_str("COMMONTABLEEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "ctename", self.ctename.as_deref());
w::list(s, prefix, "aliascolnames", &self.aliascolnames);
w::int(s, prefix, "ctematerialized", self.ctematerialized.0);
w::node(s, prefix, "ctequery", self.ctequery.as_ref());
w::boxed(s, prefix, "search_clause", self.search_clause.as_deref());
w::boxed(s, prefix, "cycle_clause", self.cycle_clause.as_deref());
w::int(s, prefix, "location", self.location);
w::bool(s, prefix, "cterecursive", self.cterecursive);
w::int(s, prefix, "cterefcount", self.cterefcount);
w::list(s, prefix, "ctecolnames", &self.ctecolnames);
w::list(s, prefix, "ctecoltypes", &self.ctecoltypes);
w::list(s, prefix, "ctecoltypmods", &self.ctecoltypmods);
w::list(s, prefix, "ctecolcollations", &self.ctecolcollations);
}
}
impl Out for CompositeTypeStmt {
fn out(&self, s: &mut String) {
s.push_str("COMPOSITETYPESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "typevar", self.typevar.as_deref());
w::list(s, prefix, "coldeflist", &self.coldeflist);
}
}
impl Out for Constraint {
fn out(&self, s: &mut String) {
s.push_str("CONSTRAINT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "contype", self.contype.0);
w::text(s, prefix, "conname", self.conname.as_deref());
w::bool(s, prefix, "deferrable", self.deferrable);
w::bool(s, prefix, "initdeferred", self.initdeferred);
w::bool(s, prefix, "is_enforced", self.is_enforced);
w::bool(s, prefix, "skip_validation", self.skip_validation);
w::bool(s, prefix, "initially_valid", self.initially_valid);
w::bool(s, prefix, "is_no_inherit", self.is_no_inherit);
w::node(s, prefix, "raw_expr", self.raw_expr.as_ref());
w::text(s, prefix, "cooked_expr", self.cooked_expr.as_deref());
w::char(s, prefix, "generated_when", self.generated_when);
w::char(s, prefix, "generated_kind", self.generated_kind);
w::bool(s, prefix, "nulls_not_distinct", self.nulls_not_distinct);
w::list(s, prefix, "keys", &self.keys);
w::bool(s, prefix, "without_overlaps", self.without_overlaps);
w::list(s, prefix, "including", &self.including);
w::list(s, prefix, "exclusions", &self.exclusions);
w::list(s, prefix, "options", &self.options);
w::text(s, prefix, "indexname", self.indexname.as_deref());
w::text(s, prefix, "indexspace", self.indexspace.as_deref());
w::bool(s, prefix, "reset_default_tblspc", self.reset_default_tblspc);
w::text(s, prefix, "access_method", self.access_method.as_deref());
w::node(s, prefix, "where_clause", self.where_clause.as_ref());
w::boxed(s, prefix, "pktable", self.pktable.as_deref());
w::list(s, prefix, "fk_attrs", &self.fk_attrs);
w::list(s, prefix, "pk_attrs", &self.pk_attrs);
w::bool(s, prefix, "fk_with_period", self.fk_with_period);
w::bool(s, prefix, "pk_with_period", self.pk_with_period);
w::char(s, prefix, "fk_matchtype", self.fk_matchtype);
w::char(s, prefix, "fk_upd_action", self.fk_upd_action);
w::char(s, prefix, "fk_del_action", self.fk_del_action);
w::list(s, prefix, "fk_del_set_cols", &self.fk_del_set_cols);
w::list(s, prefix, "old_conpfeqop", &self.old_conpfeqop);
w::int(s, prefix, "old_pktable_oid", self.old_pktable_oid);
w::int(s, prefix, "location", self.location);
}
}
impl Out for ConstraintsSetStmt {
fn out(&self, s: &mut String) {
s.push_str("CONSTRAINTSSETSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "constraints", &self.constraints);
w::bool(s, prefix, "deferred", self.deferred);
}
}
impl Out for CopyStmt {
fn out(&self, s: &mut String) {
s.push_str("COPYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::node(s, prefix, "query", self.query.as_ref());
w::list(s, prefix, "attlist", &self.attlist);
w::bool(s, prefix, "is_from", self.is_from);
w::bool(s, prefix, "is_program", self.is_program);
w::text(s, prefix, "filename", self.filename.as_deref());
w::list(s, prefix, "options", &self.options);
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
}
}
impl Out for CreateAmStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEAMSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "amname", self.amname.as_deref());
w::list(s, prefix, "handler_name", &self.handler_name);
w::char(s, prefix, "amtype", self.amtype);
}
}
impl Out for CreateCastStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATECASTSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "sourcetype", self.sourcetype.as_deref());
w::boxed(s, prefix, "targettype", self.targettype.as_deref());
w::boxed(s, prefix, "func", self.func.as_deref());
w::int(s, prefix, "context", self.context.0);
w::bool(s, prefix, "inout", self.inout);
}
}
impl Out for CreateConversionStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATECONVERSIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "conversion_name", &self.conversion_name);
w::text(s, prefix, "for_encoding_name", self.for_encoding_name.as_deref());
w::text(s, prefix, "to_encoding_name", self.to_encoding_name.as_deref());
w::list(s, prefix, "func_name", &self.func_name);
w::bool(s, prefix, "def", self.def);
}
}
impl Out for CreateDomainStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEDOMAINSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "domainname", &self.domainname);
w::boxed(s, prefix, "typeName", self.typeName.as_deref());
w::boxed(s, prefix, "collClause", self.collClause.as_deref());
w::list(s, prefix, "constraints", &self.constraints);
}
}
impl Out for CreateEnumStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEENUMSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "typeName", &self.typeName);
w::list(s, prefix, "vals", &self.vals);
}
}
impl Out for CreateEventTrigStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEEVENTTRIGSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "trigname", self.trigname.as_deref());
w::text(s, prefix, "eventname", self.eventname.as_deref());
w::list(s, prefix, "whenclause", &self.whenclause);
w::list(s, prefix, "funcname", &self.funcname);
}
}
impl Out for CreateExtensionStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEEXTENSIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "extname", self.extname.as_deref());
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreateFdwStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEFDWSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "fdwname", self.fdwname.as_deref());
w::list(s, prefix, "func_options", &self.func_options);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreateForeignServerStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEFOREIGNSERVERSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "servername", self.servername.as_deref());
w::text(s, prefix, "servertype", self.servertype.as_deref());
w::text(s, prefix, "version", self.version.as_deref());
w::text(s, prefix, "fdwname", self.fdwname.as_deref());
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreateForeignTableStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEFOREIGNTABLESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
self.base.fields(s, &format!("{prefix}base."));
w::text(s, prefix, "servername", self.servername.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreateFunctionStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEFUNCTIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "is_procedure", self.is_procedure);
w::bool(s, prefix, "replace", self.replace);
w::list(s, prefix, "funcname", &self.funcname);
w::list(s, prefix, "parameters", &self.parameters);
w::boxed(s, prefix, "returnType", self.returnType.as_deref());
w::list(s, prefix, "options", &self.options);
w::node(s, prefix, "sql_body", self.sql_body.as_ref());
}
}
impl Out for CreateOpClassItem {
fn out(&self, s: &mut String) {
s.push_str("CREATEOPCLASSITEM");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "itemtype", self.itemtype);
w::boxed(s, prefix, "name", self.name.as_deref());
w::int(s, prefix, "number", self.number);
w::list(s, prefix, "order_family", &self.order_family);
w::list(s, prefix, "class_args", &self.class_args);
w::boxed(s, prefix, "storedtype", self.storedtype.as_deref());
}
}
impl Out for CreateOpClassStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEOPCLASSSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "opclassname", &self.opclassname);
w::list(s, prefix, "opfamilyname", &self.opfamilyname);
w::text(s, prefix, "amname", self.amname.as_deref());
w::boxed(s, prefix, "datatype", self.datatype.as_deref());
w::list(s, prefix, "items", &self.items);
w::bool(s, prefix, "isDefault", self.isDefault);
}
}
impl Out for CreateOpFamilyStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEOPFAMILYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "opfamilyname", &self.opfamilyname);
w::text(s, prefix, "amname", self.amname.as_deref());
}
}
impl Out for CreatePLangStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEPLANGSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "replace", self.replace);
w::text(s, prefix, "plname", self.plname.as_deref());
w::list(s, prefix, "plhandler", &self.plhandler);
w::list(s, prefix, "plinline", &self.plinline);
w::list(s, prefix, "plvalidator", &self.plvalidator);
w::bool(s, prefix, "pltrusted", self.pltrusted);
}
}
impl Out for CreatePolicyStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEPOLICYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "policy_name", self.policy_name.as_deref());
w::boxed(s, prefix, "table", self.table.as_deref());
w::text(s, prefix, "cmd_name", self.cmd_name.as_deref());
w::bool(s, prefix, "permissive", self.permissive);
w::list(s, prefix, "roles", &self.roles);
w::node(s, prefix, "qual", self.qual.as_ref());
w::node(s, prefix, "with_check", self.with_check.as_ref());
}
}
impl Out for CreatePublicationStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEPUBLICATIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "pubname", self.pubname.as_deref());
w::list(s, prefix, "options", &self.options);
w::list(s, prefix, "pubobjects", &self.pubobjects);
w::bool(s, prefix, "for_all_tables", self.for_all_tables);
w::bool(s, prefix, "for_all_sequences", self.for_all_sequences);
}
}
impl Out for CreateRangeStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATERANGESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "typeName", &self.typeName);
w::list(s, prefix, "params", &self.params);
}
}
impl Out for CreateRoleStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEROLESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "stmt_type", self.stmt_type.0);
w::text(s, prefix, "role", self.role.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreateSchemaStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATESCHEMASTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "schemaname", self.schemaname.as_deref());
w::boxed(s, prefix, "authrole", self.authrole.as_deref());
w::list(s, prefix, "schemaElts", &self.schemaElts);
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
}
}
impl Out for CreateSeqStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATESEQSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "sequence", self.sequence.as_deref());
w::list(s, prefix, "options", &self.options);
w::int(s, prefix, "ownerId", self.ownerId);
w::bool(s, prefix, "for_identity", self.for_identity);
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
}
}
impl Out for CreateStatsStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATESTATSSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "defnames", &self.defnames);
w::list(s, prefix, "stat_types", &self.stat_types);
w::list(s, prefix, "exprs", &self.exprs);
w::list(s, prefix, "relations", &self.relations);
w::text(s, prefix, "stxcomment", self.stxcomment.as_deref());
w::bool(s, prefix, "transformed", self.transformed);
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
w::int(s, prefix, "owner", self.owner);
}
}
impl Out for CreateStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::list(s, prefix, "tableElts", &self.tableElts);
w::list(s, prefix, "inhRelations", &self.inhRelations);
w::boxed(s, prefix, "partbound", self.partbound.as_deref());
w::boxed(s, prefix, "partspec", self.partspec.as_deref());
w::boxed(s, prefix, "ofTypename", self.ofTypename.as_deref());
w::list(s, prefix, "constraints", &self.constraints);
w::list(s, prefix, "nnconstraints", &self.nnconstraints);
w::list(s, prefix, "options", &self.options);
w::int(s, prefix, "oncommit", self.oncommit.0);
w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
w::text(s, prefix, "accessMethod", self.accessMethod.as_deref());
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
}
}
impl Out for CreateSubscriptionStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATESUBSCRIPTIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "subname", self.subname.as_deref());
w::text(s, prefix, "servername", self.servername.as_deref());
w::text(s, prefix, "conninfo", self.conninfo.as_deref());
w::list(s, prefix, "publication", &self.publication);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreateTableAsStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATETABLEASSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "query", self.query.as_ref());
w::boxed(s, prefix, "into", self.into.as_deref());
w::int(s, prefix, "objtype", self.objtype.0);
w::bool(s, prefix, "is_select_into", self.is_select_into);
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
}
}
impl Out for CreateTableSpaceStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATETABLESPACESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
w::boxed(s, prefix, "owner", self.owner.as_deref());
w::text(s, prefix, "location", self.location.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreateTransformStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATETRANSFORMSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "replace", self.replace);
w::boxed(s, prefix, "type_name", self.type_name.as_deref());
w::text(s, prefix, "lang", self.lang.as_deref());
w::boxed(s, prefix, "fromsql", self.fromsql.as_deref());
w::boxed(s, prefix, "tosql", self.tosql.as_deref());
}
}
impl Out for CreateTrigStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATETRIGSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "replace", self.replace);
w::bool(s, prefix, "isconstraint", self.isconstraint);
w::text(s, prefix, "trigname", self.trigname.as_deref());
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::list(s, prefix, "funcname", &self.funcname);
w::list(s, prefix, "args", &self.args);
w::bool(s, prefix, "row", self.row);
w::int(s, prefix, "timing", self.timing);
w::int(s, prefix, "events", self.events);
w::list(s, prefix, "columns", &self.columns);
w::node(s, prefix, "whenClause", self.whenClause.as_ref());
w::list(s, prefix, "transitionRels", &self.transitionRels);
w::bool(s, prefix, "deferrable", self.deferrable);
w::bool(s, prefix, "initdeferred", self.initdeferred);
w::boxed(s, prefix, "constrrel", self.constrrel.as_deref());
}
}
impl Out for CreateUserMappingStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEUSERMAPPINGSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "user", self.user.as_deref());
w::text(s, prefix, "servername", self.servername.as_deref());
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CreatedbStmt {
fn out(&self, s: &mut String) {
s.push_str("CREATEDBSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "dbname", self.dbname.as_deref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for CurrentOfExpr {
fn out(&self, s: &mut String) {
s.push_str("CURRENTOFEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "cvarno", self.cvarno);
w::text(s, prefix, "cursor_name", self.cursor_name.as_deref());
w::int(s, prefix, "cursor_param", self.cursor_param);
}
}
impl Out for DeallocateStmt {
fn out(&self, s: &mut String) {
s.push_str("DEALLOCATESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::bool(s, prefix, "isall", self.isall);
w::int(s, prefix, "location", self.location);
}
}
impl Out for DeclareCursorStmt {
fn out(&self, s: &mut String) {
s.push_str("DECLARECURSORSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "portalname", self.portalname.as_deref());
w::int(s, prefix, "options", self.options);
w::node(s, prefix, "query", self.query.as_ref());
}
}
impl Out for DefElem {
fn out(&self, s: &mut String) {
s.push_str("DEFELEM");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "defnamespace", self.defnamespace.as_deref());
w::text(s, prefix, "defname", self.defname.as_deref());
w::node(s, prefix, "arg", self.arg.as_ref());
w::int(s, prefix, "defaction", self.defaction.0);
w::int(s, prefix, "location", self.location);
}
}
impl Out for DefineStmt {
fn out(&self, s: &mut String) {
s.push_str("DEFINESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "kind", self.kind.0);
w::bool(s, prefix, "oldstyle", self.oldstyle);
w::list(s, prefix, "defnames", &self.defnames);
w::list(s, prefix, "args", &self.args);
w::list(s, prefix, "definition", &self.definition);
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
w::bool(s, prefix, "replace", self.replace);
}
}
impl Out for DeleteStmt {
fn out(&self, s: &mut String) {
s.push_str("DELETESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::list(s, prefix, "usingClause", &self.usingClause);
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
w::boxed(s, prefix, "withClause", self.withClause.as_deref());
}
}
impl Out for DiscardStmt {
fn out(&self, s: &mut String) {
s.push_str("DISCARDSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "target", self.target.0);
}
}
impl Out for DoStmt {
fn out(&self, s: &mut String) {
s.push_str("DOSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "args", &self.args);
}
}
impl Out for DropOwnedStmt {
fn out(&self, s: &mut String) {
s.push_str("DROPOWNEDSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "roles", &self.roles);
w::int(s, prefix, "behavior", self.behavior.0);
}
}
impl Out for DropRoleStmt {
fn out(&self, s: &mut String) {
s.push_str("DROPROLESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "roles", &self.roles);
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for DropStmt {
fn out(&self, s: &mut String) {
s.push_str("DROPSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "objects", &self.objects);
w::int(s, prefix, "removeType", self.removeType.0);
w::int(s, prefix, "behavior", self.behavior.0);
w::bool(s, prefix, "missing_ok", self.missing_ok);
w::bool(s, prefix, "concurrent", self.concurrent);
}
}
impl Out for DropSubscriptionStmt {
fn out(&self, s: &mut String) {
s.push_str("DROPSUBSCRIPTIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "subname", self.subname.as_deref());
w::bool(s, prefix, "missing_ok", self.missing_ok);
w::int(s, prefix, "behavior", self.behavior.0);
}
}
impl Out for DropTableSpaceStmt {
fn out(&self, s: &mut String) {
s.push_str("DROPTABLESPACESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "tablespacename", self.tablespacename.as_deref());
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for DropUserMappingStmt {
fn out(&self, s: &mut String) {
s.push_str("DROPUSERMAPPINGSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "user", self.user.as_deref());
w::text(s, prefix, "servername", self.servername.as_deref());
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for DropdbStmt {
fn out(&self, s: &mut String) {
s.push_str("DROPDBSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "dbname", self.dbname.as_deref());
w::bool(s, prefix, "missing_ok", self.missing_ok);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for ExecuteStmt {
fn out(&self, s: &mut String) {
s.push_str("EXECUTESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::list(s, prefix, "params", &self.params);
}
}
impl Out for ExplainStmt {
fn out(&self, s: &mut String) {
s.push_str("EXPLAINSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "query", self.query.as_ref());
w::list(s, prefix, "options", &self.options);
}
}
impl Out for FetchStmt {
fn out(&self, s: &mut String) {
s.push_str("FETCHSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "direction", self.direction.0);
w::int(s, prefix, "howMany", self.howMany);
w::text(s, prefix, "portalname", self.portalname.as_deref());
w::bool(s, prefix, "ismove", self.ismove);
w::int(s, prefix, "direction_keyword", self.direction_keyword.0);
w::int(s, prefix, "location", self.location);
}
}
impl Out for FuncCall {
fn out(&self, s: &mut String) {
s.push_str("FUNCCALL");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "funcname", &self.funcname);
w::list(s, prefix, "args", &self.args);
w::list(s, prefix, "agg_order", &self.agg_order);
w::node(s, prefix, "agg_filter", self.agg_filter.as_ref());
w::boxed(s, prefix, "over", self.over.as_deref());
w::int(s, prefix, "ignore_nulls", self.ignore_nulls);
w::bool(s, prefix, "agg_within_group", self.agg_within_group);
w::bool(s, prefix, "agg_star", self.agg_star);
w::bool(s, prefix, "agg_distinct", self.agg_distinct);
w::bool(s, prefix, "func_variadic", self.func_variadic);
w::int(s, prefix, "funcformat", self.funcformat.0);
w::int(s, prefix, "location", self.location);
}
}
impl Out for FunctionParameter {
fn out(&self, s: &mut String) {
s.push_str("FUNCTIONPARAMETER");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::boxed(s, prefix, "argType", self.argType.as_deref());
w::int(s, prefix, "mode", self.mode.0);
w::node(s, prefix, "defexpr", self.defexpr.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for GrantRoleStmt {
fn out(&self, s: &mut String) {
s.push_str("GRANTROLESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "granted_roles", &self.granted_roles);
w::list(s, prefix, "grantee_roles", &self.grantee_roles);
w::bool(s, prefix, "is_grant", self.is_grant);
w::list(s, prefix, "opt", &self.opt);
w::boxed(s, prefix, "grantor", self.grantor.as_deref());
w::int(s, prefix, "behavior", self.behavior.0);
}
}
impl Out for GrantStmt {
fn out(&self, s: &mut String) {
s.push_str("GRANTSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "is_grant", self.is_grant);
w::int(s, prefix, "targtype", self.targtype.0);
w::int(s, prefix, "objtype", self.objtype.0);
w::list(s, prefix, "objects", &self.objects);
w::list(s, prefix, "privileges", &self.privileges);
w::list(s, prefix, "grantees", &self.grantees);
w::bool(s, prefix, "grant_option", self.grant_option);
w::boxed(s, prefix, "grantor", self.grantor.as_deref());
w::int(s, prefix, "behavior", self.behavior.0);
}
}
impl Out for GroupingFunc {
fn out(&self, s: &mut String) {
s.push_str("GROUPINGFUNC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "args", &self.args);
w::list(s, prefix, "refs", &self.refs);
w::list(s, prefix, "cols", &self.cols);
w::int(s, prefix, "agglevelsup", self.agglevelsup);
w::int(s, prefix, "location", self.location);
}
}
impl Out for GroupingSet {
fn out(&self, s: &mut String) {
s.push_str("GROUPINGSET");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "kind", self.kind.0);
w::list(s, prefix, "content", &self.content);
w::int(s, prefix, "location", self.location);
}
}
impl Out for ImportForeignSchemaStmt {
fn out(&self, s: &mut String) {
s.push_str("IMPORTFOREIGNSCHEMASTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "server_name", self.server_name.as_deref());
w::text(s, prefix, "remote_schema", self.remote_schema.as_deref());
w::text(s, prefix, "local_schema", self.local_schema.as_deref());
w::int(s, prefix, "list_type", self.list_type.0);
w::list(s, prefix, "table_list", &self.table_list);
w::list(s, prefix, "options", &self.options);
}
}
impl Out for IndexElem {
fn out(&self, s: &mut String) {
s.push_str("INDEXELEM");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::node(s, prefix, "expr", self.expr.as_ref());
w::text(s, prefix, "indexcolname", self.indexcolname.as_deref());
w::list(s, prefix, "collation", &self.collation);
w::list(s, prefix, "opclass", &self.opclass);
w::list(s, prefix, "opclassopts", &self.opclassopts);
w::int(s, prefix, "ordering", self.ordering.0);
w::int(s, prefix, "nulls_ordering", self.nulls_ordering.0);
w::int(s, prefix, "location", self.location);
}
}
impl Out for IndexStmt {
fn out(&self, s: &mut String) {
s.push_str("INDEXSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "idxname", self.idxname.as_deref());
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::text(s, prefix, "accessMethod", self.accessMethod.as_deref());
w::text(s, prefix, "tableSpace", self.tableSpace.as_deref());
w::list(s, prefix, "indexParams", &self.indexParams);
w::list(s, prefix, "indexIncludingParams", &self.indexIncludingParams);
w::list(s, prefix, "options", &self.options);
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::list(s, prefix, "excludeOpNames", &self.excludeOpNames);
w::text(s, prefix, "idxcomment", self.idxcomment.as_deref());
w::int(s, prefix, "indexOid", self.indexOid);
w::int(s, prefix, "oldNumber", self.oldNumber);
w::int(s, prefix, "oldCreateSubid", self.oldCreateSubid);
w::int(s, prefix, "oldFirstRelfilelocatorSubid", self.oldFirstRelfilelocatorSubid);
w::bool(s, prefix, "unique", self.unique);
w::bool(s, prefix, "nulls_not_distinct", self.nulls_not_distinct);
w::bool(s, prefix, "primary", self.primary);
w::bool(s, prefix, "isconstraint", self.isconstraint);
w::bool(s, prefix, "iswithoutoverlaps", self.iswithoutoverlaps);
w::bool(s, prefix, "deferrable", self.deferrable);
w::bool(s, prefix, "initdeferred", self.initdeferred);
w::bool(s, prefix, "transformed", self.transformed);
w::bool(s, prefix, "concurrent", self.concurrent);
w::bool(s, prefix, "if_not_exists", self.if_not_exists);
w::bool(s, prefix, "reset_default_tblspc", self.reset_default_tblspc);
}
}
impl Out for InferClause {
fn out(&self, s: &mut String) {
s.push_str("INFERCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "indexElems", &self.indexElems);
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::text(s, prefix, "conname", self.conname.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for InsertStmt {
fn out(&self, s: &mut String) {
s.push_str("INSERTSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::list(s, prefix, "cols", &self.cols);
w::node(s, prefix, "selectStmt", self.selectStmt.as_ref());
w::boxed(s, prefix, "onConflictClause", self.onConflictClause.as_deref());
w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
w::boxed(s, prefix, "withClause", self.withClause.as_deref());
w::int(s, prefix, "override", self.r#override.0);
}
}
impl Out for IntoClause {
fn out(&self, s: &mut String) {
s.push_str("INTOCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "rel", self.rel.as_deref());
w::list(s, prefix, "colNames", &self.colNames);
w::text(s, prefix, "accessMethod", self.accessMethod.as_deref());
w::list(s, prefix, "options", &self.options);
w::int(s, prefix, "onCommit", self.onCommit.0);
w::text(s, prefix, "tableSpaceName", self.tableSpaceName.as_deref());
w::node(s, prefix, "viewQuery", self.viewQuery.as_ref());
w::bool(s, prefix, "skipData", self.skipData);
}
}
impl Out for JoinExpr {
fn out(&self, s: &mut String) {
s.push_str("JOINEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "jointype", self.jointype.0);
w::bool(s, prefix, "isNatural", self.isNatural);
w::node(s, prefix, "larg", self.larg.as_ref());
w::node(s, prefix, "rarg", self.rarg.as_ref());
w::list(s, prefix, "usingClause", &self.usingClause);
w::boxed(s, prefix, "join_using_alias", self.join_using_alias.as_deref());
w::node(s, prefix, "quals", self.quals.as_ref());
w::boxed(s, prefix, "alias", self.alias.as_deref());
w::int(s, prefix, "rtindex", self.rtindex);
}
}
impl Out for JsonAggConstructor {
fn out(&self, s: &mut String) {
s.push_str("JSONAGGCONSTRUCTOR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "output", self.output.as_deref());
w::node(s, prefix, "agg_filter", self.agg_filter.as_ref());
w::list(s, prefix, "agg_order", &self.agg_order);
w::boxed(s, prefix, "over", self.over.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonArgument {
fn out(&self, s: &mut String) {
s.push_str("JSONARGUMENT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "val", self.val.as_deref());
w::text(s, prefix, "name", self.name.as_deref());
}
}
impl Out for JsonArrayAgg {
fn out(&self, s: &mut String) {
s.push_str("JSONARRAYAGG");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "constructor", self.constructor.as_deref());
w::boxed(s, prefix, "arg", self.arg.as_deref());
w::bool(s, prefix, "absent_on_null", self.absent_on_null);
}
}
impl Out for JsonArrayConstructor {
fn out(&self, s: &mut String) {
s.push_str("JSONARRAYCONSTRUCTOR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "exprs", &self.exprs);
w::boxed(s, prefix, "output", self.output.as_deref());
w::bool(s, prefix, "absent_on_null", self.absent_on_null);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonArrayQueryConstructor {
fn out(&self, s: &mut String) {
s.push_str("JSONARRAYQUERYCONSTRUCTOR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "query", self.query.as_ref());
w::boxed(s, prefix, "output", self.output.as_deref());
w::boxed(s, prefix, "format", self.format.as_deref());
w::bool(s, prefix, "absent_on_null", self.absent_on_null);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonBehavior {
fn out(&self, s: &mut String) {
s.push_str("JSONBEHAVIOR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "btype", self.btype.0);
w::node(s, prefix, "expr", self.expr.as_ref());
w::bool(s, prefix, "coerce", self.coerce);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonFormat {
fn out(&self, s: &mut String) {
s.push_str("JSONFORMAT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "format_type", self.format_type.0);
w::int(s, prefix, "encoding", self.encoding.0);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonFuncExpr {
fn out(&self, s: &mut String) {
s.push_str("JSONFUNCEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "op", self.op.0);
w::text(s, prefix, "column_name", self.column_name.as_deref());
w::boxed(s, prefix, "context_item", self.context_item.as_deref());
w::node(s, prefix, "pathspec", self.pathspec.as_ref());
w::list(s, prefix, "passing", &self.passing);
w::boxed(s, prefix, "output", self.output.as_deref());
w::boxed(s, prefix, "on_empty", self.on_empty.as_deref());
w::boxed(s, prefix, "on_error", self.on_error.as_deref());
w::int(s, prefix, "wrapper", self.wrapper.0);
w::int(s, prefix, "quotes", self.quotes.0);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonIsPredicate {
fn out(&self, s: &mut String) {
s.push_str("JSONISPREDICATE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "expr", self.expr.as_ref());
w::boxed(s, prefix, "format", self.format.as_deref());
w::int(s, prefix, "item_type", self.item_type.0);
w::bool(s, prefix, "unique_keys", self.unique_keys);
w::int(s, prefix, "exprBaseType", self.exprBaseType);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonKeyValue {
fn out(&self, s: &mut String) {
s.push_str("JSONKEYVALUE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "key", self.key.as_ref());
w::boxed(s, prefix, "value", self.value.as_deref());
}
}
impl Out for JsonObjectAgg {
fn out(&self, s: &mut String) {
s.push_str("JSONOBJECTAGG");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "constructor", self.constructor.as_deref());
w::boxed(s, prefix, "arg", self.arg.as_deref());
w::bool(s, prefix, "absent_on_null", self.absent_on_null);
w::bool(s, prefix, "unique", self.unique);
}
}
impl Out for JsonObjectConstructor {
fn out(&self, s: &mut String) {
s.push_str("JSONOBJECTCONSTRUCTOR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "exprs", &self.exprs);
w::boxed(s, prefix, "output", self.output.as_deref());
w::bool(s, prefix, "absent_on_null", self.absent_on_null);
w::bool(s, prefix, "unique", self.unique);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonOutput {
fn out(&self, s: &mut String) {
s.push_str("JSONOUTPUT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "typeName", self.typeName.as_deref());
w::boxed(s, prefix, "returning", self.returning.as_deref());
}
}
impl Out for JsonParseExpr {
fn out(&self, s: &mut String) {
s.push_str("JSONPARSEEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "expr", self.expr.as_deref());
w::boxed(s, prefix, "output", self.output.as_deref());
w::bool(s, prefix, "unique_keys", self.unique_keys);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonReturning {
fn out(&self, s: &mut String) {
s.push_str("JSONRETURNING");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "format", self.format.as_deref());
w::int(s, prefix, "typid", self.typid);
w::int(s, prefix, "typmod", self.typmod);
}
}
impl Out for JsonScalarExpr {
fn out(&self, s: &mut String) {
s.push_str("JSONSCALAREXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "expr", self.expr.as_ref());
w::boxed(s, prefix, "output", self.output.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonSerializeExpr {
fn out(&self, s: &mut String) {
s.push_str("JSONSERIALIZEEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "expr", self.expr.as_deref());
w::boxed(s, prefix, "output", self.output.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonTable {
fn out(&self, s: &mut String) {
s.push_str("JSONTABLE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "context_item", self.context_item.as_deref());
w::boxed(s, prefix, "pathspec", self.pathspec.as_deref());
w::list(s, prefix, "passing", &self.passing);
w::list(s, prefix, "columns", &self.columns);
w::boxed(s, prefix, "on_error", self.on_error.as_deref());
w::boxed(s, prefix, "alias", self.alias.as_deref());
w::bool(s, prefix, "lateral", self.lateral);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonTableColumn {
fn out(&self, s: &mut String) {
s.push_str("JSONTABLECOLUMN");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "coltype", self.coltype.0);
w::text(s, prefix, "name", self.name.as_deref());
w::boxed(s, prefix, "typeName", self.typeName.as_deref());
w::boxed(s, prefix, "pathspec", self.pathspec.as_deref());
w::boxed(s, prefix, "format", self.format.as_deref());
w::int(s, prefix, "wrapper", self.wrapper.0);
w::int(s, prefix, "quotes", self.quotes.0);
w::list(s, prefix, "columns", &self.columns);
w::boxed(s, prefix, "on_empty", self.on_empty.as_deref());
w::boxed(s, prefix, "on_error", self.on_error.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonTablePathSpec {
fn out(&self, s: &mut String) {
s.push_str("JSONTABLEPATHSPEC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "string", self.string.as_ref());
w::text(s, prefix, "name", self.name.as_deref());
w::int(s, prefix, "name_location", self.name_location);
w::int(s, prefix, "location", self.location);
}
}
impl Out for JsonValueExpr {
fn out(&self, s: &mut String) {
s.push_str("JSONVALUEEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "raw_expr", self.raw_expr.as_ref());
w::node(s, prefix, "formatted_expr", self.formatted_expr.as_ref());
w::boxed(s, prefix, "format", self.format.as_deref());
}
}
impl Out for ListenStmt {
fn out(&self, s: &mut String) {
s.push_str("LISTENSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "conditionname", self.conditionname.as_deref());
}
}
impl Out for LoadStmt {
fn out(&self, s: &mut String) {
s.push_str("LOADSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "filename", self.filename.as_deref());
}
}
impl Out for LockStmt {
fn out(&self, s: &mut String) {
s.push_str("LOCKSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "relations", &self.relations);
w::int(s, prefix, "mode", self.mode);
w::bool(s, prefix, "nowait", self.nowait);
}
}
impl Out for LockingClause {
fn out(&self, s: &mut String) {
s.push_str("LOCKINGCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "lockedRels", &self.lockedRels);
w::int(s, prefix, "strength", self.strength.0);
w::int(s, prefix, "waitPolicy", self.waitPolicy.0);
}
}
impl Out for MergeStmt {
fn out(&self, s: &mut String) {
s.push_str("MERGESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::node(s, prefix, "sourceRelation", self.sourceRelation.as_ref());
w::node(s, prefix, "joinCondition", self.joinCondition.as_ref());
w::list(s, prefix, "mergeWhenClauses", &self.mergeWhenClauses);
w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
w::boxed(s, prefix, "withClause", self.withClause.as_deref());
}
}
impl Out for MergeSupportFunc {
fn out(&self, s: &mut String) {
s.push_str("MERGESUPPORTFUNC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "msftype", self.msftype);
w::int(s, prefix, "msfcollid", self.msfcollid);
w::int(s, prefix, "location", self.location);
}
}
impl Out for MergeWhenClause {
fn out(&self, s: &mut String) {
s.push_str("MERGEWHENCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "matchKind", self.matchKind.0);
w::int(s, prefix, "commandType", self.commandType.0);
w::int(s, prefix, "override", self.r#override.0);
w::node(s, prefix, "condition", self.condition.as_ref());
w::list(s, prefix, "targetList", &self.targetList);
w::list(s, prefix, "values", &self.values);
}
}
impl Out for MinMaxExpr {
fn out(&self, s: &mut String) {
s.push_str("MINMAXEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "minmaxtype", self.minmaxtype);
w::int(s, prefix, "minmaxcollid", self.minmaxcollid);
w::int(s, prefix, "inputcollid", self.inputcollid);
w::int(s, prefix, "op", self.op.0);
w::list(s, prefix, "args", &self.args);
w::int(s, prefix, "location", self.location);
}
}
impl Out for MultiAssignRef {
fn out(&self, s: &mut String) {
s.push_str("MULTIASSIGNREF");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "source", self.source.as_ref());
w::int(s, prefix, "colno", self.colno);
w::int(s, prefix, "ncolumns", self.ncolumns);
}
}
impl Out for NamedArgExpr {
fn out(&self, s: &mut String) {
s.push_str("NAMEDARGEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "arg", self.arg.as_ref());
w::text(s, prefix, "name", self.name.as_deref());
w::int(s, prefix, "argnumber", self.argnumber);
w::int(s, prefix, "location", self.location);
}
}
impl Out for NotifyStmt {
fn out(&self, s: &mut String) {
s.push_str("NOTIFYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "conditionname", self.conditionname.as_deref());
w::text(s, prefix, "payload", self.payload.as_deref());
}
}
impl Out for NullTest {
fn out(&self, s: &mut String) {
s.push_str("NULLTEST");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "arg", self.arg.as_ref());
w::int(s, prefix, "nulltesttype", self.nulltesttype.0);
w::bool(s, prefix, "argisrow", self.argisrow);
w::int(s, prefix, "location", self.location);
}
}
impl Out for ObjectWithArgs {
fn out(&self, s: &mut String) {
s.push_str("OBJECTWITHARGS");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "objname", &self.objname);
w::list(s, prefix, "objargs", &self.objargs);
w::list(s, prefix, "objfuncargs", &self.objfuncargs);
w::bool(s, prefix, "args_unspecified", self.args_unspecified);
}
}
impl Out for OnConflictClause {
fn out(&self, s: &mut String) {
s.push_str("ONCONFLICTCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "action", self.action.0);
w::boxed(s, prefix, "infer", self.infer.as_deref());
w::int(s, prefix, "lockStrength", self.lockStrength.0);
w::list(s, prefix, "targetList", &self.targetList);
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for PLAssignStmt {
fn out(&self, s: &mut String) {
s.push_str("PLASSIGNSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::list(s, prefix, "indirection", &self.indirection);
w::int(s, prefix, "nnames", self.nnames);
w::boxed(s, prefix, "val", self.val.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for ParamRef {
fn out(&self, s: &mut String) {
s.push_str("PARAMREF");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "number", self.number);
w::int(s, prefix, "location", self.location);
}
}
impl Out for PartitionBoundSpec {
fn out(&self, s: &mut String) {
s.push_str("PARTITIONBOUNDSPEC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::char(s, prefix, "strategy", self.strategy);
w::bool(s, prefix, "is_default", self.is_default);
w::int(s, prefix, "modulus", self.modulus);
w::int(s, prefix, "remainder", self.remainder);
w::list(s, prefix, "listdatums", &self.listdatums);
w::list(s, prefix, "lowerdatums", &self.lowerdatums);
w::list(s, prefix, "upperdatums", &self.upperdatums);
w::int(s, prefix, "location", self.location);
}
}
impl Out for PartitionCmd {
fn out(&self, s: &mut String) {
s.push_str("PARTITIONCMD");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "name", self.name.as_deref());
w::boxed(s, prefix, "bound", self.bound.as_deref());
w::bool(s, prefix, "concurrent", self.concurrent);
}
}
impl Out for PartitionElem {
fn out(&self, s: &mut String) {
s.push_str("PARTITIONELEM");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::node(s, prefix, "expr", self.expr.as_ref());
w::list(s, prefix, "collation", &self.collation);
w::list(s, prefix, "opclass", &self.opclass);
w::int(s, prefix, "location", self.location);
}
}
impl Out for PartitionSpec {
fn out(&self, s: &mut String) {
s.push_str("PARTITIONSPEC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "strategy", self.strategy.0);
w::list(s, prefix, "partParams", &self.partParams);
w::int(s, prefix, "location", self.location);
}
}
impl Out for PrepareStmt {
fn out(&self, s: &mut String) {
s.push_str("PREPARESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::list(s, prefix, "argtypes", &self.argtypes);
w::node(s, prefix, "query", self.query.as_ref());
}
}
impl Out for PublicationAllObjSpec {
fn out(&self, s: &mut String) {
s.push_str("PUBLICATIONALLOBJSPEC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "pubobjtype", self.pubobjtype.0);
w::list(s, prefix, "except_tables", &self.except_tables);
w::int(s, prefix, "location", self.location);
}
}
impl Out for PublicationObjSpec {
fn out(&self, s: &mut String) {
s.push_str("PUBLICATIONOBJSPEC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "pubobjtype", self.pubobjtype.0);
w::text(s, prefix, "name", self.name.as_deref());
w::boxed(s, prefix, "pubtable", self.pubtable.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for PublicationTable {
fn out(&self, s: &mut String) {
s.push_str("PUBLICATIONTABLE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::list(s, prefix, "columns", &self.columns);
w::bool(s, prefix, "except", self.except);
}
}
impl Out for RangeFunction {
fn out(&self, s: &mut String) {
s.push_str("RANGEFUNCTION");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "lateral", self.lateral);
w::bool(s, prefix, "ordinality", self.ordinality);
w::bool(s, prefix, "is_rowsfrom", self.is_rowsfrom);
w::list(s, prefix, "functions", &self.functions);
w::boxed(s, prefix, "alias", self.alias.as_deref());
w::list(s, prefix, "coldeflist", &self.coldeflist);
}
}
impl Out for RangeSubselect {
fn out(&self, s: &mut String) {
s.push_str("RANGESUBSELECT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "lateral", self.lateral);
w::node(s, prefix, "subquery", self.subquery.as_ref());
w::boxed(s, prefix, "alias", self.alias.as_deref());
}
}
impl Out for RangeTableFunc {
fn out(&self, s: &mut String) {
s.push_str("RANGETABLEFUNC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "lateral", self.lateral);
w::node(s, prefix, "docexpr", self.docexpr.as_ref());
w::node(s, prefix, "rowexpr", self.rowexpr.as_ref());
w::list(s, prefix, "namespaces", &self.namespaces);
w::list(s, prefix, "columns", &self.columns);
w::boxed(s, prefix, "alias", self.alias.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for RangeTableFuncCol {
fn out(&self, s: &mut String) {
s.push_str("RANGETABLEFUNCCOL");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "colname", self.colname.as_deref());
w::boxed(s, prefix, "typeName", self.typeName.as_deref());
w::bool(s, prefix, "for_ordinality", self.for_ordinality);
w::bool(s, prefix, "is_not_null", self.is_not_null);
w::node(s, prefix, "colexpr", self.colexpr.as_ref());
w::node(s, prefix, "coldefexpr", self.coldefexpr.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for RangeTableSample {
fn out(&self, s: &mut String) {
s.push_str("RANGETABLESAMPLE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "relation", self.relation.as_ref());
w::list(s, prefix, "method", &self.method);
w::list(s, prefix, "args", &self.args);
w::node(s, prefix, "repeatable", self.repeatable.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for RangeVar {
fn out(&self, s: &mut String) {
s.push_str("RANGEVAR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "catalogname", self.catalogname.as_deref());
w::text(s, prefix, "schemaname", self.schemaname.as_deref());
w::text(s, prefix, "relname", self.relname.as_deref());
w::bool(s, prefix, "inh", self.inh);
w::char(s, prefix, "relpersistence", self.relpersistence);
w::boxed(s, prefix, "alias", self.alias.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for RawStmt {
fn out(&self, s: &mut String) {
s.push_str("RAWSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "stmt", self.stmt.as_ref());
w::int(s, prefix, "stmt_location", self.stmt_location);
w::int(s, prefix, "stmt_len", self.stmt_len);
}
}
impl Out for ReassignOwnedStmt {
fn out(&self, s: &mut String) {
s.push_str("REASSIGNOWNEDSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "roles", &self.roles);
w::boxed(s, prefix, "newrole", self.newrole.as_deref());
}
}
impl Out for RefreshMatViewStmt {
fn out(&self, s: &mut String) {
s.push_str("REFRESHMATVIEWSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::bool(s, prefix, "concurrent", self.concurrent);
w::bool(s, prefix, "skipData", self.skipData);
w::boxed(s, prefix, "relation", self.relation.as_deref());
}
}
impl Out for ReindexStmt {
fn out(&self, s: &mut String) {
s.push_str("REINDEXSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "kind", self.kind.0);
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::text(s, prefix, "name", self.name.as_deref());
w::list(s, prefix, "params", &self.params);
}
}
impl Out for RenameStmt {
fn out(&self, s: &mut String) {
s.push_str("RENAMESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "renameType", self.renameType.0);
w::int(s, prefix, "relationType", self.relationType.0);
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::node(s, prefix, "object", self.object.as_ref());
w::text(s, prefix, "subname", self.subname.as_deref());
w::text(s, prefix, "newname", self.newname.as_deref());
w::int(s, prefix, "behavior", self.behavior.0);
w::bool(s, prefix, "missing_ok", self.missing_ok);
}
}
impl Out for RepackStmt {
fn out(&self, s: &mut String) {
s.push_str("REPACKSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "command", self.command.0);
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::text(s, prefix, "indexname", self.indexname.as_deref());
w::bool(s, prefix, "usingindex", self.usingindex);
w::list(s, prefix, "params", &self.params);
}
}
impl Out for ReplicaIdentityStmt {
fn out(&self, s: &mut String) {
s.push_str("REPLICAIDENTITYSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::char(s, prefix, "identity_type", self.identity_type);
w::text(s, prefix, "name", self.name.as_deref());
}
}
impl Out for ResTarget {
fn out(&self, s: &mut String) {
s.push_str("RESTARGET");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::list(s, prefix, "indirection", &self.indirection);
w::node(s, prefix, "val", self.val.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for ReturnStmt {
fn out(&self, s: &mut String) {
s.push_str("RETURNSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "returnval", self.returnval.as_ref());
}
}
impl Out for ReturningClause {
fn out(&self, s: &mut String) {
s.push_str("RETURNINGCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "options", &self.options);
w::list(s, prefix, "exprs", &self.exprs);
}
}
impl Out for ReturningOption {
fn out(&self, s: &mut String) {
s.push_str("RETURNINGOPTION");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "option", self.option.0);
w::text(s, prefix, "value", self.value.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for RoleSpec {
fn out(&self, s: &mut String) {
s.push_str("ROLESPEC");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "roletype", self.roletype.0);
w::text(s, prefix, "rolename", self.rolename.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for RowExpr {
fn out(&self, s: &mut String) {
s.push_str("ROWEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "args", &self.args);
w::int(s, prefix, "row_typeid", self.row_typeid);
w::int(s, prefix, "row_format", self.row_format.0);
w::list(s, prefix, "colnames", &self.colnames);
w::int(s, prefix, "location", self.location);
}
}
impl Out for RuleStmt {
fn out(&self, s: &mut String) {
s.push_str("RULESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::text(s, prefix, "rulename", self.rulename.as_deref());
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::int(s, prefix, "event", self.event.0);
w::bool(s, prefix, "instead", self.instead);
w::list(s, prefix, "actions", &self.actions);
w::bool(s, prefix, "replace", self.replace);
}
}
impl Out for SQLValueFunction {
fn out(&self, s: &mut String) {
s.push_str("SQLVALUEFUNCTION");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "op", self.op.0);
w::int(s, prefix, "type", self.r#type);
w::int(s, prefix, "typmod", self.typmod);
w::int(s, prefix, "location", self.location);
}
}
impl Out for SecLabelStmt {
fn out(&self, s: &mut String) {
s.push_str("SECLABELSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "objtype", self.objtype.0);
w::node(s, prefix, "object", self.object.as_ref());
w::text(s, prefix, "provider", self.provider.as_deref());
w::text(s, prefix, "label", self.label.as_deref());
}
}
impl Out for SelectStmt {
fn out(&self, s: &mut String) {
s.push_str("SELECTSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "distinctClause", &self.distinctClause);
w::boxed(s, prefix, "intoClause", self.intoClause.as_deref());
w::list(s, prefix, "targetList", &self.targetList);
w::list(s, prefix, "fromClause", &self.fromClause);
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::list(s, prefix, "groupClause", &self.groupClause);
w::bool(s, prefix, "groupDistinct", self.groupDistinct);
w::node(s, prefix, "havingClause", self.havingClause.as_ref());
w::list(s, prefix, "windowClause", &self.windowClause);
w::list(s, prefix, "valuesLists", &self.valuesLists);
w::list(s, prefix, "sortClause", &self.sortClause);
w::node(s, prefix, "limitOffset", self.limitOffset.as_ref());
w::node(s, prefix, "limitCount", self.limitCount.as_ref());
w::int(s, prefix, "limitOption", self.limitOption.0);
w::list(s, prefix, "lockingClause", &self.lockingClause);
w::boxed(s, prefix, "withClause", self.withClause.as_deref());
w::int(s, prefix, "op", self.op.0);
w::bool(s, prefix, "all", self.all);
w::boxed(s, prefix, "larg", self.larg.as_deref());
w::boxed(s, prefix, "rarg", self.rarg.as_deref());
}
}
impl Out for SetToDefault {
fn out(&self, s: &mut String) {
s.push_str("SETTODEFAULT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "typeId", self.typeId);
w::int(s, prefix, "typeMod", self.typeMod);
w::int(s, prefix, "collation", self.collation);
w::int(s, prefix, "location", self.location);
}
}
impl Out for SortBy {
fn out(&self, s: &mut String) {
s.push_str("SORTBY");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "node", self.node.as_ref());
w::int(s, prefix, "sortby_dir", self.sortby_dir.0);
w::int(s, prefix, "sortby_nulls", self.sortby_nulls.0);
w::list(s, prefix, "useOp", &self.useOp);
w::int(s, prefix, "location", self.location);
}
}
impl Out for StatsElem {
fn out(&self, s: &mut String) {
s.push_str("STATSELEM");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::node(s, prefix, "expr", self.expr.as_ref());
}
}
impl Out for SubLink {
fn out(&self, s: &mut String) {
s.push_str("SUBLINK");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "subLinkType", self.subLinkType.0);
w::int(s, prefix, "subLinkId", self.subLinkId);
w::node(s, prefix, "testexpr", self.testexpr.as_ref());
w::list(s, prefix, "operName", &self.operName);
w::node(s, prefix, "subselect", self.subselect.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for TableLikeClause {
fn out(&self, s: &mut String) {
s.push_str("TABLELIKECLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::int(s, prefix, "options", self.options);
w::int(s, prefix, "relationOid", self.relationOid);
}
}
impl Out for TransactionStmt {
fn out(&self, s: &mut String) {
s.push_str("TRANSACTIONSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "kind", self.kind.0);
w::list(s, prefix, "options", &self.options);
w::text(s, prefix, "savepoint_name", self.savepoint_name.as_deref());
w::text(s, prefix, "gid", self.gid.as_deref());
w::bool(s, prefix, "chain", self.chain);
w::int(s, prefix, "location", self.location);
}
}
impl Out for TriggerTransition {
fn out(&self, s: &mut String) {
s.push_str("TRIGGERTRANSITION");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::bool(s, prefix, "isNew", self.isNew);
w::bool(s, prefix, "isTable", self.isTable);
}
}
impl Out for TruncateStmt {
fn out(&self, s: &mut String) {
s.push_str("TRUNCATESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "relations", &self.relations);
w::bool(s, prefix, "restart_seqs", self.restart_seqs);
w::int(s, prefix, "behavior", self.behavior.0);
}
}
impl Out for TypeCast {
fn out(&self, s: &mut String) {
s.push_str("TYPECAST");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::node(s, prefix, "arg", self.arg.as_ref());
w::boxed(s, prefix, "typeName", self.typeName.as_deref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for TypeName {
fn out(&self, s: &mut String) {
s.push_str("TYPENAME");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "names", &self.names);
w::int(s, prefix, "typeOid", self.typeOid);
w::bool(s, prefix, "setof", self.setof);
w::bool(s, prefix, "pct_type", self.pct_type);
w::list(s, prefix, "typmods", &self.typmods);
w::int(s, prefix, "typemod", self.typemod);
w::list(s, prefix, "arrayBounds", &self.arrayBounds);
w::int(s, prefix, "location", self.location);
}
}
impl Out for UnlistenStmt {
fn out(&self, s: &mut String) {
s.push_str("UNLISTENSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "conditionname", self.conditionname.as_deref());
}
}
impl Out for UpdateStmt {
fn out(&self, s: &mut String) {
s.push_str("UPDATESTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::list(s, prefix, "targetList", &self.targetList);
w::node(s, prefix, "whereClause", self.whereClause.as_ref());
w::list(s, prefix, "fromClause", &self.fromClause);
w::boxed(s, prefix, "returningClause", self.returningClause.as_deref());
w::boxed(s, prefix, "withClause", self.withClause.as_deref());
}
}
impl Out for VacuumRelation {
fn out(&self, s: &mut String) {
s.push_str("VACUUMRELATION");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "relation", self.relation.as_deref());
w::int(s, prefix, "oid", self.oid);
w::list(s, prefix, "va_cols", &self.va_cols);
}
}
impl Out for VacuumStmt {
fn out(&self, s: &mut String) {
s.push_str("VACUUMSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "options", &self.options);
w::list(s, prefix, "rels", &self.rels);
w::bool(s, prefix, "is_vacuumcmd", self.is_vacuumcmd);
}
}
impl Out for VariableSetStmt {
fn out(&self, s: &mut String) {
s.push_str("VARIABLESETSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "kind", self.kind.0);
w::text(s, prefix, "name", self.name.as_deref());
w::list(s, prefix, "args", &self.args);
w::bool(s, prefix, "jumble_args", self.jumble_args);
w::bool(s, prefix, "is_local", self.is_local);
w::int(s, prefix, "location", self.location);
}
}
impl Out for VariableShowStmt {
fn out(&self, s: &mut String) {
s.push_str("VARIABLESHOWSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
}
}
impl Out for ViewStmt {
fn out(&self, s: &mut String) {
s.push_str("VIEWSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::boxed(s, prefix, "view", self.view.as_deref());
w::list(s, prefix, "aliases", &self.aliases);
w::node(s, prefix, "query", self.query.as_ref());
w::bool(s, prefix, "replace", self.replace);
w::list(s, prefix, "options", &self.options);
w::int(s, prefix, "withCheckOption", self.withCheckOption.0);
}
}
impl Out for WaitStmt {
fn out(&self, s: &mut String) {
s.push_str("WAITSTMT");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "lsn_literal", self.lsn_literal.as_deref());
w::list(s, prefix, "options", &self.options);
w::int(s, prefix, "lsn_location", self.lsn_location);
}
}
impl Out for WindowDef {
fn out(&self, s: &mut String) {
s.push_str("WINDOWDEF");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::text(s, prefix, "name", self.name.as_deref());
w::text(s, prefix, "refname", self.refname.as_deref());
w::list(s, prefix, "partitionClause", &self.partitionClause);
w::list(s, prefix, "orderClause", &self.orderClause);
w::int(s, prefix, "frameOptions", self.frameOptions);
w::node(s, prefix, "startOffset", self.startOffset.as_ref());
w::node(s, prefix, "endOffset", self.endOffset.as_ref());
w::int(s, prefix, "location", self.location);
}
}
impl Out for WithClause {
fn out(&self, s: &mut String) {
s.push_str("WITHCLAUSE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::list(s, prefix, "ctes", &self.ctes);
w::bool(s, prefix, "recursive", self.recursive);
w::int(s, prefix, "location", self.location);
}
}
impl Out for XmlExpr {
fn out(&self, s: &mut String) {
s.push_str("XMLEXPR");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "op", self.op.0);
w::text(s, prefix, "name", self.name.as_deref());
w::list(s, prefix, "named_args", &self.named_args);
w::list(s, prefix, "arg_names", &self.arg_names);
w::list(s, prefix, "args", &self.args);
w::int(s, prefix, "xmloption", self.xmloption.0);
w::bool(s, prefix, "indent", self.indent);
w::int(s, prefix, "type", self.r#type);
w::int(s, prefix, "typmod", self.typmod);
w::int(s, prefix, "location", self.location);
}
}
impl Out for XmlSerialize {
fn out(&self, s: &mut String) {
s.push_str("XMLSERIALIZE");
self.fields(s, "");
}
fn fields(&self, s: &mut String, prefix: &str) {
w::int(s, prefix, "xmloption", self.xmloption.0);
w::node(s, prefix, "expr", self.expr.as_ref());
w::boxed(s, prefix, "typeName", self.typeName.as_deref());
w::bool(s, prefix, "indent", self.indent);
w::int(s, prefix, "location", self.location);
}
}
impl Equal for ATAlterConstraint {
fn equal(&self, other: &Self) -> bool {
self.conname == other.conname
&& self.alterEnforceability == other.alterEnforceability
&& self.is_enforced == other.is_enforced
&& self.alterDeferrability == other.alterDeferrability
&& self.deferrable == other.deferrable
&& self.initdeferred == other.initdeferred
&& self.alterInheritability == other.alterInheritability
&& self.noinherit == other.noinherit
}
}
impl Equal for A_ArrayExpr {
fn equal(&self, other: &Self) -> bool {
self.elements.equal(&other.elements)
}
}
impl Equal for A_Const {
fn equal(&self, other: &Self) -> bool {
self.val.equal(&other.val) && self.isnull == other.isnull
}
}
impl Equal for A_Expr {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind
&& self.name.equal(&other.name)
&& self.lexpr.equal(&other.lexpr)
&& self.rexpr.equal(&other.rexpr)
}
}
impl Equal for A_Indices {
fn equal(&self, other: &Self) -> bool {
self.is_slice == other.is_slice
&& self.lidx.equal(&other.lidx)
&& self.uidx.equal(&other.uidx)
}
}
impl Equal for A_Indirection {
fn equal(&self, other: &Self) -> bool {
self.arg.equal(&other.arg) && self.indirection.equal(&other.indirection)
}
}
impl Equal for A_Star {
fn equal(&self, _: &Self) -> bool {
true
}
}
impl Equal for AccessPriv {
fn equal(&self, other: &Self) -> bool {
self.priv_name == other.priv_name && self.cols.equal(&other.cols)
}
}
impl Equal for Alias {
fn equal(&self, other: &Self) -> bool {
self.aliasname == other.aliasname && self.colnames.equal(&other.colnames)
}
}
impl Equal for AlterCollationStmt {
fn equal(&self, other: &Self) -> bool {
self.collname.equal(&other.collname)
}
}
impl Equal for AlterDatabaseRefreshCollStmt {
fn equal(&self, other: &Self) -> bool {
self.dbname == other.dbname
}
}
impl Equal for AlterDatabaseSetStmt {
fn equal(&self, other: &Self) -> bool {
self.dbname == other.dbname && self.setstmt.equal(&other.setstmt)
}
}
impl Equal for AlterDatabaseStmt {
fn equal(&self, other: &Self) -> bool {
self.dbname == other.dbname && self.options.equal(&other.options)
}
}
impl Equal for AlterDefaultPrivilegesStmt {
fn equal(&self, other: &Self) -> bool {
self.options.equal(&other.options) && self.action.equal(&other.action)
}
}
impl Equal for AlterDomainStmt {
fn equal(&self, other: &Self) -> bool {
self.subtype == other.subtype
&& self.typeName.equal(&other.typeName)
&& self.name == other.name
&& self.def.equal(&other.def)
&& self.behavior == other.behavior
&& self.missing_ok == other.missing_ok
}
}
impl Equal for AlterEnumStmt {
fn equal(&self, other: &Self) -> bool {
self.typeName.equal(&other.typeName)
&& self.oldVal == other.oldVal
&& self.newVal == other.newVal
&& self.newValNeighbor == other.newValNeighbor
&& self.newValIsAfter == other.newValIsAfter
&& self.skipIfNewValExists == other.skipIfNewValExists
}
}
impl Equal for AlterEventTrigStmt {
fn equal(&self, other: &Self) -> bool {
self.trigname == other.trigname && self.tgenabled == other.tgenabled
}
}
impl Equal for AlterExtensionContentsStmt {
fn equal(&self, other: &Self) -> bool {
self.extname == other.extname
&& self.action == other.action
&& self.objtype == other.objtype
&& self.object.equal(&other.object)
}
}
impl Equal for AlterExtensionStmt {
fn equal(&self, other: &Self) -> bool {
self.extname == other.extname && self.options.equal(&other.options)
}
}
impl Equal for AlterFdwStmt {
fn equal(&self, other: &Self) -> bool {
self.fdwname == other.fdwname
&& self.func_options.equal(&other.func_options)
&& self.options.equal(&other.options)
}
}
impl Equal for AlterForeignServerStmt {
fn equal(&self, other: &Self) -> bool {
self.servername == other.servername
&& self.version == other.version
&& self.options.equal(&other.options)
&& self.has_version == other.has_version
}
}
impl Equal for AlterFunctionStmt {
fn equal(&self, other: &Self) -> bool {
self.objtype == other.objtype
&& self.func.equal(&other.func)
&& self.actions.equal(&other.actions)
}
}
impl Equal for AlterObjectDependsStmt {
fn equal(&self, other: &Self) -> bool {
self.objectType == other.objectType
&& self.relation.equal(&other.relation)
&& self.object.equal(&other.object)
&& self.extname.equal(&other.extname)
&& self.remove == other.remove
}
}
impl Equal for AlterObjectSchemaStmt {
fn equal(&self, other: &Self) -> bool {
self.objectType == other.objectType
&& self.relation.equal(&other.relation)
&& self.object.equal(&other.object)
&& self.newschema == other.newschema
&& self.missing_ok == other.missing_ok
}
}
impl Equal for AlterOpFamilyStmt {
fn equal(&self, other: &Self) -> bool {
self.opfamilyname.equal(&other.opfamilyname)
&& self.amname == other.amname
&& self.isDrop == other.isDrop
&& self.items.equal(&other.items)
}
}
impl Equal for AlterOperatorStmt {
fn equal(&self, other: &Self) -> bool {
self.opername.equal(&other.opername) && self.options.equal(&other.options)
}
}
impl Equal for AlterOwnerStmt {
fn equal(&self, other: &Self) -> bool {
self.objectType == other.objectType
&& self.relation.equal(&other.relation)
&& self.object.equal(&other.object)
&& self.newowner.equal(&other.newowner)
}
}
impl Equal for AlterPolicyStmt {
fn equal(&self, other: &Self) -> bool {
self.policy_name == other.policy_name
&& self.table.equal(&other.table)
&& self.roles.equal(&other.roles)
&& self.qual.equal(&other.qual)
&& self.with_check.equal(&other.with_check)
}
}
impl Equal for AlterPublicationStmt {
fn equal(&self, other: &Self) -> bool {
self.pubname == other.pubname
&& self.options.equal(&other.options)
&& self.pubobjects.equal(&other.pubobjects)
&& self.action == other.action
&& self.for_all_tables == other.for_all_tables
&& self.for_all_sequences == other.for_all_sequences
}
}
impl Equal for AlterRoleSetStmt {
fn equal(&self, other: &Self) -> bool {
self.role.equal(&other.role)
&& self.database == other.database
&& self.setstmt.equal(&other.setstmt)
}
}
impl Equal for AlterRoleStmt {
fn equal(&self, other: &Self) -> bool {
self.role.equal(&other.role)
&& self.options.equal(&other.options)
&& self.action == other.action
}
}
impl Equal for AlterSeqStmt {
fn equal(&self, other: &Self) -> bool {
self.sequence.equal(&other.sequence)
&& self.options.equal(&other.options)
&& self.for_identity == other.for_identity
&& self.missing_ok == other.missing_ok
}
}
impl Equal for AlterStatsStmt {
fn equal(&self, other: &Self) -> bool {
self.defnames.equal(&other.defnames)
&& self.stxstattarget.equal(&other.stxstattarget)
&& self.missing_ok == other.missing_ok
}
}
impl Equal for AlterSubscriptionStmt {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind
&& self.subname == other.subname
&& self.servername == other.servername
&& self.conninfo == other.conninfo
&& self.publication.equal(&other.publication)
&& self.options.equal(&other.options)
}
}
impl Equal for AlterSystemStmt {
fn equal(&self, other: &Self) -> bool {
self.setstmt.equal(&other.setstmt)
}
}
impl Equal for AlterTSConfigurationStmt {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind
&& self.cfgname.equal(&other.cfgname)
&& self.tokentype.equal(&other.tokentype)
&& self.dicts.equal(&other.dicts)
&& self.r#override == other.r#override
&& self.replace == other.replace
&& self.missing_ok == other.missing_ok
}
}
impl Equal for AlterTSDictionaryStmt {
fn equal(&self, other: &Self) -> bool {
self.dictname.equal(&other.dictname) && self.options.equal(&other.options)
}
}
impl Equal for AlterTableCmd {
fn equal(&self, other: &Self) -> bool {
self.subtype == other.subtype
&& self.name == other.name
&& self.num == other.num
&& self.newowner.equal(&other.newowner)
&& self.def.equal(&other.def)
&& self.behavior == other.behavior
&& self.missing_ok == other.missing_ok
&& self.recurse == other.recurse
}
}
impl Equal for AlterTableMoveAllStmt {
fn equal(&self, other: &Self) -> bool {
self.orig_tablespacename == other.orig_tablespacename
&& self.objtype == other.objtype
&& self.roles.equal(&other.roles)
&& self.new_tablespacename == other.new_tablespacename
&& self.nowait == other.nowait
}
}
impl Equal for AlterTableSpaceOptionsStmt {
fn equal(&self, other: &Self) -> bool {
self.tablespacename == other.tablespacename
&& self.options.equal(&other.options)
&& self.isReset == other.isReset
}
}
impl Equal for AlterTableStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.cmds.equal(&other.cmds)
&& self.objtype == other.objtype
&& self.missing_ok == other.missing_ok
}
}
impl Equal for AlterTypeStmt {
fn equal(&self, other: &Self) -> bool {
self.typeName.equal(&other.typeName) && self.options.equal(&other.options)
}
}
impl Equal for AlterUserMappingStmt {
fn equal(&self, other: &Self) -> bool {
self.user.equal(&other.user)
&& self.servername == other.servername
&& self.options.equal(&other.options)
}
}
impl Equal for BoolExpr {
fn equal(&self, other: &Self) -> bool {
self.boolop == other.boolop && self.args.equal(&other.args)
}
}
impl Equal for BooleanTest {
fn equal(&self, other: &Self) -> bool {
self.arg.equal(&other.arg) && self.booltesttype == other.booltesttype
}
}
impl Equal for CTECycleClause {
fn equal(&self, other: &Self) -> bool {
self.cycle_col_list.equal(&other.cycle_col_list)
&& self.cycle_mark_column == other.cycle_mark_column
&& self.cycle_mark_value.equal(&other.cycle_mark_value)
&& self.cycle_mark_default.equal(&other.cycle_mark_default)
&& self.cycle_path_column == other.cycle_path_column
&& self.cycle_mark_type == other.cycle_mark_type
&& self.cycle_mark_typmod == other.cycle_mark_typmod
&& self.cycle_mark_collation == other.cycle_mark_collation
&& self.cycle_mark_neop == other.cycle_mark_neop
}
}
impl Equal for CTESearchClause {
fn equal(&self, other: &Self) -> bool {
self.search_col_list.equal(&other.search_col_list)
&& self.search_breadth_first == other.search_breadth_first
&& self.search_seq_column == other.search_seq_column
}
}
impl Equal for CallStmt {
fn equal(&self, other: &Self) -> bool {
self.funccall.equal(&other.funccall)
&& self.funcexpr.equal(&other.funcexpr)
&& self.outargs.equal(&other.outargs)
}
}
impl Equal for CaseExpr {
fn equal(&self, other: &Self) -> bool {
self.casetype == other.casetype
&& self.casecollid == other.casecollid
&& self.arg.equal(&other.arg)
&& self.args.equal(&other.args)
&& self.defresult.equal(&other.defresult)
}
}
impl Equal for CaseWhen {
fn equal(&self, other: &Self) -> bool {
self.expr.equal(&other.expr) && self.result.equal(&other.result)
}
}
impl Equal for CheckPointStmt {
fn equal(&self, other: &Self) -> bool {
self.options.equal(&other.options)
}
}
impl Equal for ClosePortalStmt {
fn equal(&self, other: &Self) -> bool {
self.portalname == other.portalname
}
}
impl Equal for CoalesceExpr {
fn equal(&self, other: &Self) -> bool {
self.coalescetype == other.coalescetype
&& self.coalescecollid == other.coalescecollid
&& self.args.equal(&other.args)
}
}
impl Equal for CollateClause {
fn equal(&self, other: &Self) -> bool {
self.arg.equal(&other.arg) && self.collname.equal(&other.collname)
}
}
impl Equal for ColumnDef {
fn equal(&self, other: &Self) -> bool {
self.colname == other.colname
&& self.typeName.equal(&other.typeName)
&& self.compression == other.compression
&& self.inhcount == other.inhcount
&& self.is_local == other.is_local
&& self.is_not_null == other.is_not_null
&& self.is_from_type == other.is_from_type
&& self.storage == other.storage
&& self.storage_name == other.storage_name
&& self.raw_default.equal(&other.raw_default)
&& self.cooked_default.equal(&other.cooked_default)
&& self.identity == other.identity
&& self.identitySequence.equal(&other.identitySequence)
&& self.generated == other.generated
&& self.collClause.equal(&other.collClause)
&& self.collOid == other.collOid
&& self.constraints.equal(&other.constraints)
&& self.fdwoptions.equal(&other.fdwoptions)
}
}
impl Equal for ColumnRef {
fn equal(&self, other: &Self) -> bool {
self.fields.equal(&other.fields)
}
}
impl Equal for CommentStmt {
fn equal(&self, other: &Self) -> bool {
self.objtype == other.objtype
&& self.object.equal(&other.object)
&& self.comment == other.comment
}
}
impl Equal for CommonTableExpr {
fn equal(&self, other: &Self) -> bool {
self.ctename == other.ctename
&& self.aliascolnames.equal(&other.aliascolnames)
&& self.ctematerialized == other.ctematerialized
&& self.ctequery.equal(&other.ctequery)
&& self.search_clause.equal(&other.search_clause)
&& self.cycle_clause.equal(&other.cycle_clause)
&& self.cterecursive == other.cterecursive
&& self.cterefcount == other.cterefcount
&& self.ctecolnames.equal(&other.ctecolnames)
&& self.ctecoltypes.equal(&other.ctecoltypes)
&& self.ctecoltypmods.equal(&other.ctecoltypmods)
&& self.ctecolcollations.equal(&other.ctecolcollations)
}
}
impl Equal for CompositeTypeStmt {
fn equal(&self, other: &Self) -> bool {
self.typevar.equal(&other.typevar) && self.coldeflist.equal(&other.coldeflist)
}
}
impl Equal for Constraint {
fn equal(&self, other: &Self) -> bool {
self.contype == other.contype
&& self.conname == other.conname
&& self.deferrable == other.deferrable
&& self.initdeferred == other.initdeferred
&& self.is_enforced == other.is_enforced
&& self.skip_validation == other.skip_validation
&& self.initially_valid == other.initially_valid
&& self.is_no_inherit == other.is_no_inherit
&& self.raw_expr.equal(&other.raw_expr)
&& self.cooked_expr == other.cooked_expr
&& self.generated_when == other.generated_when
&& self.generated_kind == other.generated_kind
&& self.nulls_not_distinct == other.nulls_not_distinct
&& self.keys.equal(&other.keys)
&& self.without_overlaps == other.without_overlaps
&& self.including.equal(&other.including)
&& self.exclusions.equal(&other.exclusions)
&& self.options.equal(&other.options)
&& self.indexname == other.indexname
&& self.indexspace == other.indexspace
&& self.reset_default_tblspc == other.reset_default_tblspc
&& self.access_method == other.access_method
&& self.where_clause.equal(&other.where_clause)
&& self.pktable.equal(&other.pktable)
&& self.fk_attrs.equal(&other.fk_attrs)
&& self.pk_attrs.equal(&other.pk_attrs)
&& self.fk_with_period == other.fk_with_period
&& self.pk_with_period == other.pk_with_period
&& self.fk_matchtype == other.fk_matchtype
&& self.fk_upd_action == other.fk_upd_action
&& self.fk_del_action == other.fk_del_action
&& self.fk_del_set_cols.equal(&other.fk_del_set_cols)
&& self.old_conpfeqop.equal(&other.old_conpfeqop)
&& self.old_pktable_oid == other.old_pktable_oid
}
}
impl Equal for ConstraintsSetStmt {
fn equal(&self, other: &Self) -> bool {
self.constraints.equal(&other.constraints) && self.deferred == other.deferred
}
}
impl Equal for CopyStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.query.equal(&other.query)
&& self.attlist.equal(&other.attlist)
&& self.is_from == other.is_from
&& self.is_program == other.is_program
&& self.filename == other.filename
&& self.options.equal(&other.options)
&& self.whereClause.equal(&other.whereClause)
}
}
impl Equal for CreateAmStmt {
fn equal(&self, other: &Self) -> bool {
self.amname == other.amname
&& self.handler_name.equal(&other.handler_name)
&& self.amtype == other.amtype
}
}
impl Equal for CreateCastStmt {
fn equal(&self, other: &Self) -> bool {
self.sourcetype.equal(&other.sourcetype)
&& self.targettype.equal(&other.targettype)
&& self.func.equal(&other.func)
&& self.context == other.context
&& self.inout == other.inout
}
}
impl Equal for CreateConversionStmt {
fn equal(&self, other: &Self) -> bool {
self.conversion_name.equal(&other.conversion_name)
&& self.for_encoding_name == other.for_encoding_name
&& self.to_encoding_name == other.to_encoding_name
&& self.func_name.equal(&other.func_name)
&& self.def == other.def
}
}
impl Equal for CreateDomainStmt {
fn equal(&self, other: &Self) -> bool {
self.domainname.equal(&other.domainname)
&& self.typeName.equal(&other.typeName)
&& self.collClause.equal(&other.collClause)
&& self.constraints.equal(&other.constraints)
}
}
impl Equal for CreateEnumStmt {
fn equal(&self, other: &Self) -> bool {
self.typeName.equal(&other.typeName) && self.vals.equal(&other.vals)
}
}
impl Equal for CreateEventTrigStmt {
fn equal(&self, other: &Self) -> bool {
self.trigname == other.trigname
&& self.eventname == other.eventname
&& self.whenclause.equal(&other.whenclause)
&& self.funcname.equal(&other.funcname)
}
}
impl Equal for CreateExtensionStmt {
fn equal(&self, other: &Self) -> bool {
self.extname == other.extname
&& self.if_not_exists == other.if_not_exists
&& self.options.equal(&other.options)
}
}
impl Equal for CreateFdwStmt {
fn equal(&self, other: &Self) -> bool {
self.fdwname == other.fdwname
&& self.func_options.equal(&other.func_options)
&& self.options.equal(&other.options)
}
}
impl Equal for CreateForeignServerStmt {
fn equal(&self, other: &Self) -> bool {
self.servername == other.servername
&& self.servertype == other.servertype
&& self.version == other.version
&& self.fdwname == other.fdwname
&& self.if_not_exists == other.if_not_exists
&& self.options.equal(&other.options)
}
}
impl Equal for CreateForeignTableStmt {
fn equal(&self, other: &Self) -> bool {
self.base.equal(&other.base)
&& self.servername == other.servername
&& self.options.equal(&other.options)
}
}
impl Equal for CreateFunctionStmt {
fn equal(&self, other: &Self) -> bool {
self.is_procedure == other.is_procedure
&& self.replace == other.replace
&& self.funcname.equal(&other.funcname)
&& self.parameters.equal(&other.parameters)
&& self.returnType.equal(&other.returnType)
&& self.options.equal(&other.options)
&& self.sql_body.equal(&other.sql_body)
}
}
impl Equal for CreateOpClassItem {
fn equal(&self, other: &Self) -> bool {
self.itemtype == other.itemtype
&& self.name.equal(&other.name)
&& self.number == other.number
&& self.order_family.equal(&other.order_family)
&& self.class_args.equal(&other.class_args)
&& self.storedtype.equal(&other.storedtype)
}
}
impl Equal for CreateOpClassStmt {
fn equal(&self, other: &Self) -> bool {
self.opclassname.equal(&other.opclassname)
&& self.opfamilyname.equal(&other.opfamilyname)
&& self.amname == other.amname
&& self.datatype.equal(&other.datatype)
&& self.items.equal(&other.items)
&& self.isDefault == other.isDefault
}
}
impl Equal for CreateOpFamilyStmt {
fn equal(&self, other: &Self) -> bool {
self.opfamilyname.equal(&other.opfamilyname) && self.amname == other.amname
}
}
impl Equal for CreatePLangStmt {
fn equal(&self, other: &Self) -> bool {
self.replace == other.replace
&& self.plname == other.plname
&& self.plhandler.equal(&other.plhandler)
&& self.plinline.equal(&other.plinline)
&& self.plvalidator.equal(&other.plvalidator)
&& self.pltrusted == other.pltrusted
}
}
impl Equal for CreatePolicyStmt {
fn equal(&self, other: &Self) -> bool {
self.policy_name == other.policy_name
&& self.table.equal(&other.table)
&& self.cmd_name == other.cmd_name
&& self.permissive == other.permissive
&& self.roles.equal(&other.roles)
&& self.qual.equal(&other.qual)
&& self.with_check.equal(&other.with_check)
}
}
impl Equal for CreatePublicationStmt {
fn equal(&self, other: &Self) -> bool {
self.pubname == other.pubname
&& self.options.equal(&other.options)
&& self.pubobjects.equal(&other.pubobjects)
&& self.for_all_tables == other.for_all_tables
&& self.for_all_sequences == other.for_all_sequences
}
}
impl Equal for CreateRangeStmt {
fn equal(&self, other: &Self) -> bool {
self.typeName.equal(&other.typeName) && self.params.equal(&other.params)
}
}
impl Equal for CreateRoleStmt {
fn equal(&self, other: &Self) -> bool {
self.stmt_type == other.stmt_type
&& self.role == other.role
&& self.options.equal(&other.options)
}
}
impl Equal for CreateSchemaStmt {
fn equal(&self, other: &Self) -> bool {
self.schemaname == other.schemaname
&& self.authrole.equal(&other.authrole)
&& self.schemaElts.equal(&other.schemaElts)
&& self.if_not_exists == other.if_not_exists
}
}
impl Equal for CreateSeqStmt {
fn equal(&self, other: &Self) -> bool {
self.sequence.equal(&other.sequence)
&& self.options.equal(&other.options)
&& self.ownerId == other.ownerId
&& self.for_identity == other.for_identity
&& self.if_not_exists == other.if_not_exists
}
}
impl Equal for CreateStatsStmt {
fn equal(&self, other: &Self) -> bool {
self.defnames.equal(&other.defnames)
&& self.stat_types.equal(&other.stat_types)
&& self.exprs.equal(&other.exprs)
&& self.relations.equal(&other.relations)
&& self.stxcomment == other.stxcomment
&& self.transformed == other.transformed
&& self.if_not_exists == other.if_not_exists
&& self.owner == other.owner
}
}
impl Equal for CreateStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.tableElts.equal(&other.tableElts)
&& self.inhRelations.equal(&other.inhRelations)
&& self.partbound.equal(&other.partbound)
&& self.partspec.equal(&other.partspec)
&& self.ofTypename.equal(&other.ofTypename)
&& self.constraints.equal(&other.constraints)
&& self.nnconstraints.equal(&other.nnconstraints)
&& self.options.equal(&other.options)
&& self.oncommit == other.oncommit
&& self.tablespacename == other.tablespacename
&& self.accessMethod == other.accessMethod
&& self.if_not_exists == other.if_not_exists
}
}
impl Equal for CreateSubscriptionStmt {
fn equal(&self, other: &Self) -> bool {
self.subname == other.subname
&& self.servername == other.servername
&& self.conninfo == other.conninfo
&& self.publication.equal(&other.publication)
&& self.options.equal(&other.options)
}
}
impl Equal for CreateTableAsStmt {
fn equal(&self, other: &Self) -> bool {
self.query.equal(&other.query)
&& self.into.equal(&other.into)
&& self.objtype == other.objtype
&& self.is_select_into == other.is_select_into
&& self.if_not_exists == other.if_not_exists
}
}
impl Equal for CreateTableSpaceStmt {
fn equal(&self, other: &Self) -> bool {
self.tablespacename == other.tablespacename
&& self.owner.equal(&other.owner)
&& self.location == other.location
&& self.options.equal(&other.options)
}
}
impl Equal for CreateTransformStmt {
fn equal(&self, other: &Self) -> bool {
self.replace == other.replace
&& self.type_name.equal(&other.type_name)
&& self.lang == other.lang
&& self.fromsql.equal(&other.fromsql)
&& self.tosql.equal(&other.tosql)
}
}
impl Equal for CreateTrigStmt {
fn equal(&self, other: &Self) -> bool {
self.replace == other.replace
&& self.isconstraint == other.isconstraint
&& self.trigname == other.trigname
&& self.relation.equal(&other.relation)
&& self.funcname.equal(&other.funcname)
&& self.args.equal(&other.args)
&& self.row == other.row
&& self.timing == other.timing
&& self.events == other.events
&& self.columns.equal(&other.columns)
&& self.whenClause.equal(&other.whenClause)
&& self.transitionRels.equal(&other.transitionRels)
&& self.deferrable == other.deferrable
&& self.initdeferred == other.initdeferred
&& self.constrrel.equal(&other.constrrel)
}
}
impl Equal for CreateUserMappingStmt {
fn equal(&self, other: &Self) -> bool {
self.user.equal(&other.user)
&& self.servername == other.servername
&& self.if_not_exists == other.if_not_exists
&& self.options.equal(&other.options)
}
}
impl Equal for CreatedbStmt {
fn equal(&self, other: &Self) -> bool {
self.dbname == other.dbname && self.options.equal(&other.options)
}
}
impl Equal for CurrentOfExpr {
fn equal(&self, other: &Self) -> bool {
self.cvarno == other.cvarno
&& self.cursor_name == other.cursor_name
&& self.cursor_param == other.cursor_param
}
}
impl Equal for DeallocateStmt {
fn equal(&self, other: &Self) -> bool {
self.name == other.name && self.isall == other.isall
}
}
impl Equal for DeclareCursorStmt {
fn equal(&self, other: &Self) -> bool {
self.portalname == other.portalname
&& self.options == other.options
&& self.query.equal(&other.query)
}
}
impl Equal for DefElem {
fn equal(&self, other: &Self) -> bool {
self.defnamespace == other.defnamespace
&& self.defname == other.defname
&& self.arg.equal(&other.arg)
&& self.defaction == other.defaction
}
}
impl Equal for DefineStmt {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind
&& self.oldstyle == other.oldstyle
&& self.defnames.equal(&other.defnames)
&& self.args.equal(&other.args)
&& self.definition.equal(&other.definition)
&& self.if_not_exists == other.if_not_exists
&& self.replace == other.replace
}
}
impl Equal for DeleteStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.usingClause.equal(&other.usingClause)
&& self.whereClause.equal(&other.whereClause)
&& self.returningClause.equal(&other.returningClause)
&& self.withClause.equal(&other.withClause)
}
}
impl Equal for DiscardStmt {
fn equal(&self, other: &Self) -> bool {
self.target == other.target
}
}
impl Equal for DoStmt {
fn equal(&self, other: &Self) -> bool {
self.args.equal(&other.args)
}
}
impl Equal for DropOwnedStmt {
fn equal(&self, other: &Self) -> bool {
self.roles.equal(&other.roles) && self.behavior == other.behavior
}
}
impl Equal for DropRoleStmt {
fn equal(&self, other: &Self) -> bool {
self.roles.equal(&other.roles) && self.missing_ok == other.missing_ok
}
}
impl Equal for DropStmt {
fn equal(&self, other: &Self) -> bool {
self.objects.equal(&other.objects)
&& self.removeType == other.removeType
&& self.behavior == other.behavior
&& self.missing_ok == other.missing_ok
&& self.concurrent == other.concurrent
}
}
impl Equal for DropSubscriptionStmt {
fn equal(&self, other: &Self) -> bool {
self.subname == other.subname
&& self.missing_ok == other.missing_ok
&& self.behavior == other.behavior
}
}
impl Equal for DropTableSpaceStmt {
fn equal(&self, other: &Self) -> bool {
self.tablespacename == other.tablespacename && self.missing_ok == other.missing_ok
}
}
impl Equal for DropUserMappingStmt {
fn equal(&self, other: &Self) -> bool {
self.user.equal(&other.user)
&& self.servername == other.servername
&& self.missing_ok == other.missing_ok
}
}
impl Equal for DropdbStmt {
fn equal(&self, other: &Self) -> bool {
self.dbname == other.dbname
&& self.missing_ok == other.missing_ok
&& self.options.equal(&other.options)
}
}
impl Equal for ExecuteStmt {
fn equal(&self, other: &Self) -> bool {
self.name == other.name && self.params.equal(&other.params)
}
}
impl Equal for ExplainStmt {
fn equal(&self, other: &Self) -> bool {
self.query.equal(&other.query) && self.options.equal(&other.options)
}
}
impl Equal for FetchStmt {
fn equal(&self, other: &Self) -> bool {
self.direction == other.direction
&& self.howMany == other.howMany
&& self.portalname == other.portalname
&& self.ismove == other.ismove
&& self.direction_keyword == other.direction_keyword
}
}
impl Equal for FuncCall {
fn equal(&self, other: &Self) -> bool {
self.funcname.equal(&other.funcname)
&& self.args.equal(&other.args)
&& self.agg_order.equal(&other.agg_order)
&& self.agg_filter.equal(&other.agg_filter)
&& self.over.equal(&other.over)
&& self.ignore_nulls == other.ignore_nulls
&& self.agg_within_group == other.agg_within_group
&& self.agg_star == other.agg_star
&& self.agg_distinct == other.agg_distinct
&& self.func_variadic == other.func_variadic
&& self.funcformat == other.funcformat
}
}
impl Equal for FunctionParameter {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
&& self.argType.equal(&other.argType)
&& self.mode == other.mode
&& self.defexpr.equal(&other.defexpr)
}
}
impl Equal for GrantRoleStmt {
fn equal(&self, other: &Self) -> bool {
self.granted_roles.equal(&other.granted_roles)
&& self.grantee_roles.equal(&other.grantee_roles)
&& self.is_grant == other.is_grant
&& self.opt.equal(&other.opt)
&& self.grantor.equal(&other.grantor)
&& self.behavior == other.behavior
}
}
impl Equal for GrantStmt {
fn equal(&self, other: &Self) -> bool {
self.is_grant == other.is_grant
&& self.targtype == other.targtype
&& self.objtype == other.objtype
&& self.objects.equal(&other.objects)
&& self.privileges.equal(&other.privileges)
&& self.grantees.equal(&other.grantees)
&& self.grant_option == other.grant_option
&& self.grantor.equal(&other.grantor)
&& self.behavior == other.behavior
}
}
impl Equal for GroupingFunc {
fn equal(&self, other: &Self) -> bool {
self.args.equal(&other.args) && self.agglevelsup == other.agglevelsup
}
}
impl Equal for GroupingSet {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind && self.content.equal(&other.content)
}
}
impl Equal for ImportForeignSchemaStmt {
fn equal(&self, other: &Self) -> bool {
self.server_name == other.server_name
&& self.remote_schema == other.remote_schema
&& self.local_schema == other.local_schema
&& self.list_type == other.list_type
&& self.table_list.equal(&other.table_list)
&& self.options.equal(&other.options)
}
}
impl Equal for IndexElem {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
&& self.expr.equal(&other.expr)
&& self.indexcolname == other.indexcolname
&& self.collation.equal(&other.collation)
&& self.opclass.equal(&other.opclass)
&& self.opclassopts.equal(&other.opclassopts)
&& self.ordering == other.ordering
&& self.nulls_ordering == other.nulls_ordering
}
}
impl Equal for IndexStmt {
fn equal(&self, other: &Self) -> bool {
self.idxname == other.idxname
&& self.relation.equal(&other.relation)
&& self.accessMethod == other.accessMethod
&& self.tableSpace == other.tableSpace
&& self.indexParams.equal(&other.indexParams)
&& self.indexIncludingParams.equal(&other.indexIncludingParams)
&& self.options.equal(&other.options)
&& self.whereClause.equal(&other.whereClause)
&& self.excludeOpNames.equal(&other.excludeOpNames)
&& self.idxcomment == other.idxcomment
&& self.indexOid == other.indexOid
&& self.oldNumber == other.oldNumber
&& self.oldCreateSubid == other.oldCreateSubid
&& self.oldFirstRelfilelocatorSubid == other.oldFirstRelfilelocatorSubid
&& self.unique == other.unique
&& self.nulls_not_distinct == other.nulls_not_distinct
&& self.primary == other.primary
&& self.isconstraint == other.isconstraint
&& self.iswithoutoverlaps == other.iswithoutoverlaps
&& self.deferrable == other.deferrable
&& self.initdeferred == other.initdeferred
&& self.transformed == other.transformed
&& self.concurrent == other.concurrent
&& self.if_not_exists == other.if_not_exists
&& self.reset_default_tblspc == other.reset_default_tblspc
}
}
impl Equal for InferClause {
fn equal(&self, other: &Self) -> bool {
self.indexElems.equal(&other.indexElems)
&& self.whereClause.equal(&other.whereClause)
&& self.conname == other.conname
}
}
impl Equal for InsertStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.cols.equal(&other.cols)
&& self.selectStmt.equal(&other.selectStmt)
&& self.onConflictClause.equal(&other.onConflictClause)
&& self.returningClause.equal(&other.returningClause)
&& self.withClause.equal(&other.withClause)
&& self.r#override == other.r#override
}
}
impl Equal for IntoClause {
fn equal(&self, other: &Self) -> bool {
self.rel.equal(&other.rel)
&& self.colNames.equal(&other.colNames)
&& self.accessMethod == other.accessMethod
&& self.options.equal(&other.options)
&& self.onCommit == other.onCommit
&& self.tableSpaceName == other.tableSpaceName
&& self.viewQuery.equal(&other.viewQuery)
&& self.skipData == other.skipData
}
}
impl Equal for JoinExpr {
fn equal(&self, other: &Self) -> bool {
self.jointype == other.jointype
&& self.isNatural == other.isNatural
&& self.larg.equal(&other.larg)
&& self.rarg.equal(&other.rarg)
&& self.usingClause.equal(&other.usingClause)
&& self.join_using_alias.equal(&other.join_using_alias)
&& self.quals.equal(&other.quals)
&& self.alias.equal(&other.alias)
&& self.rtindex == other.rtindex
}
}
impl Equal for JsonAggConstructor {
fn equal(&self, other: &Self) -> bool {
self.output.equal(&other.output)
&& self.agg_filter.equal(&other.agg_filter)
&& self.agg_order.equal(&other.agg_order)
&& self.over.equal(&other.over)
}
}
impl Equal for JsonArgument {
fn equal(&self, other: &Self) -> bool {
self.val.equal(&other.val) && self.name == other.name
}
}
impl Equal for JsonArrayAgg {
fn equal(&self, other: &Self) -> bool {
self.constructor.equal(&other.constructor)
&& self.arg.equal(&other.arg)
&& self.absent_on_null == other.absent_on_null
}
}
impl Equal for JsonArrayConstructor {
fn equal(&self, other: &Self) -> bool {
self.exprs.equal(&other.exprs)
&& self.output.equal(&other.output)
&& self.absent_on_null == other.absent_on_null
}
}
impl Equal for JsonArrayQueryConstructor {
fn equal(&self, other: &Self) -> bool {
self.query.equal(&other.query)
&& self.output.equal(&other.output)
&& self.format.equal(&other.format)
&& self.absent_on_null == other.absent_on_null
}
}
impl Equal for JsonBehavior {
fn equal(&self, other: &Self) -> bool {
self.btype == other.btype && self.expr.equal(&other.expr) && self.coerce == other.coerce
}
}
impl Equal for JsonFormat {
fn equal(&self, other: &Self) -> bool {
self.format_type == other.format_type && self.encoding == other.encoding
}
}
impl Equal for JsonFuncExpr {
fn equal(&self, other: &Self) -> bool {
self.op == other.op
&& self.column_name == other.column_name
&& self.context_item.equal(&other.context_item)
&& self.pathspec.equal(&other.pathspec)
&& self.passing.equal(&other.passing)
&& self.output.equal(&other.output)
&& self.on_empty.equal(&other.on_empty)
&& self.on_error.equal(&other.on_error)
&& self.wrapper == other.wrapper
&& self.quotes == other.quotes
}
}
impl Equal for JsonIsPredicate {
fn equal(&self, other: &Self) -> bool {
self.expr.equal(&other.expr)
&& self.format.equal(&other.format)
&& self.item_type == other.item_type
&& self.unique_keys == other.unique_keys
&& self.exprBaseType == other.exprBaseType
}
}
impl Equal for JsonKeyValue {
fn equal(&self, other: &Self) -> bool {
self.key.equal(&other.key) && self.value.equal(&other.value)
}
}
impl Equal for JsonObjectAgg {
fn equal(&self, other: &Self) -> bool {
self.constructor.equal(&other.constructor)
&& self.arg.equal(&other.arg)
&& self.absent_on_null == other.absent_on_null
&& self.unique == other.unique
}
}
impl Equal for JsonObjectConstructor {
fn equal(&self, other: &Self) -> bool {
self.exprs.equal(&other.exprs)
&& self.output.equal(&other.output)
&& self.absent_on_null == other.absent_on_null
&& self.unique == other.unique
}
}
impl Equal for JsonOutput {
fn equal(&self, other: &Self) -> bool {
self.typeName.equal(&other.typeName) && self.returning.equal(&other.returning)
}
}
impl Equal for JsonParseExpr {
fn equal(&self, other: &Self) -> bool {
self.expr.equal(&other.expr)
&& self.output.equal(&other.output)
&& self.unique_keys == other.unique_keys
}
}
impl Equal for JsonReturning {
fn equal(&self, other: &Self) -> bool {
self.format.equal(&other.format) && self.typid == other.typid && self.typmod == other.typmod
}
}
impl Equal for JsonScalarExpr {
fn equal(&self, other: &Self) -> bool {
self.expr.equal(&other.expr) && self.output.equal(&other.output)
}
}
impl Equal for JsonSerializeExpr {
fn equal(&self, other: &Self) -> bool {
self.expr.equal(&other.expr) && self.output.equal(&other.output)
}
}
impl Equal for JsonTable {
fn equal(&self, other: &Self) -> bool {
self.context_item.equal(&other.context_item)
&& self.pathspec.equal(&other.pathspec)
&& self.passing.equal(&other.passing)
&& self.columns.equal(&other.columns)
&& self.on_error.equal(&other.on_error)
&& self.alias.equal(&other.alias)
&& self.lateral == other.lateral
}
}
impl Equal for JsonTableColumn {
fn equal(&self, other: &Self) -> bool {
self.coltype == other.coltype
&& self.name == other.name
&& self.typeName.equal(&other.typeName)
&& self.pathspec.equal(&other.pathspec)
&& self.format.equal(&other.format)
&& self.wrapper == other.wrapper
&& self.quotes == other.quotes
&& self.columns.equal(&other.columns)
&& self.on_empty.equal(&other.on_empty)
&& self.on_error.equal(&other.on_error)
}
}
impl Equal for JsonTablePathSpec {
fn equal(&self, other: &Self) -> bool {
self.string.equal(&other.string) && self.name == other.name
}
}
impl Equal for JsonValueExpr {
fn equal(&self, other: &Self) -> bool {
self.raw_expr.equal(&other.raw_expr)
&& self.formatted_expr.equal(&other.formatted_expr)
&& self.format.equal(&other.format)
}
}
impl Equal for ListenStmt {
fn equal(&self, other: &Self) -> bool {
self.conditionname == other.conditionname
}
}
impl Equal for LoadStmt {
fn equal(&self, other: &Self) -> bool {
self.filename == other.filename
}
}
impl Equal for LockStmt {
fn equal(&self, other: &Self) -> bool {
self.relations.equal(&other.relations)
&& self.mode == other.mode
&& self.nowait == other.nowait
}
}
impl Equal for LockingClause {
fn equal(&self, other: &Self) -> bool {
self.lockedRels.equal(&other.lockedRels)
&& self.strength == other.strength
&& self.waitPolicy == other.waitPolicy
}
}
impl Equal for MergeStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.sourceRelation.equal(&other.sourceRelation)
&& self.joinCondition.equal(&other.joinCondition)
&& self.mergeWhenClauses.equal(&other.mergeWhenClauses)
&& self.returningClause.equal(&other.returningClause)
&& self.withClause.equal(&other.withClause)
}
}
impl Equal for MergeSupportFunc {
fn equal(&self, other: &Self) -> bool {
self.msftype == other.msftype && self.msfcollid == other.msfcollid
}
}
impl Equal for MergeWhenClause {
fn equal(&self, other: &Self) -> bool {
self.matchKind == other.matchKind
&& self.commandType == other.commandType
&& self.r#override == other.r#override
&& self.condition.equal(&other.condition)
&& self.targetList.equal(&other.targetList)
&& self.values.equal(&other.values)
}
}
impl Equal for MinMaxExpr {
fn equal(&self, other: &Self) -> bool {
self.minmaxtype == other.minmaxtype
&& self.minmaxcollid == other.minmaxcollid
&& self.inputcollid == other.inputcollid
&& self.op == other.op
&& self.args.equal(&other.args)
}
}
impl Equal for MultiAssignRef {
fn equal(&self, other: &Self) -> bool {
self.source.equal(&other.source)
&& self.colno == other.colno
&& self.ncolumns == other.ncolumns
}
}
impl Equal for NamedArgExpr {
fn equal(&self, other: &Self) -> bool {
self.arg.equal(&other.arg) && self.name == other.name && self.argnumber == other.argnumber
}
}
impl Equal for NotifyStmt {
fn equal(&self, other: &Self) -> bool {
self.conditionname == other.conditionname && self.payload == other.payload
}
}
impl Equal for NullTest {
fn equal(&self, other: &Self) -> bool {
self.arg.equal(&other.arg)
&& self.nulltesttype == other.nulltesttype
&& self.argisrow == other.argisrow
}
}
impl Equal for ObjectWithArgs {
fn equal(&self, other: &Self) -> bool {
self.objname.equal(&other.objname)
&& self.objargs.equal(&other.objargs)
&& self.objfuncargs.equal(&other.objfuncargs)
&& self.args_unspecified == other.args_unspecified
}
}
impl Equal for OnConflictClause {
fn equal(&self, other: &Self) -> bool {
self.action == other.action
&& self.infer.equal(&other.infer)
&& self.lockStrength == other.lockStrength
&& self.targetList.equal(&other.targetList)
&& self.whereClause.equal(&other.whereClause)
}
}
impl Equal for PLAssignStmt {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
&& self.indirection.equal(&other.indirection)
&& self.nnames == other.nnames
&& self.val.equal(&other.val)
}
}
impl Equal for ParamRef {
fn equal(&self, other: &Self) -> bool {
self.number == other.number
}
}
impl Equal for PartitionBoundSpec {
fn equal(&self, other: &Self) -> bool {
self.strategy == other.strategy
&& self.is_default == other.is_default
&& self.modulus == other.modulus
&& self.remainder == other.remainder
&& self.listdatums.equal(&other.listdatums)
&& self.lowerdatums.equal(&other.lowerdatums)
&& self.upperdatums.equal(&other.upperdatums)
}
}
impl Equal for PartitionCmd {
fn equal(&self, other: &Self) -> bool {
self.name.equal(&other.name)
&& self.bound.equal(&other.bound)
&& self.concurrent == other.concurrent
}
}
impl Equal for PartitionElem {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
&& self.expr.equal(&other.expr)
&& self.collation.equal(&other.collation)
&& self.opclass.equal(&other.opclass)
}
}
impl Equal for PartitionSpec {
fn equal(&self, other: &Self) -> bool {
self.strategy == other.strategy && self.partParams.equal(&other.partParams)
}
}
impl Equal for PrepareStmt {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
&& self.argtypes.equal(&other.argtypes)
&& self.query.equal(&other.query)
}
}
impl Equal for PublicationAllObjSpec {
fn equal(&self, other: &Self) -> bool {
self.pubobjtype == other.pubobjtype && self.except_tables.equal(&other.except_tables)
}
}
impl Equal for PublicationObjSpec {
fn equal(&self, other: &Self) -> bool {
self.pubobjtype == other.pubobjtype
&& self.name == other.name
&& self.pubtable.equal(&other.pubtable)
}
}
impl Equal for PublicationTable {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.whereClause.equal(&other.whereClause)
&& self.columns.equal(&other.columns)
&& self.except == other.except
}
}
impl Equal for RangeFunction {
fn equal(&self, other: &Self) -> bool {
self.lateral == other.lateral
&& self.ordinality == other.ordinality
&& self.is_rowsfrom == other.is_rowsfrom
&& self.functions.equal(&other.functions)
&& self.alias.equal(&other.alias)
&& self.coldeflist.equal(&other.coldeflist)
}
}
impl Equal for RangeSubselect {
fn equal(&self, other: &Self) -> bool {
self.lateral == other.lateral
&& self.subquery.equal(&other.subquery)
&& self.alias.equal(&other.alias)
}
}
impl Equal for RangeTableFunc {
fn equal(&self, other: &Self) -> bool {
self.lateral == other.lateral
&& self.docexpr.equal(&other.docexpr)
&& self.rowexpr.equal(&other.rowexpr)
&& self.namespaces.equal(&other.namespaces)
&& self.columns.equal(&other.columns)
&& self.alias.equal(&other.alias)
}
}
impl Equal for RangeTableFuncCol {
fn equal(&self, other: &Self) -> bool {
self.colname == other.colname
&& self.typeName.equal(&other.typeName)
&& self.for_ordinality == other.for_ordinality
&& self.is_not_null == other.is_not_null
&& self.colexpr.equal(&other.colexpr)
&& self.coldefexpr.equal(&other.coldefexpr)
}
}
impl Equal for RangeTableSample {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.method.equal(&other.method)
&& self.args.equal(&other.args)
&& self.repeatable.equal(&other.repeatable)
}
}
impl Equal for RangeVar {
fn equal(&self, other: &Self) -> bool {
self.catalogname == other.catalogname
&& self.schemaname == other.schemaname
&& self.relname == other.relname
&& self.inh == other.inh
&& self.relpersistence == other.relpersistence
&& self.alias.equal(&other.alias)
}
}
impl Equal for RawStmt {
fn equal(&self, other: &Self) -> bool {
self.stmt.equal(&other.stmt)
}
}
impl Equal for ReassignOwnedStmt {
fn equal(&self, other: &Self) -> bool {
self.roles.equal(&other.roles) && self.newrole.equal(&other.newrole)
}
}
impl Equal for RefreshMatViewStmt {
fn equal(&self, other: &Self) -> bool {
self.concurrent == other.concurrent
&& self.skipData == other.skipData
&& self.relation.equal(&other.relation)
}
}
impl Equal for ReindexStmt {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind
&& self.relation.equal(&other.relation)
&& self.name == other.name
&& self.params.equal(&other.params)
}
}
impl Equal for RenameStmt {
fn equal(&self, other: &Self) -> bool {
self.renameType == other.renameType
&& self.relationType == other.relationType
&& self.relation.equal(&other.relation)
&& self.object.equal(&other.object)
&& self.subname == other.subname
&& self.newname == other.newname
&& self.behavior == other.behavior
&& self.missing_ok == other.missing_ok
}
}
impl Equal for RepackStmt {
fn equal(&self, other: &Self) -> bool {
self.command == other.command
&& self.relation.equal(&other.relation)
&& self.indexname == other.indexname
&& self.usingindex == other.usingindex
&& self.params.equal(&other.params)
}
}
impl Equal for ReplicaIdentityStmt {
fn equal(&self, other: &Self) -> bool {
self.identity_type == other.identity_type && self.name == other.name
}
}
impl Equal for ResTarget {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
&& self.indirection.equal(&other.indirection)
&& self.val.equal(&other.val)
}
}
impl Equal for ReturnStmt {
fn equal(&self, other: &Self) -> bool {
self.returnval.equal(&other.returnval)
}
}
impl Equal for ReturningClause {
fn equal(&self, other: &Self) -> bool {
self.options.equal(&other.options) && self.exprs.equal(&other.exprs)
}
}
impl Equal for ReturningOption {
fn equal(&self, other: &Self) -> bool {
self.option == other.option && self.value == other.value
}
}
impl Equal for RoleSpec {
fn equal(&self, other: &Self) -> bool {
self.roletype == other.roletype && self.rolename == other.rolename
}
}
impl Equal for RowExpr {
fn equal(&self, other: &Self) -> bool {
self.args.equal(&other.args)
&& self.row_typeid == other.row_typeid
&& self.row_format == other.row_format
&& self.colnames.equal(&other.colnames)
}
}
impl Equal for RuleStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.rulename == other.rulename
&& self.whereClause.equal(&other.whereClause)
&& self.event == other.event
&& self.instead == other.instead
&& self.actions.equal(&other.actions)
&& self.replace == other.replace
}
}
impl Equal for SQLValueFunction {
fn equal(&self, other: &Self) -> bool {
self.op == other.op && self.r#type == other.r#type && self.typmod == other.typmod
}
}
impl Equal for SecLabelStmt {
fn equal(&self, other: &Self) -> bool {
self.objtype == other.objtype
&& self.object.equal(&other.object)
&& self.provider == other.provider
&& self.label == other.label
}
}
impl Equal for SelectStmt {
fn equal(&self, other: &Self) -> bool {
self.distinctClause.equal(&other.distinctClause)
&& self.intoClause.equal(&other.intoClause)
&& self.targetList.equal(&other.targetList)
&& self.fromClause.equal(&other.fromClause)
&& self.whereClause.equal(&other.whereClause)
&& self.groupClause.equal(&other.groupClause)
&& self.groupDistinct == other.groupDistinct
&& self.havingClause.equal(&other.havingClause)
&& self.windowClause.equal(&other.windowClause)
&& self.valuesLists.equal(&other.valuesLists)
&& self.sortClause.equal(&other.sortClause)
&& self.limitOffset.equal(&other.limitOffset)
&& self.limitCount.equal(&other.limitCount)
&& self.limitOption == other.limitOption
&& self.lockingClause.equal(&other.lockingClause)
&& self.withClause.equal(&other.withClause)
&& self.op == other.op
&& self.all == other.all
&& self.larg.equal(&other.larg)
&& self.rarg.equal(&other.rarg)
}
}
impl Equal for SetToDefault {
fn equal(&self, other: &Self) -> bool {
self.typeId == other.typeId
&& self.typeMod == other.typeMod
&& self.collation == other.collation
}
}
impl Equal for SortBy {
fn equal(&self, other: &Self) -> bool {
self.node.equal(&other.node)
&& self.sortby_dir == other.sortby_dir
&& self.sortby_nulls == other.sortby_nulls
&& self.useOp.equal(&other.useOp)
}
}
impl Equal for StatsElem {
fn equal(&self, other: &Self) -> bool {
self.name == other.name && self.expr.equal(&other.expr)
}
}
impl Equal for SubLink {
fn equal(&self, other: &Self) -> bool {
self.subLinkType == other.subLinkType
&& self.subLinkId == other.subLinkId
&& self.testexpr.equal(&other.testexpr)
&& self.operName.equal(&other.operName)
&& self.subselect.equal(&other.subselect)
}
}
impl Equal for TableLikeClause {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.options == other.options
&& self.relationOid == other.relationOid
}
}
impl Equal for TransactionStmt {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind
&& self.options.equal(&other.options)
&& self.savepoint_name == other.savepoint_name
&& self.gid == other.gid
&& self.chain == other.chain
}
}
impl Equal for TriggerTransition {
fn equal(&self, other: &Self) -> bool {
self.name == other.name && self.isNew == other.isNew && self.isTable == other.isTable
}
}
impl Equal for TruncateStmt {
fn equal(&self, other: &Self) -> bool {
self.relations.equal(&other.relations)
&& self.restart_seqs == other.restart_seqs
&& self.behavior == other.behavior
}
}
impl Equal for TypeCast {
fn equal(&self, other: &Self) -> bool {
self.arg.equal(&other.arg) && self.typeName.equal(&other.typeName)
}
}
impl Equal for TypeName {
fn equal(&self, other: &Self) -> bool {
self.names.equal(&other.names)
&& self.typeOid == other.typeOid
&& self.setof == other.setof
&& self.pct_type == other.pct_type
&& self.typmods.equal(&other.typmods)
&& self.typemod == other.typemod
&& self.arrayBounds.equal(&other.arrayBounds)
}
}
impl Equal for UnlistenStmt {
fn equal(&self, other: &Self) -> bool {
self.conditionname == other.conditionname
}
}
impl Equal for UpdateStmt {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.targetList.equal(&other.targetList)
&& self.whereClause.equal(&other.whereClause)
&& self.fromClause.equal(&other.fromClause)
&& self.returningClause.equal(&other.returningClause)
&& self.withClause.equal(&other.withClause)
}
}
impl Equal for VacuumRelation {
fn equal(&self, other: &Self) -> bool {
self.relation.equal(&other.relation)
&& self.oid == other.oid
&& self.va_cols.equal(&other.va_cols)
}
}
impl Equal for VacuumStmt {
fn equal(&self, other: &Self) -> bool {
self.options.equal(&other.options)
&& self.rels.equal(&other.rels)
&& self.is_vacuumcmd == other.is_vacuumcmd
}
}
impl Equal for VariableSetStmt {
fn equal(&self, other: &Self) -> bool {
self.kind == other.kind
&& self.name == other.name
&& self.args.equal(&other.args)
&& self.jumble_args == other.jumble_args
&& self.is_local == other.is_local
}
}
impl Equal for VariableShowStmt {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
}
}
impl Equal for ViewStmt {
fn equal(&self, other: &Self) -> bool {
self.view.equal(&other.view)
&& self.aliases.equal(&other.aliases)
&& self.query.equal(&other.query)
&& self.replace == other.replace
&& self.options.equal(&other.options)
&& self.withCheckOption == other.withCheckOption
}
}
impl Equal for WaitStmt {
fn equal(&self, other: &Self) -> bool {
self.lsn_literal == other.lsn_literal && self.options.equal(&other.options)
}
}
impl Equal for WindowDef {
fn equal(&self, other: &Self) -> bool {
self.name == other.name
&& self.refname == other.refname
&& self.partitionClause.equal(&other.partitionClause)
&& self.orderClause.equal(&other.orderClause)
&& self.frameOptions == other.frameOptions
&& self.startOffset.equal(&other.startOffset)
&& self.endOffset.equal(&other.endOffset)
}
}
impl Equal for WithClause {
fn equal(&self, other: &Self) -> bool {
self.ctes.equal(&other.ctes) && self.recursive == other.recursive
}
}
impl Equal for XmlExpr {
fn equal(&self, other: &Self) -> bool {
self.op == other.op
&& self.name == other.name
&& self.named_args.equal(&other.named_args)
&& self.arg_names.equal(&other.arg_names)
&& self.args.equal(&other.args)
&& self.xmloption == other.xmloption
&& self.indent == other.indent
&& self.r#type == other.r#type
&& self.typmod == other.typmod
}
}
impl Equal for XmlSerialize {
fn equal(&self, other: &Self) -> bool {
self.xmloption == other.xmloption
&& self.expr.equal(&other.expr)
&& self.typeName.equal(&other.typeName)
&& self.indent == other.indent
}
}
#[derive(Clone, Debug, PartialEq)]
pub enum Node {
List(List),
Integer(i32),
Float(Str),
Boolean(bool),
String(Str),
BitString(Str),
ATAlterConstraint(Box<ATAlterConstraint>),
A_ArrayExpr(Box<A_ArrayExpr>),
A_Const(Box<A_Const>),
A_Expr(Box<A_Expr>),
A_Indices(Box<A_Indices>),
A_Indirection(Box<A_Indirection>),
A_Star(Box<A_Star>),
AccessPriv(Box<AccessPriv>),
Alias(Box<Alias>),
AlterCollationStmt(Box<AlterCollationStmt>),
AlterDatabaseRefreshCollStmt(Box<AlterDatabaseRefreshCollStmt>),
AlterDatabaseSetStmt(Box<AlterDatabaseSetStmt>),
AlterDatabaseStmt(Box<AlterDatabaseStmt>),
AlterDefaultPrivilegesStmt(Box<AlterDefaultPrivilegesStmt>),
AlterDomainStmt(Box<AlterDomainStmt>),
AlterEnumStmt(Box<AlterEnumStmt>),
AlterEventTrigStmt(Box<AlterEventTrigStmt>),
AlterExtensionContentsStmt(Box<AlterExtensionContentsStmt>),
AlterExtensionStmt(Box<AlterExtensionStmt>),
AlterFdwStmt(Box<AlterFdwStmt>),
AlterForeignServerStmt(Box<AlterForeignServerStmt>),
AlterFunctionStmt(Box<AlterFunctionStmt>),
AlterObjectDependsStmt(Box<AlterObjectDependsStmt>),
AlterObjectSchemaStmt(Box<AlterObjectSchemaStmt>),
AlterOpFamilyStmt(Box<AlterOpFamilyStmt>),
AlterOperatorStmt(Box<AlterOperatorStmt>),
AlterOwnerStmt(Box<AlterOwnerStmt>),
AlterPolicyStmt(Box<AlterPolicyStmt>),
AlterPublicationStmt(Box<AlterPublicationStmt>),
AlterRoleSetStmt(Box<AlterRoleSetStmt>),
AlterRoleStmt(Box<AlterRoleStmt>),
AlterSeqStmt(Box<AlterSeqStmt>),
AlterStatsStmt(Box<AlterStatsStmt>),
AlterSubscriptionStmt(Box<AlterSubscriptionStmt>),
AlterSystemStmt(Box<AlterSystemStmt>),
AlterTSConfigurationStmt(Box<AlterTSConfigurationStmt>),
AlterTSDictionaryStmt(Box<AlterTSDictionaryStmt>),
AlterTableCmd(Box<AlterTableCmd>),
AlterTableMoveAllStmt(Box<AlterTableMoveAllStmt>),
AlterTableSpaceOptionsStmt(Box<AlterTableSpaceOptionsStmt>),
AlterTableStmt(Box<AlterTableStmt>),
AlterTypeStmt(Box<AlterTypeStmt>),
AlterUserMappingStmt(Box<AlterUserMappingStmt>),
BoolExpr(Box<BoolExpr>),
BooleanTest(Box<BooleanTest>),
CTECycleClause(Box<CTECycleClause>),
CTESearchClause(Box<CTESearchClause>),
CallStmt(Box<CallStmt>),
CaseExpr(Box<CaseExpr>),
CaseWhen(Box<CaseWhen>),
CheckPointStmt(Box<CheckPointStmt>),
ClosePortalStmt(Box<ClosePortalStmt>),
CoalesceExpr(Box<CoalesceExpr>),
CollateClause(Box<CollateClause>),
ColumnDef(Box<ColumnDef>),
ColumnRef(Box<ColumnRef>),
CommentStmt(Box<CommentStmt>),
CommonTableExpr(Box<CommonTableExpr>),
CompositeTypeStmt(Box<CompositeTypeStmt>),
Constraint(Box<Constraint>),
ConstraintsSetStmt(Box<ConstraintsSetStmt>),
CopyStmt(Box<CopyStmt>),
CreateAmStmt(Box<CreateAmStmt>),
CreateCastStmt(Box<CreateCastStmt>),
CreateConversionStmt(Box<CreateConversionStmt>),
CreateDomainStmt(Box<CreateDomainStmt>),
CreateEnumStmt(Box<CreateEnumStmt>),
CreateEventTrigStmt(Box<CreateEventTrigStmt>),
CreateExtensionStmt(Box<CreateExtensionStmt>),
CreateFdwStmt(Box<CreateFdwStmt>),
CreateForeignServerStmt(Box<CreateForeignServerStmt>),
CreateForeignTableStmt(Box<CreateForeignTableStmt>),
CreateFunctionStmt(Box<CreateFunctionStmt>),
CreateOpClassItem(Box<CreateOpClassItem>),
CreateOpClassStmt(Box<CreateOpClassStmt>),
CreateOpFamilyStmt(Box<CreateOpFamilyStmt>),
CreatePLangStmt(Box<CreatePLangStmt>),
CreatePolicyStmt(Box<CreatePolicyStmt>),
CreatePublicationStmt(Box<CreatePublicationStmt>),
CreateRangeStmt(Box<CreateRangeStmt>),
CreateRoleStmt(Box<CreateRoleStmt>),
CreateSchemaStmt(Box<CreateSchemaStmt>),
CreateSeqStmt(Box<CreateSeqStmt>),
CreateStatsStmt(Box<CreateStatsStmt>),
CreateStmt(Box<CreateStmt>),
CreateSubscriptionStmt(Box<CreateSubscriptionStmt>),
CreateTableAsStmt(Box<CreateTableAsStmt>),
CreateTableSpaceStmt(Box<CreateTableSpaceStmt>),
CreateTransformStmt(Box<CreateTransformStmt>),
CreateTrigStmt(Box<CreateTrigStmt>),
CreateUserMappingStmt(Box<CreateUserMappingStmt>),
CreatedbStmt(Box<CreatedbStmt>),
CurrentOfExpr(Box<CurrentOfExpr>),
DeallocateStmt(Box<DeallocateStmt>),
DeclareCursorStmt(Box<DeclareCursorStmt>),
DefElem(Box<DefElem>),
DefineStmt(Box<DefineStmt>),
DeleteStmt(Box<DeleteStmt>),
DiscardStmt(Box<DiscardStmt>),
DoStmt(Box<DoStmt>),
DropOwnedStmt(Box<DropOwnedStmt>),
DropRoleStmt(Box<DropRoleStmt>),
DropStmt(Box<DropStmt>),
DropSubscriptionStmt(Box<DropSubscriptionStmt>),
DropTableSpaceStmt(Box<DropTableSpaceStmt>),
DropUserMappingStmt(Box<DropUserMappingStmt>),
DropdbStmt(Box<DropdbStmt>),
ExecuteStmt(Box<ExecuteStmt>),
ExplainStmt(Box<ExplainStmt>),
FetchStmt(Box<FetchStmt>),
FuncCall(Box<FuncCall>),
FunctionParameter(Box<FunctionParameter>),
GrantRoleStmt(Box<GrantRoleStmt>),
GrantStmt(Box<GrantStmt>),
GroupingFunc(Box<GroupingFunc>),
GroupingSet(Box<GroupingSet>),
ImportForeignSchemaStmt(Box<ImportForeignSchemaStmt>),
IndexElem(Box<IndexElem>),
IndexStmt(Box<IndexStmt>),
InferClause(Box<InferClause>),
InsertStmt(Box<InsertStmt>),
IntoClause(Box<IntoClause>),
JoinExpr(Box<JoinExpr>),
JsonAggConstructor(Box<JsonAggConstructor>),
JsonArgument(Box<JsonArgument>),
JsonArrayAgg(Box<JsonArrayAgg>),
JsonArrayConstructor(Box<JsonArrayConstructor>),
JsonArrayQueryConstructor(Box<JsonArrayQueryConstructor>),
JsonBehavior(Box<JsonBehavior>),
JsonFormat(Box<JsonFormat>),
JsonFuncExpr(Box<JsonFuncExpr>),
JsonIsPredicate(Box<JsonIsPredicate>),
JsonKeyValue(Box<JsonKeyValue>),
JsonObjectAgg(Box<JsonObjectAgg>),
JsonObjectConstructor(Box<JsonObjectConstructor>),
JsonOutput(Box<JsonOutput>),
JsonParseExpr(Box<JsonParseExpr>),
JsonReturning(Box<JsonReturning>),
JsonScalarExpr(Box<JsonScalarExpr>),
JsonSerializeExpr(Box<JsonSerializeExpr>),
JsonTable(Box<JsonTable>),
JsonTableColumn(Box<JsonTableColumn>),
JsonTablePathSpec(Box<JsonTablePathSpec>),
JsonValueExpr(Box<JsonValueExpr>),
ListenStmt(Box<ListenStmt>),
LoadStmt(Box<LoadStmt>),
LockStmt(Box<LockStmt>),
LockingClause(Box<LockingClause>),
MergeStmt(Box<MergeStmt>),
MergeSupportFunc(Box<MergeSupportFunc>),
MergeWhenClause(Box<MergeWhenClause>),
MinMaxExpr(Box<MinMaxExpr>),
MultiAssignRef(Box<MultiAssignRef>),
NamedArgExpr(Box<NamedArgExpr>),
NotifyStmt(Box<NotifyStmt>),
NullTest(Box<NullTest>),
ObjectWithArgs(Box<ObjectWithArgs>),
OnConflictClause(Box<OnConflictClause>),
PLAssignStmt(Box<PLAssignStmt>),
ParamRef(Box<ParamRef>),
PartitionBoundSpec(Box<PartitionBoundSpec>),
PartitionCmd(Box<PartitionCmd>),
PartitionElem(Box<PartitionElem>),
PartitionSpec(Box<PartitionSpec>),
PrepareStmt(Box<PrepareStmt>),
PublicationAllObjSpec(Box<PublicationAllObjSpec>),
PublicationObjSpec(Box<PublicationObjSpec>),
PublicationTable(Box<PublicationTable>),
RangeFunction(Box<RangeFunction>),
RangeSubselect(Box<RangeSubselect>),
RangeTableFunc(Box<RangeTableFunc>),
RangeTableFuncCol(Box<RangeTableFuncCol>),
RangeTableSample(Box<RangeTableSample>),
RangeVar(Box<RangeVar>),
RawStmt(Box<RawStmt>),
ReassignOwnedStmt(Box<ReassignOwnedStmt>),
RefreshMatViewStmt(Box<RefreshMatViewStmt>),
ReindexStmt(Box<ReindexStmt>),
RenameStmt(Box<RenameStmt>),
RepackStmt(Box<RepackStmt>),
ReplicaIdentityStmt(Box<ReplicaIdentityStmt>),
ResTarget(Box<ResTarget>),
ReturnStmt(Box<ReturnStmt>),
ReturningClause(Box<ReturningClause>),
ReturningOption(Box<ReturningOption>),
RoleSpec(Box<RoleSpec>),
RowExpr(Box<RowExpr>),
RuleStmt(Box<RuleStmt>),
SQLValueFunction(Box<SQLValueFunction>),
SecLabelStmt(Box<SecLabelStmt>),
SelectStmt(Box<SelectStmt>),
SetToDefault(Box<SetToDefault>),
SortBy(Box<SortBy>),
StatsElem(Box<StatsElem>),
SubLink(Box<SubLink>),
TableLikeClause(Box<TableLikeClause>),
TransactionStmt(Box<TransactionStmt>),
TriggerTransition(Box<TriggerTransition>),
TruncateStmt(Box<TruncateStmt>),
TypeCast(Box<TypeCast>),
TypeName(Box<TypeName>),
UnlistenStmt(Box<UnlistenStmt>),
UpdateStmt(Box<UpdateStmt>),
VacuumRelation(Box<VacuumRelation>),
VacuumStmt(Box<VacuumStmt>),
VariableSetStmt(Box<VariableSetStmt>),
VariableShowStmt(Box<VariableShowStmt>),
ViewStmt(Box<ViewStmt>),
WaitStmt(Box<WaitStmt>),
WindowDef(Box<WindowDef>),
WithClause(Box<WithClause>),
XmlExpr(Box<XmlExpr>),
XmlSerialize(Box<XmlSerialize>),
}
impl Node {
pub(crate) fn write(&self, s: &mut String) {
match self {
Node::List(list) => w::items(s, list),
Node::Integer(value) => w::integer(s, *value),
Node::Float(value) => s.push_str(value),
Node::Boolean(value) => s.push_str(if *value { "true" } else { "false" }),
Node::String(value) => w::string(s, value),
Node::BitString(value) => w::token(s, Some(value)),
Node::ATAlterConstraint(node) => w::braced(s, &**node),
Node::A_ArrayExpr(node) => w::braced(s, &**node),
Node::A_Const(node) => w::braced(s, &**node),
Node::A_Expr(node) => w::braced(s, &**node),
Node::A_Indices(node) => w::braced(s, &**node),
Node::A_Indirection(node) => w::braced(s, &**node),
Node::A_Star(node) => w::braced(s, &**node),
Node::AccessPriv(node) => w::braced(s, &**node),
Node::Alias(node) => w::braced(s, &**node),
Node::AlterCollationStmt(node) => w::braced(s, &**node),
Node::AlterDatabaseRefreshCollStmt(node) => w::braced(s, &**node),
Node::AlterDatabaseSetStmt(node) => w::braced(s, &**node),
Node::AlterDatabaseStmt(node) => w::braced(s, &**node),
Node::AlterDefaultPrivilegesStmt(node) => w::braced(s, &**node),
Node::AlterDomainStmt(node) => w::braced(s, &**node),
Node::AlterEnumStmt(node) => w::braced(s, &**node),
Node::AlterEventTrigStmt(node) => w::braced(s, &**node),
Node::AlterExtensionContentsStmt(node) => w::braced(s, &**node),
Node::AlterExtensionStmt(node) => w::braced(s, &**node),
Node::AlterFdwStmt(node) => w::braced(s, &**node),
Node::AlterForeignServerStmt(node) => w::braced(s, &**node),
Node::AlterFunctionStmt(node) => w::braced(s, &**node),
Node::AlterObjectDependsStmt(node) => w::braced(s, &**node),
Node::AlterObjectSchemaStmt(node) => w::braced(s, &**node),
Node::AlterOpFamilyStmt(node) => w::braced(s, &**node),
Node::AlterOperatorStmt(node) => w::braced(s, &**node),
Node::AlterOwnerStmt(node) => w::braced(s, &**node),
Node::AlterPolicyStmt(node) => w::braced(s, &**node),
Node::AlterPublicationStmt(node) => w::braced(s, &**node),
Node::AlterRoleSetStmt(node) => w::braced(s, &**node),
Node::AlterRoleStmt(node) => w::braced(s, &**node),
Node::AlterSeqStmt(node) => w::braced(s, &**node),
Node::AlterStatsStmt(node) => w::braced(s, &**node),
Node::AlterSubscriptionStmt(node) => w::braced(s, &**node),
Node::AlterSystemStmt(node) => w::braced(s, &**node),
Node::AlterTSConfigurationStmt(node) => w::braced(s, &**node),
Node::AlterTSDictionaryStmt(node) => w::braced(s, &**node),
Node::AlterTableCmd(node) => w::braced(s, &**node),
Node::AlterTableMoveAllStmt(node) => w::braced(s, &**node),
Node::AlterTableSpaceOptionsStmt(node) => w::braced(s, &**node),
Node::AlterTableStmt(node) => w::braced(s, &**node),
Node::AlterTypeStmt(node) => w::braced(s, &**node),
Node::AlterUserMappingStmt(node) => w::braced(s, &**node),
Node::BoolExpr(node) => w::braced(s, &**node),
Node::BooleanTest(node) => w::braced(s, &**node),
Node::CTECycleClause(node) => w::braced(s, &**node),
Node::CTESearchClause(node) => w::braced(s, &**node),
Node::CallStmt(node) => w::braced(s, &**node),
Node::CaseExpr(node) => w::braced(s, &**node),
Node::CaseWhen(node) => w::braced(s, &**node),
Node::CheckPointStmt(node) => w::braced(s, &**node),
Node::ClosePortalStmt(node) => w::braced(s, &**node),
Node::CoalesceExpr(node) => w::braced(s, &**node),
Node::CollateClause(node) => w::braced(s, &**node),
Node::ColumnDef(node) => w::braced(s, &**node),
Node::ColumnRef(node) => w::braced(s, &**node),
Node::CommentStmt(node) => w::braced(s, &**node),
Node::CommonTableExpr(node) => w::braced(s, &**node),
Node::CompositeTypeStmt(node) => w::braced(s, &**node),
Node::Constraint(node) => w::braced(s, &**node),
Node::ConstraintsSetStmt(node) => w::braced(s, &**node),
Node::CopyStmt(node) => w::braced(s, &**node),
Node::CreateAmStmt(node) => w::braced(s, &**node),
Node::CreateCastStmt(node) => w::braced(s, &**node),
Node::CreateConversionStmt(node) => w::braced(s, &**node),
Node::CreateDomainStmt(node) => w::braced(s, &**node),
Node::CreateEnumStmt(node) => w::braced(s, &**node),
Node::CreateEventTrigStmt(node) => w::braced(s, &**node),
Node::CreateExtensionStmt(node) => w::braced(s, &**node),
Node::CreateFdwStmt(node) => w::braced(s, &**node),
Node::CreateForeignServerStmt(node) => w::braced(s, &**node),
Node::CreateForeignTableStmt(node) => w::braced(s, &**node),
Node::CreateFunctionStmt(node) => w::braced(s, &**node),
Node::CreateOpClassItem(node) => w::braced(s, &**node),
Node::CreateOpClassStmt(node) => w::braced(s, &**node),
Node::CreateOpFamilyStmt(node) => w::braced(s, &**node),
Node::CreatePLangStmt(node) => w::braced(s, &**node),
Node::CreatePolicyStmt(node) => w::braced(s, &**node),
Node::CreatePublicationStmt(node) => w::braced(s, &**node),
Node::CreateRangeStmt(node) => w::braced(s, &**node),
Node::CreateRoleStmt(node) => w::braced(s, &**node),
Node::CreateSchemaStmt(node) => w::braced(s, &**node),
Node::CreateSeqStmt(node) => w::braced(s, &**node),
Node::CreateStatsStmt(node) => w::braced(s, &**node),
Node::CreateStmt(node) => w::braced(s, &**node),
Node::CreateSubscriptionStmt(node) => w::braced(s, &**node),
Node::CreateTableAsStmt(node) => w::braced(s, &**node),
Node::CreateTableSpaceStmt(node) => w::braced(s, &**node),
Node::CreateTransformStmt(node) => w::braced(s, &**node),
Node::CreateTrigStmt(node) => w::braced(s, &**node),
Node::CreateUserMappingStmt(node) => w::braced(s, &**node),
Node::CreatedbStmt(node) => w::braced(s, &**node),
Node::CurrentOfExpr(node) => w::braced(s, &**node),
Node::DeallocateStmt(node) => w::braced(s, &**node),
Node::DeclareCursorStmt(node) => w::braced(s, &**node),
Node::DefElem(node) => w::braced(s, &**node),
Node::DefineStmt(node) => w::braced(s, &**node),
Node::DeleteStmt(node) => w::braced(s, &**node),
Node::DiscardStmt(node) => w::braced(s, &**node),
Node::DoStmt(node) => w::braced(s, &**node),
Node::DropOwnedStmt(node) => w::braced(s, &**node),
Node::DropRoleStmt(node) => w::braced(s, &**node),
Node::DropStmt(node) => w::braced(s, &**node),
Node::DropSubscriptionStmt(node) => w::braced(s, &**node),
Node::DropTableSpaceStmt(node) => w::braced(s, &**node),
Node::DropUserMappingStmt(node) => w::braced(s, &**node),
Node::DropdbStmt(node) => w::braced(s, &**node),
Node::ExecuteStmt(node) => w::braced(s, &**node),
Node::ExplainStmt(node) => w::braced(s, &**node),
Node::FetchStmt(node) => w::braced(s, &**node),
Node::FuncCall(node) => w::braced(s, &**node),
Node::FunctionParameter(node) => w::braced(s, &**node),
Node::GrantRoleStmt(node) => w::braced(s, &**node),
Node::GrantStmt(node) => w::braced(s, &**node),
Node::GroupingFunc(node) => w::braced(s, &**node),
Node::GroupingSet(node) => w::braced(s, &**node),
Node::ImportForeignSchemaStmt(node) => w::braced(s, &**node),
Node::IndexElem(node) => w::braced(s, &**node),
Node::IndexStmt(node) => w::braced(s, &**node),
Node::InferClause(node) => w::braced(s, &**node),
Node::InsertStmt(node) => w::braced(s, &**node),
Node::IntoClause(node) => w::braced(s, &**node),
Node::JoinExpr(node) => w::braced(s, &**node),
Node::JsonAggConstructor(node) => w::braced(s, &**node),
Node::JsonArgument(node) => w::braced(s, &**node),
Node::JsonArrayAgg(node) => w::braced(s, &**node),
Node::JsonArrayConstructor(node) => w::braced(s, &**node),
Node::JsonArrayQueryConstructor(node) => w::braced(s, &**node),
Node::JsonBehavior(node) => w::braced(s, &**node),
Node::JsonFormat(node) => w::braced(s, &**node),
Node::JsonFuncExpr(node) => w::braced(s, &**node),
Node::JsonIsPredicate(node) => w::braced(s, &**node),
Node::JsonKeyValue(node) => w::braced(s, &**node),
Node::JsonObjectAgg(node) => w::braced(s, &**node),
Node::JsonObjectConstructor(node) => w::braced(s, &**node),
Node::JsonOutput(node) => w::braced(s, &**node),
Node::JsonParseExpr(node) => w::braced(s, &**node),
Node::JsonReturning(node) => w::braced(s, &**node),
Node::JsonScalarExpr(node) => w::braced(s, &**node),
Node::JsonSerializeExpr(node) => w::braced(s, &**node),
Node::JsonTable(node) => w::braced(s, &**node),
Node::JsonTableColumn(node) => w::braced(s, &**node),
Node::JsonTablePathSpec(node) => w::braced(s, &**node),
Node::JsonValueExpr(node) => w::braced(s, &**node),
Node::ListenStmt(node) => w::braced(s, &**node),
Node::LoadStmt(node) => w::braced(s, &**node),
Node::LockStmt(node) => w::braced(s, &**node),
Node::LockingClause(node) => w::braced(s, &**node),
Node::MergeStmt(node) => w::braced(s, &**node),
Node::MergeSupportFunc(node) => w::braced(s, &**node),
Node::MergeWhenClause(node) => w::braced(s, &**node),
Node::MinMaxExpr(node) => w::braced(s, &**node),
Node::MultiAssignRef(node) => w::braced(s, &**node),
Node::NamedArgExpr(node) => w::braced(s, &**node),
Node::NotifyStmt(node) => w::braced(s, &**node),
Node::NullTest(node) => w::braced(s, &**node),
Node::ObjectWithArgs(node) => w::braced(s, &**node),
Node::OnConflictClause(node) => w::braced(s, &**node),
Node::PLAssignStmt(node) => w::braced(s, &**node),
Node::ParamRef(node) => w::braced(s, &**node),
Node::PartitionBoundSpec(node) => w::braced(s, &**node),
Node::PartitionCmd(node) => w::braced(s, &**node),
Node::PartitionElem(node) => w::braced(s, &**node),
Node::PartitionSpec(node) => w::braced(s, &**node),
Node::PrepareStmt(node) => w::braced(s, &**node),
Node::PublicationAllObjSpec(node) => w::braced(s, &**node),
Node::PublicationObjSpec(node) => w::braced(s, &**node),
Node::PublicationTable(node) => w::braced(s, &**node),
Node::RangeFunction(node) => w::braced(s, &**node),
Node::RangeSubselect(node) => w::braced(s, &**node),
Node::RangeTableFunc(node) => w::braced(s, &**node),
Node::RangeTableFuncCol(node) => w::braced(s, &**node),
Node::RangeTableSample(node) => w::braced(s, &**node),
Node::RangeVar(node) => w::braced(s, &**node),
Node::RawStmt(node) => w::braced(s, &**node),
Node::ReassignOwnedStmt(node) => w::braced(s, &**node),
Node::RefreshMatViewStmt(node) => w::braced(s, &**node),
Node::ReindexStmt(node) => w::braced(s, &**node),
Node::RenameStmt(node) => w::braced(s, &**node),
Node::RepackStmt(node) => w::braced(s, &**node),
Node::ReplicaIdentityStmt(node) => w::braced(s, &**node),
Node::ResTarget(node) => w::braced(s, &**node),
Node::ReturnStmt(node) => w::braced(s, &**node),
Node::ReturningClause(node) => w::braced(s, &**node),
Node::ReturningOption(node) => w::braced(s, &**node),
Node::RoleSpec(node) => w::braced(s, &**node),
Node::RowExpr(node) => w::braced(s, &**node),
Node::RuleStmt(node) => w::braced(s, &**node),
Node::SQLValueFunction(node) => w::braced(s, &**node),
Node::SecLabelStmt(node) => w::braced(s, &**node),
Node::SelectStmt(node) => w::braced(s, &**node),
Node::SetToDefault(node) => w::braced(s, &**node),
Node::SortBy(node) => w::braced(s, &**node),
Node::StatsElem(node) => w::braced(s, &**node),
Node::SubLink(node) => w::braced(s, &**node),
Node::TableLikeClause(node) => w::braced(s, &**node),
Node::TransactionStmt(node) => w::braced(s, &**node),
Node::TriggerTransition(node) => w::braced(s, &**node),
Node::TruncateStmt(node) => w::braced(s, &**node),
Node::TypeCast(node) => w::braced(s, &**node),
Node::TypeName(node) => w::braced(s, &**node),
Node::UnlistenStmt(node) => w::braced(s, &**node),
Node::UpdateStmt(node) => w::braced(s, &**node),
Node::VacuumRelation(node) => w::braced(s, &**node),
Node::VacuumStmt(node) => w::braced(s, &**node),
Node::VariableSetStmt(node) => w::braced(s, &**node),
Node::VariableShowStmt(node) => w::braced(s, &**node),
Node::ViewStmt(node) => w::braced(s, &**node),
Node::WaitStmt(node) => w::braced(s, &**node),
Node::WindowDef(node) => w::braced(s, &**node),
Node::WithClause(node) => w::braced(s, &**node),
Node::XmlExpr(node) => w::braced(s, &**node),
Node::XmlSerialize(node) => w::braced(s, &**node),
}
}
}
impl Equal for Node {
fn equal(&self, other: &Node) -> bool {
match (self, other) {
(Node::List(a), Node::List(b)) => a.equal(b),
(Node::Integer(a), Node::Integer(b)) => a == b,
(Node::Float(a), Node::Float(b)) => a == b,
(Node::Boolean(a), Node::Boolean(b)) => a == b,
(Node::String(a), Node::String(b)) => a == b,
(Node::BitString(a), Node::BitString(b)) => a == b,
(Node::ATAlterConstraint(a), Node::ATAlterConstraint(b)) => a.equal(b),
(Node::A_ArrayExpr(a), Node::A_ArrayExpr(b)) => a.equal(b),
(Node::A_Const(a), Node::A_Const(b)) => a.equal(b),
(Node::A_Expr(a), Node::A_Expr(b)) => a.equal(b),
(Node::A_Indices(a), Node::A_Indices(b)) => a.equal(b),
(Node::A_Indirection(a), Node::A_Indirection(b)) => a.equal(b),
(Node::A_Star(a), Node::A_Star(b)) => a.equal(b),
(Node::AccessPriv(a), Node::AccessPriv(b)) => a.equal(b),
(Node::Alias(a), Node::Alias(b)) => a.equal(b),
(Node::AlterCollationStmt(a), Node::AlterCollationStmt(b)) => a.equal(b),
(Node::AlterDatabaseRefreshCollStmt(a), Node::AlterDatabaseRefreshCollStmt(b)) => {
a.equal(b)
}
(Node::AlterDatabaseSetStmt(a), Node::AlterDatabaseSetStmt(b)) => a.equal(b),
(Node::AlterDatabaseStmt(a), Node::AlterDatabaseStmt(b)) => a.equal(b),
(Node::AlterDefaultPrivilegesStmt(a), Node::AlterDefaultPrivilegesStmt(b)) => {
a.equal(b)
}
(Node::AlterDomainStmt(a), Node::AlterDomainStmt(b)) => a.equal(b),
(Node::AlterEnumStmt(a), Node::AlterEnumStmt(b)) => a.equal(b),
(Node::AlterEventTrigStmt(a), Node::AlterEventTrigStmt(b)) => a.equal(b),
(Node::AlterExtensionContentsStmt(a), Node::AlterExtensionContentsStmt(b)) => {
a.equal(b)
}
(Node::AlterExtensionStmt(a), Node::AlterExtensionStmt(b)) => a.equal(b),
(Node::AlterFdwStmt(a), Node::AlterFdwStmt(b)) => a.equal(b),
(Node::AlterForeignServerStmt(a), Node::AlterForeignServerStmt(b)) => a.equal(b),
(Node::AlterFunctionStmt(a), Node::AlterFunctionStmt(b)) => a.equal(b),
(Node::AlterObjectDependsStmt(a), Node::AlterObjectDependsStmt(b)) => a.equal(b),
(Node::AlterObjectSchemaStmt(a), Node::AlterObjectSchemaStmt(b)) => a.equal(b),
(Node::AlterOpFamilyStmt(a), Node::AlterOpFamilyStmt(b)) => a.equal(b),
(Node::AlterOperatorStmt(a), Node::AlterOperatorStmt(b)) => a.equal(b),
(Node::AlterOwnerStmt(a), Node::AlterOwnerStmt(b)) => a.equal(b),
(Node::AlterPolicyStmt(a), Node::AlterPolicyStmt(b)) => a.equal(b),
(Node::AlterPublicationStmt(a), Node::AlterPublicationStmt(b)) => a.equal(b),
(Node::AlterRoleSetStmt(a), Node::AlterRoleSetStmt(b)) => a.equal(b),
(Node::AlterRoleStmt(a), Node::AlterRoleStmt(b)) => a.equal(b),
(Node::AlterSeqStmt(a), Node::AlterSeqStmt(b)) => a.equal(b),
(Node::AlterStatsStmt(a), Node::AlterStatsStmt(b)) => a.equal(b),
(Node::AlterSubscriptionStmt(a), Node::AlterSubscriptionStmt(b)) => a.equal(b),
(Node::AlterSystemStmt(a), Node::AlterSystemStmt(b)) => a.equal(b),
(Node::AlterTSConfigurationStmt(a), Node::AlterTSConfigurationStmt(b)) => a.equal(b),
(Node::AlterTSDictionaryStmt(a), Node::AlterTSDictionaryStmt(b)) => a.equal(b),
(Node::AlterTableCmd(a), Node::AlterTableCmd(b)) => a.equal(b),
(Node::AlterTableMoveAllStmt(a), Node::AlterTableMoveAllStmt(b)) => a.equal(b),
(Node::AlterTableSpaceOptionsStmt(a), Node::AlterTableSpaceOptionsStmt(b)) => {
a.equal(b)
}
(Node::AlterTableStmt(a), Node::AlterTableStmt(b)) => a.equal(b),
(Node::AlterTypeStmt(a), Node::AlterTypeStmt(b)) => a.equal(b),
(Node::AlterUserMappingStmt(a), Node::AlterUserMappingStmt(b)) => a.equal(b),
(Node::BoolExpr(a), Node::BoolExpr(b)) => a.equal(b),
(Node::BooleanTest(a), Node::BooleanTest(b)) => a.equal(b),
(Node::CTECycleClause(a), Node::CTECycleClause(b)) => a.equal(b),
(Node::CTESearchClause(a), Node::CTESearchClause(b)) => a.equal(b),
(Node::CallStmt(a), Node::CallStmt(b)) => a.equal(b),
(Node::CaseExpr(a), Node::CaseExpr(b)) => a.equal(b),
(Node::CaseWhen(a), Node::CaseWhen(b)) => a.equal(b),
(Node::CheckPointStmt(a), Node::CheckPointStmt(b)) => a.equal(b),
(Node::ClosePortalStmt(a), Node::ClosePortalStmt(b)) => a.equal(b),
(Node::CoalesceExpr(a), Node::CoalesceExpr(b)) => a.equal(b),
(Node::CollateClause(a), Node::CollateClause(b)) => a.equal(b),
(Node::ColumnDef(a), Node::ColumnDef(b)) => a.equal(b),
(Node::ColumnRef(a), Node::ColumnRef(b)) => a.equal(b),
(Node::CommentStmt(a), Node::CommentStmt(b)) => a.equal(b),
(Node::CommonTableExpr(a), Node::CommonTableExpr(b)) => a.equal(b),
(Node::CompositeTypeStmt(a), Node::CompositeTypeStmt(b)) => a.equal(b),
(Node::Constraint(a), Node::Constraint(b)) => a.equal(b),
(Node::ConstraintsSetStmt(a), Node::ConstraintsSetStmt(b)) => a.equal(b),
(Node::CopyStmt(a), Node::CopyStmt(b)) => a.equal(b),
(Node::CreateAmStmt(a), Node::CreateAmStmt(b)) => a.equal(b),
(Node::CreateCastStmt(a), Node::CreateCastStmt(b)) => a.equal(b),
(Node::CreateConversionStmt(a), Node::CreateConversionStmt(b)) => a.equal(b),
(Node::CreateDomainStmt(a), Node::CreateDomainStmt(b)) => a.equal(b),
(Node::CreateEnumStmt(a), Node::CreateEnumStmt(b)) => a.equal(b),
(Node::CreateEventTrigStmt(a), Node::CreateEventTrigStmt(b)) => a.equal(b),
(Node::CreateExtensionStmt(a), Node::CreateExtensionStmt(b)) => a.equal(b),
(Node::CreateFdwStmt(a), Node::CreateFdwStmt(b)) => a.equal(b),
(Node::CreateForeignServerStmt(a), Node::CreateForeignServerStmt(b)) => a.equal(b),
(Node::CreateForeignTableStmt(a), Node::CreateForeignTableStmt(b)) => a.equal(b),
(Node::CreateFunctionStmt(a), Node::CreateFunctionStmt(b)) => a.equal(b),
(Node::CreateOpClassItem(a), Node::CreateOpClassItem(b)) => a.equal(b),
(Node::CreateOpClassStmt(a), Node::CreateOpClassStmt(b)) => a.equal(b),
(Node::CreateOpFamilyStmt(a), Node::CreateOpFamilyStmt(b)) => a.equal(b),
(Node::CreatePLangStmt(a), Node::CreatePLangStmt(b)) => a.equal(b),
(Node::CreatePolicyStmt(a), Node::CreatePolicyStmt(b)) => a.equal(b),
(Node::CreatePublicationStmt(a), Node::CreatePublicationStmt(b)) => a.equal(b),
(Node::CreateRangeStmt(a), Node::CreateRangeStmt(b)) => a.equal(b),
(Node::CreateRoleStmt(a), Node::CreateRoleStmt(b)) => a.equal(b),
(Node::CreateSchemaStmt(a), Node::CreateSchemaStmt(b)) => a.equal(b),
(Node::CreateSeqStmt(a), Node::CreateSeqStmt(b)) => a.equal(b),
(Node::CreateStatsStmt(a), Node::CreateStatsStmt(b)) => a.equal(b),
(Node::CreateStmt(a), Node::CreateStmt(b)) => a.equal(b),
(Node::CreateSubscriptionStmt(a), Node::CreateSubscriptionStmt(b)) => a.equal(b),
(Node::CreateTableAsStmt(a), Node::CreateTableAsStmt(b)) => a.equal(b),
(Node::CreateTableSpaceStmt(a), Node::CreateTableSpaceStmt(b)) => a.equal(b),
(Node::CreateTransformStmt(a), Node::CreateTransformStmt(b)) => a.equal(b),
(Node::CreateTrigStmt(a), Node::CreateTrigStmt(b)) => a.equal(b),
(Node::CreateUserMappingStmt(a), Node::CreateUserMappingStmt(b)) => a.equal(b),
(Node::CreatedbStmt(a), Node::CreatedbStmt(b)) => a.equal(b),
(Node::CurrentOfExpr(a), Node::CurrentOfExpr(b)) => a.equal(b),
(Node::DeallocateStmt(a), Node::DeallocateStmt(b)) => a.equal(b),
(Node::DeclareCursorStmt(a), Node::DeclareCursorStmt(b)) => a.equal(b),
(Node::DefElem(a), Node::DefElem(b)) => a.equal(b),
(Node::DefineStmt(a), Node::DefineStmt(b)) => a.equal(b),
(Node::DeleteStmt(a), Node::DeleteStmt(b)) => a.equal(b),
(Node::DiscardStmt(a), Node::DiscardStmt(b)) => a.equal(b),
(Node::DoStmt(a), Node::DoStmt(b)) => a.equal(b),
(Node::DropOwnedStmt(a), Node::DropOwnedStmt(b)) => a.equal(b),
(Node::DropRoleStmt(a), Node::DropRoleStmt(b)) => a.equal(b),
(Node::DropStmt(a), Node::DropStmt(b)) => a.equal(b),
(Node::DropSubscriptionStmt(a), Node::DropSubscriptionStmt(b)) => a.equal(b),
(Node::DropTableSpaceStmt(a), Node::DropTableSpaceStmt(b)) => a.equal(b),
(Node::DropUserMappingStmt(a), Node::DropUserMappingStmt(b)) => a.equal(b),
(Node::DropdbStmt(a), Node::DropdbStmt(b)) => a.equal(b),
(Node::ExecuteStmt(a), Node::ExecuteStmt(b)) => a.equal(b),
(Node::ExplainStmt(a), Node::ExplainStmt(b)) => a.equal(b),
(Node::FetchStmt(a), Node::FetchStmt(b)) => a.equal(b),
(Node::FuncCall(a), Node::FuncCall(b)) => a.equal(b),
(Node::FunctionParameter(a), Node::FunctionParameter(b)) => a.equal(b),
(Node::GrantRoleStmt(a), Node::GrantRoleStmt(b)) => a.equal(b),
(Node::GrantStmt(a), Node::GrantStmt(b)) => a.equal(b),
(Node::GroupingFunc(a), Node::GroupingFunc(b)) => a.equal(b),
(Node::GroupingSet(a), Node::GroupingSet(b)) => a.equal(b),
(Node::ImportForeignSchemaStmt(a), Node::ImportForeignSchemaStmt(b)) => a.equal(b),
(Node::IndexElem(a), Node::IndexElem(b)) => a.equal(b),
(Node::IndexStmt(a), Node::IndexStmt(b)) => a.equal(b),
(Node::InferClause(a), Node::InferClause(b)) => a.equal(b),
(Node::InsertStmt(a), Node::InsertStmt(b)) => a.equal(b),
(Node::IntoClause(a), Node::IntoClause(b)) => a.equal(b),
(Node::JoinExpr(a), Node::JoinExpr(b)) => a.equal(b),
(Node::JsonAggConstructor(a), Node::JsonAggConstructor(b)) => a.equal(b),
(Node::JsonArgument(a), Node::JsonArgument(b)) => a.equal(b),
(Node::JsonArrayAgg(a), Node::JsonArrayAgg(b)) => a.equal(b),
(Node::JsonArrayConstructor(a), Node::JsonArrayConstructor(b)) => a.equal(b),
(Node::JsonArrayQueryConstructor(a), Node::JsonArrayQueryConstructor(b)) => a.equal(b),
(Node::JsonBehavior(a), Node::JsonBehavior(b)) => a.equal(b),
(Node::JsonFormat(a), Node::JsonFormat(b)) => a.equal(b),
(Node::JsonFuncExpr(a), Node::JsonFuncExpr(b)) => a.equal(b),
(Node::JsonIsPredicate(a), Node::JsonIsPredicate(b)) => a.equal(b),
(Node::JsonKeyValue(a), Node::JsonKeyValue(b)) => a.equal(b),
(Node::JsonObjectAgg(a), Node::JsonObjectAgg(b)) => a.equal(b),
(Node::JsonObjectConstructor(a), Node::JsonObjectConstructor(b)) => a.equal(b),
(Node::JsonOutput(a), Node::JsonOutput(b)) => a.equal(b),
(Node::JsonParseExpr(a), Node::JsonParseExpr(b)) => a.equal(b),
(Node::JsonReturning(a), Node::JsonReturning(b)) => a.equal(b),
(Node::JsonScalarExpr(a), Node::JsonScalarExpr(b)) => a.equal(b),
(Node::JsonSerializeExpr(a), Node::JsonSerializeExpr(b)) => a.equal(b),
(Node::JsonTable(a), Node::JsonTable(b)) => a.equal(b),
(Node::JsonTableColumn(a), Node::JsonTableColumn(b)) => a.equal(b),
(Node::JsonTablePathSpec(a), Node::JsonTablePathSpec(b)) => a.equal(b),
(Node::JsonValueExpr(a), Node::JsonValueExpr(b)) => a.equal(b),
(Node::ListenStmt(a), Node::ListenStmt(b)) => a.equal(b),
(Node::LoadStmt(a), Node::LoadStmt(b)) => a.equal(b),
(Node::LockStmt(a), Node::LockStmt(b)) => a.equal(b),
(Node::LockingClause(a), Node::LockingClause(b)) => a.equal(b),
(Node::MergeStmt(a), Node::MergeStmt(b)) => a.equal(b),
(Node::MergeSupportFunc(a), Node::MergeSupportFunc(b)) => a.equal(b),
(Node::MergeWhenClause(a), Node::MergeWhenClause(b)) => a.equal(b),
(Node::MinMaxExpr(a), Node::MinMaxExpr(b)) => a.equal(b),
(Node::MultiAssignRef(a), Node::MultiAssignRef(b)) => a.equal(b),
(Node::NamedArgExpr(a), Node::NamedArgExpr(b)) => a.equal(b),
(Node::NotifyStmt(a), Node::NotifyStmt(b)) => a.equal(b),
(Node::NullTest(a), Node::NullTest(b)) => a.equal(b),
(Node::ObjectWithArgs(a), Node::ObjectWithArgs(b)) => a.equal(b),
(Node::OnConflictClause(a), Node::OnConflictClause(b)) => a.equal(b),
(Node::PLAssignStmt(a), Node::PLAssignStmt(b)) => a.equal(b),
(Node::ParamRef(a), Node::ParamRef(b)) => a.equal(b),
(Node::PartitionBoundSpec(a), Node::PartitionBoundSpec(b)) => a.equal(b),
(Node::PartitionCmd(a), Node::PartitionCmd(b)) => a.equal(b),
(Node::PartitionElem(a), Node::PartitionElem(b)) => a.equal(b),
(Node::PartitionSpec(a), Node::PartitionSpec(b)) => a.equal(b),
(Node::PrepareStmt(a), Node::PrepareStmt(b)) => a.equal(b),
(Node::PublicationAllObjSpec(a), Node::PublicationAllObjSpec(b)) => a.equal(b),
(Node::PublicationObjSpec(a), Node::PublicationObjSpec(b)) => a.equal(b),
(Node::PublicationTable(a), Node::PublicationTable(b)) => a.equal(b),
(Node::RangeFunction(a), Node::RangeFunction(b)) => a.equal(b),
(Node::RangeSubselect(a), Node::RangeSubselect(b)) => a.equal(b),
(Node::RangeTableFunc(a), Node::RangeTableFunc(b)) => a.equal(b),
(Node::RangeTableFuncCol(a), Node::RangeTableFuncCol(b)) => a.equal(b),
(Node::RangeTableSample(a), Node::RangeTableSample(b)) => a.equal(b),
(Node::RangeVar(a), Node::RangeVar(b)) => a.equal(b),
(Node::RawStmt(a), Node::RawStmt(b)) => a.equal(b),
(Node::ReassignOwnedStmt(a), Node::ReassignOwnedStmt(b)) => a.equal(b),
(Node::RefreshMatViewStmt(a), Node::RefreshMatViewStmt(b)) => a.equal(b),
(Node::ReindexStmt(a), Node::ReindexStmt(b)) => a.equal(b),
(Node::RenameStmt(a), Node::RenameStmt(b)) => a.equal(b),
(Node::RepackStmt(a), Node::RepackStmt(b)) => a.equal(b),
(Node::ReplicaIdentityStmt(a), Node::ReplicaIdentityStmt(b)) => a.equal(b),
(Node::ResTarget(a), Node::ResTarget(b)) => a.equal(b),
(Node::ReturnStmt(a), Node::ReturnStmt(b)) => a.equal(b),
(Node::ReturningClause(a), Node::ReturningClause(b)) => a.equal(b),
(Node::ReturningOption(a), Node::ReturningOption(b)) => a.equal(b),
(Node::RoleSpec(a), Node::RoleSpec(b)) => a.equal(b),
(Node::RowExpr(a), Node::RowExpr(b)) => a.equal(b),
(Node::RuleStmt(a), Node::RuleStmt(b)) => a.equal(b),
(Node::SQLValueFunction(a), Node::SQLValueFunction(b)) => a.equal(b),
(Node::SecLabelStmt(a), Node::SecLabelStmt(b)) => a.equal(b),
(Node::SelectStmt(a), Node::SelectStmt(b)) => a.equal(b),
(Node::SetToDefault(a), Node::SetToDefault(b)) => a.equal(b),
(Node::SortBy(a), Node::SortBy(b)) => a.equal(b),
(Node::StatsElem(a), Node::StatsElem(b)) => a.equal(b),
(Node::SubLink(a), Node::SubLink(b)) => a.equal(b),
(Node::TableLikeClause(a), Node::TableLikeClause(b)) => a.equal(b),
(Node::TransactionStmt(a), Node::TransactionStmt(b)) => a.equal(b),
(Node::TriggerTransition(a), Node::TriggerTransition(b)) => a.equal(b),
(Node::TruncateStmt(a), Node::TruncateStmt(b)) => a.equal(b),
(Node::TypeCast(a), Node::TypeCast(b)) => a.equal(b),
(Node::TypeName(a), Node::TypeName(b)) => a.equal(b),
(Node::UnlistenStmt(a), Node::UnlistenStmt(b)) => a.equal(b),
(Node::UpdateStmt(a), Node::UpdateStmt(b)) => a.equal(b),
(Node::VacuumRelation(a), Node::VacuumRelation(b)) => a.equal(b),
(Node::VacuumStmt(a), Node::VacuumStmt(b)) => a.equal(b),
(Node::VariableSetStmt(a), Node::VariableSetStmt(b)) => a.equal(b),
(Node::VariableShowStmt(a), Node::VariableShowStmt(b)) => a.equal(b),
(Node::ViewStmt(a), Node::ViewStmt(b)) => a.equal(b),
(Node::WaitStmt(a), Node::WaitStmt(b)) => a.equal(b),
(Node::WindowDef(a), Node::WindowDef(b)) => a.equal(b),
(Node::WithClause(a), Node::WithClause(b)) => a.equal(b),
(Node::XmlExpr(a), Node::XmlExpr(b)) => a.equal(b),
(Node::XmlSerialize(a), Node::XmlSerialize(b)) => a.equal(b),
_ => false,
}
}
}
impl NodeType for ATAlterConstraint {
fn into_node(self: Box<Self>) -> Node {
Node::ATAlterConstraint(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ATAlterConstraint(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ATAlterConstraint(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ATAlterConstraint(node) => Some(node),
_ => None,
}
}
}
impl From<ATAlterConstraint> for Node {
fn from(node: ATAlterConstraint) -> Node {
Node::ATAlterConstraint(Box::new(node))
}
}
impl NodeType for A_ArrayExpr {
fn into_node(self: Box<Self>) -> Node {
Node::A_ArrayExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::A_ArrayExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::A_ArrayExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::A_ArrayExpr(node) => Some(node),
_ => None,
}
}
}
impl From<A_ArrayExpr> for Node {
fn from(node: A_ArrayExpr) -> Node {
Node::A_ArrayExpr(Box::new(node))
}
}
impl NodeType for A_Const {
fn into_node(self: Box<Self>) -> Node {
Node::A_Const(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::A_Const(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::A_Const(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::A_Const(node) => Some(node),
_ => None,
}
}
}
impl From<A_Const> for Node {
fn from(node: A_Const) -> Node {
Node::A_Const(Box::new(node))
}
}
impl NodeType for A_Expr {
fn into_node(self: Box<Self>) -> Node {
Node::A_Expr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::A_Expr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::A_Expr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::A_Expr(node) => Some(node),
_ => None,
}
}
}
impl From<A_Expr> for Node {
fn from(node: A_Expr) -> Node {
Node::A_Expr(Box::new(node))
}
}
impl NodeType for A_Indices {
fn into_node(self: Box<Self>) -> Node {
Node::A_Indices(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::A_Indices(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::A_Indices(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::A_Indices(node) => Some(node),
_ => None,
}
}
}
impl From<A_Indices> for Node {
fn from(node: A_Indices) -> Node {
Node::A_Indices(Box::new(node))
}
}
impl NodeType for A_Indirection {
fn into_node(self: Box<Self>) -> Node {
Node::A_Indirection(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::A_Indirection(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::A_Indirection(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::A_Indirection(node) => Some(node),
_ => None,
}
}
}
impl From<A_Indirection> for Node {
fn from(node: A_Indirection) -> Node {
Node::A_Indirection(Box::new(node))
}
}
impl NodeType for A_Star {
fn into_node(self: Box<Self>) -> Node {
Node::A_Star(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::A_Star(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::A_Star(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::A_Star(node) => Some(node),
_ => None,
}
}
}
impl From<A_Star> for Node {
fn from(node: A_Star) -> Node {
Node::A_Star(Box::new(node))
}
}
impl NodeType for AccessPriv {
fn into_node(self: Box<Self>) -> Node {
Node::AccessPriv(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AccessPriv(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AccessPriv(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AccessPriv(node) => Some(node),
_ => None,
}
}
}
impl From<AccessPriv> for Node {
fn from(node: AccessPriv) -> Node {
Node::AccessPriv(Box::new(node))
}
}
impl NodeType for Alias {
fn into_node(self: Box<Self>) -> Node {
Node::Alias(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::Alias(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::Alias(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::Alias(node) => Some(node),
_ => None,
}
}
}
impl From<Alias> for Node {
fn from(node: Alias) -> Node {
Node::Alias(Box::new(node))
}
}
impl NodeType for AlterCollationStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterCollationStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterCollationStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterCollationStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterCollationStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterCollationStmt> for Node {
fn from(node: AlterCollationStmt) -> Node {
Node::AlterCollationStmt(Box::new(node))
}
}
impl NodeType for AlterDatabaseRefreshCollStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterDatabaseRefreshCollStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterDatabaseRefreshCollStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterDatabaseRefreshCollStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterDatabaseRefreshCollStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterDatabaseRefreshCollStmt> for Node {
fn from(node: AlterDatabaseRefreshCollStmt) -> Node {
Node::AlterDatabaseRefreshCollStmt(Box::new(node))
}
}
impl NodeType for AlterDatabaseSetStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterDatabaseSetStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterDatabaseSetStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterDatabaseSetStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterDatabaseSetStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterDatabaseSetStmt> for Node {
fn from(node: AlterDatabaseSetStmt) -> Node {
Node::AlterDatabaseSetStmt(Box::new(node))
}
}
impl NodeType for AlterDatabaseStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterDatabaseStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterDatabaseStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterDatabaseStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterDatabaseStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterDatabaseStmt> for Node {
fn from(node: AlterDatabaseStmt) -> Node {
Node::AlterDatabaseStmt(Box::new(node))
}
}
impl NodeType for AlterDefaultPrivilegesStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterDefaultPrivilegesStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterDefaultPrivilegesStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterDefaultPrivilegesStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterDefaultPrivilegesStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterDefaultPrivilegesStmt> for Node {
fn from(node: AlterDefaultPrivilegesStmt) -> Node {
Node::AlterDefaultPrivilegesStmt(Box::new(node))
}
}
impl NodeType for AlterDomainStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterDomainStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterDomainStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterDomainStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterDomainStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterDomainStmt> for Node {
fn from(node: AlterDomainStmt) -> Node {
Node::AlterDomainStmt(Box::new(node))
}
}
impl NodeType for AlterEnumStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterEnumStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterEnumStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterEnumStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterEnumStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterEnumStmt> for Node {
fn from(node: AlterEnumStmt) -> Node {
Node::AlterEnumStmt(Box::new(node))
}
}
impl NodeType for AlterEventTrigStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterEventTrigStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterEventTrigStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterEventTrigStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterEventTrigStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterEventTrigStmt> for Node {
fn from(node: AlterEventTrigStmt) -> Node {
Node::AlterEventTrigStmt(Box::new(node))
}
}
impl NodeType for AlterExtensionContentsStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterExtensionContentsStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterExtensionContentsStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterExtensionContentsStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterExtensionContentsStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterExtensionContentsStmt> for Node {
fn from(node: AlterExtensionContentsStmt) -> Node {
Node::AlterExtensionContentsStmt(Box::new(node))
}
}
impl NodeType for AlterExtensionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterExtensionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterExtensionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterExtensionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterExtensionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterExtensionStmt> for Node {
fn from(node: AlterExtensionStmt) -> Node {
Node::AlterExtensionStmt(Box::new(node))
}
}
impl NodeType for AlterFdwStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterFdwStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterFdwStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterFdwStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterFdwStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterFdwStmt> for Node {
fn from(node: AlterFdwStmt) -> Node {
Node::AlterFdwStmt(Box::new(node))
}
}
impl NodeType for AlterForeignServerStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterForeignServerStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterForeignServerStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterForeignServerStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterForeignServerStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterForeignServerStmt> for Node {
fn from(node: AlterForeignServerStmt) -> Node {
Node::AlterForeignServerStmt(Box::new(node))
}
}
impl NodeType for AlterFunctionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterFunctionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterFunctionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterFunctionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterFunctionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterFunctionStmt> for Node {
fn from(node: AlterFunctionStmt) -> Node {
Node::AlterFunctionStmt(Box::new(node))
}
}
impl NodeType for AlterObjectDependsStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterObjectDependsStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterObjectDependsStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterObjectDependsStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterObjectDependsStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterObjectDependsStmt> for Node {
fn from(node: AlterObjectDependsStmt) -> Node {
Node::AlterObjectDependsStmt(Box::new(node))
}
}
impl NodeType for AlterObjectSchemaStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterObjectSchemaStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterObjectSchemaStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterObjectSchemaStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterObjectSchemaStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterObjectSchemaStmt> for Node {
fn from(node: AlterObjectSchemaStmt) -> Node {
Node::AlterObjectSchemaStmt(Box::new(node))
}
}
impl NodeType for AlterOpFamilyStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterOpFamilyStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterOpFamilyStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterOpFamilyStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterOpFamilyStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterOpFamilyStmt> for Node {
fn from(node: AlterOpFamilyStmt) -> Node {
Node::AlterOpFamilyStmt(Box::new(node))
}
}
impl NodeType for AlterOperatorStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterOperatorStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterOperatorStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterOperatorStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterOperatorStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterOperatorStmt> for Node {
fn from(node: AlterOperatorStmt) -> Node {
Node::AlterOperatorStmt(Box::new(node))
}
}
impl NodeType for AlterOwnerStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterOwnerStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterOwnerStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterOwnerStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterOwnerStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterOwnerStmt> for Node {
fn from(node: AlterOwnerStmt) -> Node {
Node::AlterOwnerStmt(Box::new(node))
}
}
impl NodeType for AlterPolicyStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterPolicyStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterPolicyStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterPolicyStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterPolicyStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterPolicyStmt> for Node {
fn from(node: AlterPolicyStmt) -> Node {
Node::AlterPolicyStmt(Box::new(node))
}
}
impl NodeType for AlterPublicationStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterPublicationStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterPublicationStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterPublicationStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterPublicationStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterPublicationStmt> for Node {
fn from(node: AlterPublicationStmt) -> Node {
Node::AlterPublicationStmt(Box::new(node))
}
}
impl NodeType for AlterRoleSetStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterRoleSetStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterRoleSetStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterRoleSetStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterRoleSetStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterRoleSetStmt> for Node {
fn from(node: AlterRoleSetStmt) -> Node {
Node::AlterRoleSetStmt(Box::new(node))
}
}
impl NodeType for AlterRoleStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterRoleStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterRoleStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterRoleStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterRoleStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterRoleStmt> for Node {
fn from(node: AlterRoleStmt) -> Node {
Node::AlterRoleStmt(Box::new(node))
}
}
impl NodeType for AlterSeqStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterSeqStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterSeqStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterSeqStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterSeqStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterSeqStmt> for Node {
fn from(node: AlterSeqStmt) -> Node {
Node::AlterSeqStmt(Box::new(node))
}
}
impl NodeType for AlterStatsStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterStatsStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterStatsStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterStatsStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterStatsStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterStatsStmt> for Node {
fn from(node: AlterStatsStmt) -> Node {
Node::AlterStatsStmt(Box::new(node))
}
}
impl NodeType for AlterSubscriptionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterSubscriptionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterSubscriptionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterSubscriptionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterSubscriptionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterSubscriptionStmt> for Node {
fn from(node: AlterSubscriptionStmt) -> Node {
Node::AlterSubscriptionStmt(Box::new(node))
}
}
impl NodeType for AlterSystemStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterSystemStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterSystemStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterSystemStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterSystemStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterSystemStmt> for Node {
fn from(node: AlterSystemStmt) -> Node {
Node::AlterSystemStmt(Box::new(node))
}
}
impl NodeType for AlterTSConfigurationStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterTSConfigurationStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterTSConfigurationStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterTSConfigurationStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterTSConfigurationStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterTSConfigurationStmt> for Node {
fn from(node: AlterTSConfigurationStmt) -> Node {
Node::AlterTSConfigurationStmt(Box::new(node))
}
}
impl NodeType for AlterTSDictionaryStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterTSDictionaryStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterTSDictionaryStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterTSDictionaryStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterTSDictionaryStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterTSDictionaryStmt> for Node {
fn from(node: AlterTSDictionaryStmt) -> Node {
Node::AlterTSDictionaryStmt(Box::new(node))
}
}
impl NodeType for AlterTableCmd {
fn into_node(self: Box<Self>) -> Node {
Node::AlterTableCmd(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterTableCmd(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterTableCmd(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterTableCmd(node) => Some(node),
_ => None,
}
}
}
impl From<AlterTableCmd> for Node {
fn from(node: AlterTableCmd) -> Node {
Node::AlterTableCmd(Box::new(node))
}
}
impl NodeType for AlterTableMoveAllStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterTableMoveAllStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterTableMoveAllStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterTableMoveAllStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterTableMoveAllStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterTableMoveAllStmt> for Node {
fn from(node: AlterTableMoveAllStmt) -> Node {
Node::AlterTableMoveAllStmt(Box::new(node))
}
}
impl NodeType for AlterTableSpaceOptionsStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterTableSpaceOptionsStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterTableSpaceOptionsStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterTableSpaceOptionsStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterTableSpaceOptionsStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterTableSpaceOptionsStmt> for Node {
fn from(node: AlterTableSpaceOptionsStmt) -> Node {
Node::AlterTableSpaceOptionsStmt(Box::new(node))
}
}
impl NodeType for AlterTableStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterTableStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterTableStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterTableStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterTableStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterTableStmt> for Node {
fn from(node: AlterTableStmt) -> Node {
Node::AlterTableStmt(Box::new(node))
}
}
impl NodeType for AlterTypeStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterTypeStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterTypeStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterTypeStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterTypeStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterTypeStmt> for Node {
fn from(node: AlterTypeStmt) -> Node {
Node::AlterTypeStmt(Box::new(node))
}
}
impl NodeType for AlterUserMappingStmt {
fn into_node(self: Box<Self>) -> Node {
Node::AlterUserMappingStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::AlterUserMappingStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::AlterUserMappingStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::AlterUserMappingStmt(node) => Some(node),
_ => None,
}
}
}
impl From<AlterUserMappingStmt> for Node {
fn from(node: AlterUserMappingStmt) -> Node {
Node::AlterUserMappingStmt(Box::new(node))
}
}
impl NodeType for BoolExpr {
fn into_node(self: Box<Self>) -> Node {
Node::BoolExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::BoolExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::BoolExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::BoolExpr(node) => Some(node),
_ => None,
}
}
}
impl From<BoolExpr> for Node {
fn from(node: BoolExpr) -> Node {
Node::BoolExpr(Box::new(node))
}
}
impl NodeType for BooleanTest {
fn into_node(self: Box<Self>) -> Node {
Node::BooleanTest(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::BooleanTest(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::BooleanTest(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::BooleanTest(node) => Some(node),
_ => None,
}
}
}
impl From<BooleanTest> for Node {
fn from(node: BooleanTest) -> Node {
Node::BooleanTest(Box::new(node))
}
}
impl NodeType for CTECycleClause {
fn into_node(self: Box<Self>) -> Node {
Node::CTECycleClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CTECycleClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CTECycleClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CTECycleClause(node) => Some(node),
_ => None,
}
}
}
impl From<CTECycleClause> for Node {
fn from(node: CTECycleClause) -> Node {
Node::CTECycleClause(Box::new(node))
}
}
impl NodeType for CTESearchClause {
fn into_node(self: Box<Self>) -> Node {
Node::CTESearchClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CTESearchClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CTESearchClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CTESearchClause(node) => Some(node),
_ => None,
}
}
}
impl From<CTESearchClause> for Node {
fn from(node: CTESearchClause) -> Node {
Node::CTESearchClause(Box::new(node))
}
}
impl NodeType for CallStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CallStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CallStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CallStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CallStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CallStmt> for Node {
fn from(node: CallStmt) -> Node {
Node::CallStmt(Box::new(node))
}
}
impl NodeType for CaseExpr {
fn into_node(self: Box<Self>) -> Node {
Node::CaseExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CaseExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CaseExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CaseExpr(node) => Some(node),
_ => None,
}
}
}
impl From<CaseExpr> for Node {
fn from(node: CaseExpr) -> Node {
Node::CaseExpr(Box::new(node))
}
}
impl NodeType for CaseWhen {
fn into_node(self: Box<Self>) -> Node {
Node::CaseWhen(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CaseWhen(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CaseWhen(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CaseWhen(node) => Some(node),
_ => None,
}
}
}
impl From<CaseWhen> for Node {
fn from(node: CaseWhen) -> Node {
Node::CaseWhen(Box::new(node))
}
}
impl NodeType for CheckPointStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CheckPointStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CheckPointStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CheckPointStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CheckPointStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CheckPointStmt> for Node {
fn from(node: CheckPointStmt) -> Node {
Node::CheckPointStmt(Box::new(node))
}
}
impl NodeType for ClosePortalStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ClosePortalStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ClosePortalStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ClosePortalStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ClosePortalStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ClosePortalStmt> for Node {
fn from(node: ClosePortalStmt) -> Node {
Node::ClosePortalStmt(Box::new(node))
}
}
impl NodeType for CoalesceExpr {
fn into_node(self: Box<Self>) -> Node {
Node::CoalesceExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CoalesceExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CoalesceExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CoalesceExpr(node) => Some(node),
_ => None,
}
}
}
impl From<CoalesceExpr> for Node {
fn from(node: CoalesceExpr) -> Node {
Node::CoalesceExpr(Box::new(node))
}
}
impl NodeType for CollateClause {
fn into_node(self: Box<Self>) -> Node {
Node::CollateClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CollateClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CollateClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CollateClause(node) => Some(node),
_ => None,
}
}
}
impl From<CollateClause> for Node {
fn from(node: CollateClause) -> Node {
Node::CollateClause(Box::new(node))
}
}
impl NodeType for ColumnDef {
fn into_node(self: Box<Self>) -> Node {
Node::ColumnDef(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ColumnDef(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ColumnDef(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ColumnDef(node) => Some(node),
_ => None,
}
}
}
impl From<ColumnDef> for Node {
fn from(node: ColumnDef) -> Node {
Node::ColumnDef(Box::new(node))
}
}
impl NodeType for ColumnRef {
fn into_node(self: Box<Self>) -> Node {
Node::ColumnRef(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ColumnRef(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ColumnRef(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ColumnRef(node) => Some(node),
_ => None,
}
}
}
impl From<ColumnRef> for Node {
fn from(node: ColumnRef) -> Node {
Node::ColumnRef(Box::new(node))
}
}
impl NodeType for CommentStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CommentStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CommentStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CommentStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CommentStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CommentStmt> for Node {
fn from(node: CommentStmt) -> Node {
Node::CommentStmt(Box::new(node))
}
}
impl NodeType for CommonTableExpr {
fn into_node(self: Box<Self>) -> Node {
Node::CommonTableExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CommonTableExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CommonTableExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CommonTableExpr(node) => Some(node),
_ => None,
}
}
}
impl From<CommonTableExpr> for Node {
fn from(node: CommonTableExpr) -> Node {
Node::CommonTableExpr(Box::new(node))
}
}
impl NodeType for CompositeTypeStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CompositeTypeStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CompositeTypeStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CompositeTypeStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CompositeTypeStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CompositeTypeStmt> for Node {
fn from(node: CompositeTypeStmt) -> Node {
Node::CompositeTypeStmt(Box::new(node))
}
}
impl NodeType for Constraint {
fn into_node(self: Box<Self>) -> Node {
Node::Constraint(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::Constraint(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::Constraint(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::Constraint(node) => Some(node),
_ => None,
}
}
}
impl From<Constraint> for Node {
fn from(node: Constraint) -> Node {
Node::Constraint(Box::new(node))
}
}
impl NodeType for ConstraintsSetStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ConstraintsSetStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ConstraintsSetStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ConstraintsSetStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ConstraintsSetStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ConstraintsSetStmt> for Node {
fn from(node: ConstraintsSetStmt) -> Node {
Node::ConstraintsSetStmt(Box::new(node))
}
}
impl NodeType for CopyStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CopyStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CopyStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CopyStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CopyStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CopyStmt> for Node {
fn from(node: CopyStmt) -> Node {
Node::CopyStmt(Box::new(node))
}
}
impl NodeType for CreateAmStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateAmStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateAmStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateAmStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateAmStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateAmStmt> for Node {
fn from(node: CreateAmStmt) -> Node {
Node::CreateAmStmt(Box::new(node))
}
}
impl NodeType for CreateCastStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateCastStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateCastStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateCastStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateCastStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateCastStmt> for Node {
fn from(node: CreateCastStmt) -> Node {
Node::CreateCastStmt(Box::new(node))
}
}
impl NodeType for CreateConversionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateConversionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateConversionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateConversionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateConversionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateConversionStmt> for Node {
fn from(node: CreateConversionStmt) -> Node {
Node::CreateConversionStmt(Box::new(node))
}
}
impl NodeType for CreateDomainStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateDomainStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateDomainStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateDomainStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateDomainStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateDomainStmt> for Node {
fn from(node: CreateDomainStmt) -> Node {
Node::CreateDomainStmt(Box::new(node))
}
}
impl NodeType for CreateEnumStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateEnumStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateEnumStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateEnumStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateEnumStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateEnumStmt> for Node {
fn from(node: CreateEnumStmt) -> Node {
Node::CreateEnumStmt(Box::new(node))
}
}
impl NodeType for CreateEventTrigStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateEventTrigStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateEventTrigStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateEventTrigStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateEventTrigStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateEventTrigStmt> for Node {
fn from(node: CreateEventTrigStmt) -> Node {
Node::CreateEventTrigStmt(Box::new(node))
}
}
impl NodeType for CreateExtensionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateExtensionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateExtensionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateExtensionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateExtensionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateExtensionStmt> for Node {
fn from(node: CreateExtensionStmt) -> Node {
Node::CreateExtensionStmt(Box::new(node))
}
}
impl NodeType for CreateFdwStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateFdwStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateFdwStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateFdwStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateFdwStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateFdwStmt> for Node {
fn from(node: CreateFdwStmt) -> Node {
Node::CreateFdwStmt(Box::new(node))
}
}
impl NodeType for CreateForeignServerStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateForeignServerStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateForeignServerStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateForeignServerStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateForeignServerStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateForeignServerStmt> for Node {
fn from(node: CreateForeignServerStmt) -> Node {
Node::CreateForeignServerStmt(Box::new(node))
}
}
impl NodeType for CreateForeignTableStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateForeignTableStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateForeignTableStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateForeignTableStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateForeignTableStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateForeignTableStmt> for Node {
fn from(node: CreateForeignTableStmt) -> Node {
Node::CreateForeignTableStmt(Box::new(node))
}
}
impl NodeType for CreateFunctionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateFunctionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateFunctionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateFunctionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateFunctionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateFunctionStmt> for Node {
fn from(node: CreateFunctionStmt) -> Node {
Node::CreateFunctionStmt(Box::new(node))
}
}
impl NodeType for CreateOpClassItem {
fn into_node(self: Box<Self>) -> Node {
Node::CreateOpClassItem(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateOpClassItem(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateOpClassItem(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateOpClassItem(node) => Some(node),
_ => None,
}
}
}
impl From<CreateOpClassItem> for Node {
fn from(node: CreateOpClassItem) -> Node {
Node::CreateOpClassItem(Box::new(node))
}
}
impl NodeType for CreateOpClassStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateOpClassStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateOpClassStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateOpClassStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateOpClassStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateOpClassStmt> for Node {
fn from(node: CreateOpClassStmt) -> Node {
Node::CreateOpClassStmt(Box::new(node))
}
}
impl NodeType for CreateOpFamilyStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateOpFamilyStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateOpFamilyStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateOpFamilyStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateOpFamilyStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateOpFamilyStmt> for Node {
fn from(node: CreateOpFamilyStmt) -> Node {
Node::CreateOpFamilyStmt(Box::new(node))
}
}
impl NodeType for CreatePLangStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreatePLangStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreatePLangStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreatePLangStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreatePLangStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreatePLangStmt> for Node {
fn from(node: CreatePLangStmt) -> Node {
Node::CreatePLangStmt(Box::new(node))
}
}
impl NodeType for CreatePolicyStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreatePolicyStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreatePolicyStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreatePolicyStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreatePolicyStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreatePolicyStmt> for Node {
fn from(node: CreatePolicyStmt) -> Node {
Node::CreatePolicyStmt(Box::new(node))
}
}
impl NodeType for CreatePublicationStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreatePublicationStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreatePublicationStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreatePublicationStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreatePublicationStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreatePublicationStmt> for Node {
fn from(node: CreatePublicationStmt) -> Node {
Node::CreatePublicationStmt(Box::new(node))
}
}
impl NodeType for CreateRangeStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateRangeStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateRangeStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateRangeStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateRangeStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateRangeStmt> for Node {
fn from(node: CreateRangeStmt) -> Node {
Node::CreateRangeStmt(Box::new(node))
}
}
impl NodeType for CreateRoleStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateRoleStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateRoleStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateRoleStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateRoleStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateRoleStmt> for Node {
fn from(node: CreateRoleStmt) -> Node {
Node::CreateRoleStmt(Box::new(node))
}
}
impl NodeType for CreateSchemaStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateSchemaStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateSchemaStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateSchemaStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateSchemaStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateSchemaStmt> for Node {
fn from(node: CreateSchemaStmt) -> Node {
Node::CreateSchemaStmt(Box::new(node))
}
}
impl NodeType for CreateSeqStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateSeqStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateSeqStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateSeqStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateSeqStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateSeqStmt> for Node {
fn from(node: CreateSeqStmt) -> Node {
Node::CreateSeqStmt(Box::new(node))
}
}
impl NodeType for CreateStatsStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateStatsStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateStatsStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateStatsStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateStatsStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateStatsStmt> for Node {
fn from(node: CreateStatsStmt) -> Node {
Node::CreateStatsStmt(Box::new(node))
}
}
impl NodeType for CreateStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateStmt> for Node {
fn from(node: CreateStmt) -> Node {
Node::CreateStmt(Box::new(node))
}
}
impl NodeType for CreateSubscriptionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateSubscriptionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateSubscriptionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateSubscriptionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateSubscriptionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateSubscriptionStmt> for Node {
fn from(node: CreateSubscriptionStmt) -> Node {
Node::CreateSubscriptionStmt(Box::new(node))
}
}
impl NodeType for CreateTableAsStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateTableAsStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateTableAsStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateTableAsStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateTableAsStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateTableAsStmt> for Node {
fn from(node: CreateTableAsStmt) -> Node {
Node::CreateTableAsStmt(Box::new(node))
}
}
impl NodeType for CreateTableSpaceStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateTableSpaceStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateTableSpaceStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateTableSpaceStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateTableSpaceStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateTableSpaceStmt> for Node {
fn from(node: CreateTableSpaceStmt) -> Node {
Node::CreateTableSpaceStmt(Box::new(node))
}
}
impl NodeType for CreateTransformStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateTransformStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateTransformStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateTransformStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateTransformStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateTransformStmt> for Node {
fn from(node: CreateTransformStmt) -> Node {
Node::CreateTransformStmt(Box::new(node))
}
}
impl NodeType for CreateTrigStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateTrigStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateTrigStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateTrigStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateTrigStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateTrigStmt> for Node {
fn from(node: CreateTrigStmt) -> Node {
Node::CreateTrigStmt(Box::new(node))
}
}
impl NodeType for CreateUserMappingStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreateUserMappingStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreateUserMappingStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreateUserMappingStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreateUserMappingStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreateUserMappingStmt> for Node {
fn from(node: CreateUserMappingStmt) -> Node {
Node::CreateUserMappingStmt(Box::new(node))
}
}
impl NodeType for CreatedbStmt {
fn into_node(self: Box<Self>) -> Node {
Node::CreatedbStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CreatedbStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CreatedbStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CreatedbStmt(node) => Some(node),
_ => None,
}
}
}
impl From<CreatedbStmt> for Node {
fn from(node: CreatedbStmt) -> Node {
Node::CreatedbStmt(Box::new(node))
}
}
impl NodeType for CurrentOfExpr {
fn into_node(self: Box<Self>) -> Node {
Node::CurrentOfExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::CurrentOfExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::CurrentOfExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::CurrentOfExpr(node) => Some(node),
_ => None,
}
}
}
impl From<CurrentOfExpr> for Node {
fn from(node: CurrentOfExpr) -> Node {
Node::CurrentOfExpr(Box::new(node))
}
}
impl NodeType for DeallocateStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DeallocateStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DeallocateStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DeallocateStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DeallocateStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DeallocateStmt> for Node {
fn from(node: DeallocateStmt) -> Node {
Node::DeallocateStmt(Box::new(node))
}
}
impl NodeType for DeclareCursorStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DeclareCursorStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DeclareCursorStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DeclareCursorStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DeclareCursorStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DeclareCursorStmt> for Node {
fn from(node: DeclareCursorStmt) -> Node {
Node::DeclareCursorStmt(Box::new(node))
}
}
impl NodeType for DefElem {
fn into_node(self: Box<Self>) -> Node {
Node::DefElem(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DefElem(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DefElem(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DefElem(node) => Some(node),
_ => None,
}
}
}
impl From<DefElem> for Node {
fn from(node: DefElem) -> Node {
Node::DefElem(Box::new(node))
}
}
impl NodeType for DefineStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DefineStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DefineStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DefineStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DefineStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DefineStmt> for Node {
fn from(node: DefineStmt) -> Node {
Node::DefineStmt(Box::new(node))
}
}
impl NodeType for DeleteStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DeleteStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DeleteStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DeleteStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DeleteStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DeleteStmt> for Node {
fn from(node: DeleteStmt) -> Node {
Node::DeleteStmt(Box::new(node))
}
}
impl NodeType for DiscardStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DiscardStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DiscardStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DiscardStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DiscardStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DiscardStmt> for Node {
fn from(node: DiscardStmt) -> Node {
Node::DiscardStmt(Box::new(node))
}
}
impl NodeType for DoStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DoStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DoStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DoStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DoStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DoStmt> for Node {
fn from(node: DoStmt) -> Node {
Node::DoStmt(Box::new(node))
}
}
impl NodeType for DropOwnedStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DropOwnedStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DropOwnedStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DropOwnedStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DropOwnedStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DropOwnedStmt> for Node {
fn from(node: DropOwnedStmt) -> Node {
Node::DropOwnedStmt(Box::new(node))
}
}
impl NodeType for DropRoleStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DropRoleStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DropRoleStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DropRoleStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DropRoleStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DropRoleStmt> for Node {
fn from(node: DropRoleStmt) -> Node {
Node::DropRoleStmt(Box::new(node))
}
}
impl NodeType for DropStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DropStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DropStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DropStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DropStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DropStmt> for Node {
fn from(node: DropStmt) -> Node {
Node::DropStmt(Box::new(node))
}
}
impl NodeType for DropSubscriptionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DropSubscriptionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DropSubscriptionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DropSubscriptionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DropSubscriptionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DropSubscriptionStmt> for Node {
fn from(node: DropSubscriptionStmt) -> Node {
Node::DropSubscriptionStmt(Box::new(node))
}
}
impl NodeType for DropTableSpaceStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DropTableSpaceStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DropTableSpaceStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DropTableSpaceStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DropTableSpaceStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DropTableSpaceStmt> for Node {
fn from(node: DropTableSpaceStmt) -> Node {
Node::DropTableSpaceStmt(Box::new(node))
}
}
impl NodeType for DropUserMappingStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DropUserMappingStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DropUserMappingStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DropUserMappingStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DropUserMappingStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DropUserMappingStmt> for Node {
fn from(node: DropUserMappingStmt) -> Node {
Node::DropUserMappingStmt(Box::new(node))
}
}
impl NodeType for DropdbStmt {
fn into_node(self: Box<Self>) -> Node {
Node::DropdbStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::DropdbStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::DropdbStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::DropdbStmt(node) => Some(node),
_ => None,
}
}
}
impl From<DropdbStmt> for Node {
fn from(node: DropdbStmt) -> Node {
Node::DropdbStmt(Box::new(node))
}
}
impl NodeType for ExecuteStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ExecuteStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ExecuteStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ExecuteStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ExecuteStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ExecuteStmt> for Node {
fn from(node: ExecuteStmt) -> Node {
Node::ExecuteStmt(Box::new(node))
}
}
impl NodeType for ExplainStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ExplainStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ExplainStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ExplainStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ExplainStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ExplainStmt> for Node {
fn from(node: ExplainStmt) -> Node {
Node::ExplainStmt(Box::new(node))
}
}
impl NodeType for FetchStmt {
fn into_node(self: Box<Self>) -> Node {
Node::FetchStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::FetchStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::FetchStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::FetchStmt(node) => Some(node),
_ => None,
}
}
}
impl From<FetchStmt> for Node {
fn from(node: FetchStmt) -> Node {
Node::FetchStmt(Box::new(node))
}
}
impl NodeType for FuncCall {
fn into_node(self: Box<Self>) -> Node {
Node::FuncCall(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::FuncCall(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::FuncCall(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::FuncCall(node) => Some(node),
_ => None,
}
}
}
impl From<FuncCall> for Node {
fn from(node: FuncCall) -> Node {
Node::FuncCall(Box::new(node))
}
}
impl NodeType for FunctionParameter {
fn into_node(self: Box<Self>) -> Node {
Node::FunctionParameter(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::FunctionParameter(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::FunctionParameter(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::FunctionParameter(node) => Some(node),
_ => None,
}
}
}
impl From<FunctionParameter> for Node {
fn from(node: FunctionParameter) -> Node {
Node::FunctionParameter(Box::new(node))
}
}
impl NodeType for GrantRoleStmt {
fn into_node(self: Box<Self>) -> Node {
Node::GrantRoleStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::GrantRoleStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::GrantRoleStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::GrantRoleStmt(node) => Some(node),
_ => None,
}
}
}
impl From<GrantRoleStmt> for Node {
fn from(node: GrantRoleStmt) -> Node {
Node::GrantRoleStmt(Box::new(node))
}
}
impl NodeType for GrantStmt {
fn into_node(self: Box<Self>) -> Node {
Node::GrantStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::GrantStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::GrantStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::GrantStmt(node) => Some(node),
_ => None,
}
}
}
impl From<GrantStmt> for Node {
fn from(node: GrantStmt) -> Node {
Node::GrantStmt(Box::new(node))
}
}
impl NodeType for GroupingFunc {
fn into_node(self: Box<Self>) -> Node {
Node::GroupingFunc(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::GroupingFunc(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::GroupingFunc(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::GroupingFunc(node) => Some(node),
_ => None,
}
}
}
impl From<GroupingFunc> for Node {
fn from(node: GroupingFunc) -> Node {
Node::GroupingFunc(Box::new(node))
}
}
impl NodeType for GroupingSet {
fn into_node(self: Box<Self>) -> Node {
Node::GroupingSet(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::GroupingSet(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::GroupingSet(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::GroupingSet(node) => Some(node),
_ => None,
}
}
}
impl From<GroupingSet> for Node {
fn from(node: GroupingSet) -> Node {
Node::GroupingSet(Box::new(node))
}
}
impl NodeType for ImportForeignSchemaStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ImportForeignSchemaStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ImportForeignSchemaStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ImportForeignSchemaStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ImportForeignSchemaStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ImportForeignSchemaStmt> for Node {
fn from(node: ImportForeignSchemaStmt) -> Node {
Node::ImportForeignSchemaStmt(Box::new(node))
}
}
impl NodeType for IndexElem {
fn into_node(self: Box<Self>) -> Node {
Node::IndexElem(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::IndexElem(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::IndexElem(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::IndexElem(node) => Some(node),
_ => None,
}
}
}
impl From<IndexElem> for Node {
fn from(node: IndexElem) -> Node {
Node::IndexElem(Box::new(node))
}
}
impl NodeType for IndexStmt {
fn into_node(self: Box<Self>) -> Node {
Node::IndexStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::IndexStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::IndexStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::IndexStmt(node) => Some(node),
_ => None,
}
}
}
impl From<IndexStmt> for Node {
fn from(node: IndexStmt) -> Node {
Node::IndexStmt(Box::new(node))
}
}
impl NodeType for InferClause {
fn into_node(self: Box<Self>) -> Node {
Node::InferClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::InferClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::InferClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::InferClause(node) => Some(node),
_ => None,
}
}
}
impl From<InferClause> for Node {
fn from(node: InferClause) -> Node {
Node::InferClause(Box::new(node))
}
}
impl NodeType for InsertStmt {
fn into_node(self: Box<Self>) -> Node {
Node::InsertStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::InsertStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::InsertStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::InsertStmt(node) => Some(node),
_ => None,
}
}
}
impl From<InsertStmt> for Node {
fn from(node: InsertStmt) -> Node {
Node::InsertStmt(Box::new(node))
}
}
impl NodeType for IntoClause {
fn into_node(self: Box<Self>) -> Node {
Node::IntoClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::IntoClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::IntoClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::IntoClause(node) => Some(node),
_ => None,
}
}
}
impl From<IntoClause> for Node {
fn from(node: IntoClause) -> Node {
Node::IntoClause(Box::new(node))
}
}
impl NodeType for JoinExpr {
fn into_node(self: Box<Self>) -> Node {
Node::JoinExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JoinExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JoinExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JoinExpr(node) => Some(node),
_ => None,
}
}
}
impl From<JoinExpr> for Node {
fn from(node: JoinExpr) -> Node {
Node::JoinExpr(Box::new(node))
}
}
impl NodeType for JsonAggConstructor {
fn into_node(self: Box<Self>) -> Node {
Node::JsonAggConstructor(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonAggConstructor(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonAggConstructor(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonAggConstructor(node) => Some(node),
_ => None,
}
}
}
impl From<JsonAggConstructor> for Node {
fn from(node: JsonAggConstructor) -> Node {
Node::JsonAggConstructor(Box::new(node))
}
}
impl NodeType for JsonArgument {
fn into_node(self: Box<Self>) -> Node {
Node::JsonArgument(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonArgument(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonArgument(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonArgument(node) => Some(node),
_ => None,
}
}
}
impl From<JsonArgument> for Node {
fn from(node: JsonArgument) -> Node {
Node::JsonArgument(Box::new(node))
}
}
impl NodeType for JsonArrayAgg {
fn into_node(self: Box<Self>) -> Node {
Node::JsonArrayAgg(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonArrayAgg(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonArrayAgg(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonArrayAgg(node) => Some(node),
_ => None,
}
}
}
impl From<JsonArrayAgg> for Node {
fn from(node: JsonArrayAgg) -> Node {
Node::JsonArrayAgg(Box::new(node))
}
}
impl NodeType for JsonArrayConstructor {
fn into_node(self: Box<Self>) -> Node {
Node::JsonArrayConstructor(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonArrayConstructor(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonArrayConstructor(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonArrayConstructor(node) => Some(node),
_ => None,
}
}
}
impl From<JsonArrayConstructor> for Node {
fn from(node: JsonArrayConstructor) -> Node {
Node::JsonArrayConstructor(Box::new(node))
}
}
impl NodeType for JsonArrayQueryConstructor {
fn into_node(self: Box<Self>) -> Node {
Node::JsonArrayQueryConstructor(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonArrayQueryConstructor(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonArrayQueryConstructor(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonArrayQueryConstructor(node) => Some(node),
_ => None,
}
}
}
impl From<JsonArrayQueryConstructor> for Node {
fn from(node: JsonArrayQueryConstructor) -> Node {
Node::JsonArrayQueryConstructor(Box::new(node))
}
}
impl NodeType for JsonBehavior {
fn into_node(self: Box<Self>) -> Node {
Node::JsonBehavior(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonBehavior(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonBehavior(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonBehavior(node) => Some(node),
_ => None,
}
}
}
impl From<JsonBehavior> for Node {
fn from(node: JsonBehavior) -> Node {
Node::JsonBehavior(Box::new(node))
}
}
impl NodeType for JsonFormat {
fn into_node(self: Box<Self>) -> Node {
Node::JsonFormat(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonFormat(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonFormat(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonFormat(node) => Some(node),
_ => None,
}
}
}
impl From<JsonFormat> for Node {
fn from(node: JsonFormat) -> Node {
Node::JsonFormat(Box::new(node))
}
}
impl NodeType for JsonFuncExpr {
fn into_node(self: Box<Self>) -> Node {
Node::JsonFuncExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonFuncExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonFuncExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonFuncExpr(node) => Some(node),
_ => None,
}
}
}
impl From<JsonFuncExpr> for Node {
fn from(node: JsonFuncExpr) -> Node {
Node::JsonFuncExpr(Box::new(node))
}
}
impl NodeType for JsonIsPredicate {
fn into_node(self: Box<Self>) -> Node {
Node::JsonIsPredicate(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonIsPredicate(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonIsPredicate(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonIsPredicate(node) => Some(node),
_ => None,
}
}
}
impl From<JsonIsPredicate> for Node {
fn from(node: JsonIsPredicate) -> Node {
Node::JsonIsPredicate(Box::new(node))
}
}
impl NodeType for JsonKeyValue {
fn into_node(self: Box<Self>) -> Node {
Node::JsonKeyValue(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonKeyValue(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonKeyValue(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonKeyValue(node) => Some(node),
_ => None,
}
}
}
impl From<JsonKeyValue> for Node {
fn from(node: JsonKeyValue) -> Node {
Node::JsonKeyValue(Box::new(node))
}
}
impl NodeType for JsonObjectAgg {
fn into_node(self: Box<Self>) -> Node {
Node::JsonObjectAgg(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonObjectAgg(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonObjectAgg(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonObjectAgg(node) => Some(node),
_ => None,
}
}
}
impl From<JsonObjectAgg> for Node {
fn from(node: JsonObjectAgg) -> Node {
Node::JsonObjectAgg(Box::new(node))
}
}
impl NodeType for JsonObjectConstructor {
fn into_node(self: Box<Self>) -> Node {
Node::JsonObjectConstructor(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonObjectConstructor(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonObjectConstructor(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonObjectConstructor(node) => Some(node),
_ => None,
}
}
}
impl From<JsonObjectConstructor> for Node {
fn from(node: JsonObjectConstructor) -> Node {
Node::JsonObjectConstructor(Box::new(node))
}
}
impl NodeType for JsonOutput {
fn into_node(self: Box<Self>) -> Node {
Node::JsonOutput(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonOutput(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonOutput(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonOutput(node) => Some(node),
_ => None,
}
}
}
impl From<JsonOutput> for Node {
fn from(node: JsonOutput) -> Node {
Node::JsonOutput(Box::new(node))
}
}
impl NodeType for JsonParseExpr {
fn into_node(self: Box<Self>) -> Node {
Node::JsonParseExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonParseExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonParseExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonParseExpr(node) => Some(node),
_ => None,
}
}
}
impl From<JsonParseExpr> for Node {
fn from(node: JsonParseExpr) -> Node {
Node::JsonParseExpr(Box::new(node))
}
}
impl NodeType for JsonReturning {
fn into_node(self: Box<Self>) -> Node {
Node::JsonReturning(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonReturning(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonReturning(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonReturning(node) => Some(node),
_ => None,
}
}
}
impl From<JsonReturning> for Node {
fn from(node: JsonReturning) -> Node {
Node::JsonReturning(Box::new(node))
}
}
impl NodeType for JsonScalarExpr {
fn into_node(self: Box<Self>) -> Node {
Node::JsonScalarExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonScalarExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonScalarExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonScalarExpr(node) => Some(node),
_ => None,
}
}
}
impl From<JsonScalarExpr> for Node {
fn from(node: JsonScalarExpr) -> Node {
Node::JsonScalarExpr(Box::new(node))
}
}
impl NodeType for JsonSerializeExpr {
fn into_node(self: Box<Self>) -> Node {
Node::JsonSerializeExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonSerializeExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonSerializeExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonSerializeExpr(node) => Some(node),
_ => None,
}
}
}
impl From<JsonSerializeExpr> for Node {
fn from(node: JsonSerializeExpr) -> Node {
Node::JsonSerializeExpr(Box::new(node))
}
}
impl NodeType for JsonTable {
fn into_node(self: Box<Self>) -> Node {
Node::JsonTable(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonTable(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonTable(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonTable(node) => Some(node),
_ => None,
}
}
}
impl From<JsonTable> for Node {
fn from(node: JsonTable) -> Node {
Node::JsonTable(Box::new(node))
}
}
impl NodeType for JsonTableColumn {
fn into_node(self: Box<Self>) -> Node {
Node::JsonTableColumn(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonTableColumn(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonTableColumn(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonTableColumn(node) => Some(node),
_ => None,
}
}
}
impl From<JsonTableColumn> for Node {
fn from(node: JsonTableColumn) -> Node {
Node::JsonTableColumn(Box::new(node))
}
}
impl NodeType for JsonTablePathSpec {
fn into_node(self: Box<Self>) -> Node {
Node::JsonTablePathSpec(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonTablePathSpec(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonTablePathSpec(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonTablePathSpec(node) => Some(node),
_ => None,
}
}
}
impl From<JsonTablePathSpec> for Node {
fn from(node: JsonTablePathSpec) -> Node {
Node::JsonTablePathSpec(Box::new(node))
}
}
impl NodeType for JsonValueExpr {
fn into_node(self: Box<Self>) -> Node {
Node::JsonValueExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::JsonValueExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::JsonValueExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::JsonValueExpr(node) => Some(node),
_ => None,
}
}
}
impl From<JsonValueExpr> for Node {
fn from(node: JsonValueExpr) -> Node {
Node::JsonValueExpr(Box::new(node))
}
}
impl NodeType for ListenStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ListenStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ListenStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ListenStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ListenStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ListenStmt> for Node {
fn from(node: ListenStmt) -> Node {
Node::ListenStmt(Box::new(node))
}
}
impl NodeType for LoadStmt {
fn into_node(self: Box<Self>) -> Node {
Node::LoadStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::LoadStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::LoadStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::LoadStmt(node) => Some(node),
_ => None,
}
}
}
impl From<LoadStmt> for Node {
fn from(node: LoadStmt) -> Node {
Node::LoadStmt(Box::new(node))
}
}
impl NodeType for LockStmt {
fn into_node(self: Box<Self>) -> Node {
Node::LockStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::LockStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::LockStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::LockStmt(node) => Some(node),
_ => None,
}
}
}
impl From<LockStmt> for Node {
fn from(node: LockStmt) -> Node {
Node::LockStmt(Box::new(node))
}
}
impl NodeType for LockingClause {
fn into_node(self: Box<Self>) -> Node {
Node::LockingClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::LockingClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::LockingClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::LockingClause(node) => Some(node),
_ => None,
}
}
}
impl From<LockingClause> for Node {
fn from(node: LockingClause) -> Node {
Node::LockingClause(Box::new(node))
}
}
impl NodeType for MergeStmt {
fn into_node(self: Box<Self>) -> Node {
Node::MergeStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::MergeStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::MergeStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::MergeStmt(node) => Some(node),
_ => None,
}
}
}
impl From<MergeStmt> for Node {
fn from(node: MergeStmt) -> Node {
Node::MergeStmt(Box::new(node))
}
}
impl NodeType for MergeSupportFunc {
fn into_node(self: Box<Self>) -> Node {
Node::MergeSupportFunc(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::MergeSupportFunc(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::MergeSupportFunc(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::MergeSupportFunc(node) => Some(node),
_ => None,
}
}
}
impl From<MergeSupportFunc> for Node {
fn from(node: MergeSupportFunc) -> Node {
Node::MergeSupportFunc(Box::new(node))
}
}
impl NodeType for MergeWhenClause {
fn into_node(self: Box<Self>) -> Node {
Node::MergeWhenClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::MergeWhenClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::MergeWhenClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::MergeWhenClause(node) => Some(node),
_ => None,
}
}
}
impl From<MergeWhenClause> for Node {
fn from(node: MergeWhenClause) -> Node {
Node::MergeWhenClause(Box::new(node))
}
}
impl NodeType for MinMaxExpr {
fn into_node(self: Box<Self>) -> Node {
Node::MinMaxExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::MinMaxExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::MinMaxExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::MinMaxExpr(node) => Some(node),
_ => None,
}
}
}
impl From<MinMaxExpr> for Node {
fn from(node: MinMaxExpr) -> Node {
Node::MinMaxExpr(Box::new(node))
}
}
impl NodeType for MultiAssignRef {
fn into_node(self: Box<Self>) -> Node {
Node::MultiAssignRef(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::MultiAssignRef(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::MultiAssignRef(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::MultiAssignRef(node) => Some(node),
_ => None,
}
}
}
impl From<MultiAssignRef> for Node {
fn from(node: MultiAssignRef) -> Node {
Node::MultiAssignRef(Box::new(node))
}
}
impl NodeType for NamedArgExpr {
fn into_node(self: Box<Self>) -> Node {
Node::NamedArgExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::NamedArgExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::NamedArgExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::NamedArgExpr(node) => Some(node),
_ => None,
}
}
}
impl From<NamedArgExpr> for Node {
fn from(node: NamedArgExpr) -> Node {
Node::NamedArgExpr(Box::new(node))
}
}
impl NodeType for NotifyStmt {
fn into_node(self: Box<Self>) -> Node {
Node::NotifyStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::NotifyStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::NotifyStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::NotifyStmt(node) => Some(node),
_ => None,
}
}
}
impl From<NotifyStmt> for Node {
fn from(node: NotifyStmt) -> Node {
Node::NotifyStmt(Box::new(node))
}
}
impl NodeType for NullTest {
fn into_node(self: Box<Self>) -> Node {
Node::NullTest(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::NullTest(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::NullTest(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::NullTest(node) => Some(node),
_ => None,
}
}
}
impl From<NullTest> for Node {
fn from(node: NullTest) -> Node {
Node::NullTest(Box::new(node))
}
}
impl NodeType for ObjectWithArgs {
fn into_node(self: Box<Self>) -> Node {
Node::ObjectWithArgs(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ObjectWithArgs(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ObjectWithArgs(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ObjectWithArgs(node) => Some(node),
_ => None,
}
}
}
impl From<ObjectWithArgs> for Node {
fn from(node: ObjectWithArgs) -> Node {
Node::ObjectWithArgs(Box::new(node))
}
}
impl NodeType for OnConflictClause {
fn into_node(self: Box<Self>) -> Node {
Node::OnConflictClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::OnConflictClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::OnConflictClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::OnConflictClause(node) => Some(node),
_ => None,
}
}
}
impl From<OnConflictClause> for Node {
fn from(node: OnConflictClause) -> Node {
Node::OnConflictClause(Box::new(node))
}
}
impl NodeType for PLAssignStmt {
fn into_node(self: Box<Self>) -> Node {
Node::PLAssignStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PLAssignStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PLAssignStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PLAssignStmt(node) => Some(node),
_ => None,
}
}
}
impl From<PLAssignStmt> for Node {
fn from(node: PLAssignStmt) -> Node {
Node::PLAssignStmt(Box::new(node))
}
}
impl NodeType for ParamRef {
fn into_node(self: Box<Self>) -> Node {
Node::ParamRef(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ParamRef(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ParamRef(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ParamRef(node) => Some(node),
_ => None,
}
}
}
impl From<ParamRef> for Node {
fn from(node: ParamRef) -> Node {
Node::ParamRef(Box::new(node))
}
}
impl NodeType for PartitionBoundSpec {
fn into_node(self: Box<Self>) -> Node {
Node::PartitionBoundSpec(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PartitionBoundSpec(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PartitionBoundSpec(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PartitionBoundSpec(node) => Some(node),
_ => None,
}
}
}
impl From<PartitionBoundSpec> for Node {
fn from(node: PartitionBoundSpec) -> Node {
Node::PartitionBoundSpec(Box::new(node))
}
}
impl NodeType for PartitionCmd {
fn into_node(self: Box<Self>) -> Node {
Node::PartitionCmd(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PartitionCmd(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PartitionCmd(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PartitionCmd(node) => Some(node),
_ => None,
}
}
}
impl From<PartitionCmd> for Node {
fn from(node: PartitionCmd) -> Node {
Node::PartitionCmd(Box::new(node))
}
}
impl NodeType for PartitionElem {
fn into_node(self: Box<Self>) -> Node {
Node::PartitionElem(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PartitionElem(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PartitionElem(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PartitionElem(node) => Some(node),
_ => None,
}
}
}
impl From<PartitionElem> for Node {
fn from(node: PartitionElem) -> Node {
Node::PartitionElem(Box::new(node))
}
}
impl NodeType for PartitionSpec {
fn into_node(self: Box<Self>) -> Node {
Node::PartitionSpec(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PartitionSpec(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PartitionSpec(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PartitionSpec(node) => Some(node),
_ => None,
}
}
}
impl From<PartitionSpec> for Node {
fn from(node: PartitionSpec) -> Node {
Node::PartitionSpec(Box::new(node))
}
}
impl NodeType for PrepareStmt {
fn into_node(self: Box<Self>) -> Node {
Node::PrepareStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PrepareStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PrepareStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PrepareStmt(node) => Some(node),
_ => None,
}
}
}
impl From<PrepareStmt> for Node {
fn from(node: PrepareStmt) -> Node {
Node::PrepareStmt(Box::new(node))
}
}
impl NodeType for PublicationAllObjSpec {
fn into_node(self: Box<Self>) -> Node {
Node::PublicationAllObjSpec(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PublicationAllObjSpec(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PublicationAllObjSpec(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PublicationAllObjSpec(node) => Some(node),
_ => None,
}
}
}
impl From<PublicationAllObjSpec> for Node {
fn from(node: PublicationAllObjSpec) -> Node {
Node::PublicationAllObjSpec(Box::new(node))
}
}
impl NodeType for PublicationObjSpec {
fn into_node(self: Box<Self>) -> Node {
Node::PublicationObjSpec(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PublicationObjSpec(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PublicationObjSpec(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PublicationObjSpec(node) => Some(node),
_ => None,
}
}
}
impl From<PublicationObjSpec> for Node {
fn from(node: PublicationObjSpec) -> Node {
Node::PublicationObjSpec(Box::new(node))
}
}
impl NodeType for PublicationTable {
fn into_node(self: Box<Self>) -> Node {
Node::PublicationTable(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::PublicationTable(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::PublicationTable(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::PublicationTable(node) => Some(node),
_ => None,
}
}
}
impl From<PublicationTable> for Node {
fn from(node: PublicationTable) -> Node {
Node::PublicationTable(Box::new(node))
}
}
impl NodeType for RangeFunction {
fn into_node(self: Box<Self>) -> Node {
Node::RangeFunction(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RangeFunction(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RangeFunction(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RangeFunction(node) => Some(node),
_ => None,
}
}
}
impl From<RangeFunction> for Node {
fn from(node: RangeFunction) -> Node {
Node::RangeFunction(Box::new(node))
}
}
impl NodeType for RangeSubselect {
fn into_node(self: Box<Self>) -> Node {
Node::RangeSubselect(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RangeSubselect(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RangeSubselect(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RangeSubselect(node) => Some(node),
_ => None,
}
}
}
impl From<RangeSubselect> for Node {
fn from(node: RangeSubselect) -> Node {
Node::RangeSubselect(Box::new(node))
}
}
impl NodeType for RangeTableFunc {
fn into_node(self: Box<Self>) -> Node {
Node::RangeTableFunc(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RangeTableFunc(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RangeTableFunc(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RangeTableFunc(node) => Some(node),
_ => None,
}
}
}
impl From<RangeTableFunc> for Node {
fn from(node: RangeTableFunc) -> Node {
Node::RangeTableFunc(Box::new(node))
}
}
impl NodeType for RangeTableFuncCol {
fn into_node(self: Box<Self>) -> Node {
Node::RangeTableFuncCol(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RangeTableFuncCol(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RangeTableFuncCol(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RangeTableFuncCol(node) => Some(node),
_ => None,
}
}
}
impl From<RangeTableFuncCol> for Node {
fn from(node: RangeTableFuncCol) -> Node {
Node::RangeTableFuncCol(Box::new(node))
}
}
impl NodeType for RangeTableSample {
fn into_node(self: Box<Self>) -> Node {
Node::RangeTableSample(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RangeTableSample(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RangeTableSample(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RangeTableSample(node) => Some(node),
_ => None,
}
}
}
impl From<RangeTableSample> for Node {
fn from(node: RangeTableSample) -> Node {
Node::RangeTableSample(Box::new(node))
}
}
impl NodeType for RangeVar {
fn into_node(self: Box<Self>) -> Node {
Node::RangeVar(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RangeVar(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RangeVar(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RangeVar(node) => Some(node),
_ => None,
}
}
}
impl From<RangeVar> for Node {
fn from(node: RangeVar) -> Node {
Node::RangeVar(Box::new(node))
}
}
impl NodeType for RawStmt {
fn into_node(self: Box<Self>) -> Node {
Node::RawStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RawStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RawStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RawStmt(node) => Some(node),
_ => None,
}
}
}
impl From<RawStmt> for Node {
fn from(node: RawStmt) -> Node {
Node::RawStmt(Box::new(node))
}
}
impl NodeType for ReassignOwnedStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ReassignOwnedStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ReassignOwnedStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ReassignOwnedStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ReassignOwnedStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ReassignOwnedStmt> for Node {
fn from(node: ReassignOwnedStmt) -> Node {
Node::ReassignOwnedStmt(Box::new(node))
}
}
impl NodeType for RefreshMatViewStmt {
fn into_node(self: Box<Self>) -> Node {
Node::RefreshMatViewStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RefreshMatViewStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RefreshMatViewStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RefreshMatViewStmt(node) => Some(node),
_ => None,
}
}
}
impl From<RefreshMatViewStmt> for Node {
fn from(node: RefreshMatViewStmt) -> Node {
Node::RefreshMatViewStmt(Box::new(node))
}
}
impl NodeType for ReindexStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ReindexStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ReindexStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ReindexStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ReindexStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ReindexStmt> for Node {
fn from(node: ReindexStmt) -> Node {
Node::ReindexStmt(Box::new(node))
}
}
impl NodeType for RenameStmt {
fn into_node(self: Box<Self>) -> Node {
Node::RenameStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RenameStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RenameStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RenameStmt(node) => Some(node),
_ => None,
}
}
}
impl From<RenameStmt> for Node {
fn from(node: RenameStmt) -> Node {
Node::RenameStmt(Box::new(node))
}
}
impl NodeType for RepackStmt {
fn into_node(self: Box<Self>) -> Node {
Node::RepackStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RepackStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RepackStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RepackStmt(node) => Some(node),
_ => None,
}
}
}
impl From<RepackStmt> for Node {
fn from(node: RepackStmt) -> Node {
Node::RepackStmt(Box::new(node))
}
}
impl NodeType for ReplicaIdentityStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ReplicaIdentityStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ReplicaIdentityStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ReplicaIdentityStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ReplicaIdentityStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ReplicaIdentityStmt> for Node {
fn from(node: ReplicaIdentityStmt) -> Node {
Node::ReplicaIdentityStmt(Box::new(node))
}
}
impl NodeType for ResTarget {
fn into_node(self: Box<Self>) -> Node {
Node::ResTarget(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ResTarget(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ResTarget(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ResTarget(node) => Some(node),
_ => None,
}
}
}
impl From<ResTarget> for Node {
fn from(node: ResTarget) -> Node {
Node::ResTarget(Box::new(node))
}
}
impl NodeType for ReturnStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ReturnStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ReturnStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ReturnStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ReturnStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ReturnStmt> for Node {
fn from(node: ReturnStmt) -> Node {
Node::ReturnStmt(Box::new(node))
}
}
impl NodeType for ReturningClause {
fn into_node(self: Box<Self>) -> Node {
Node::ReturningClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ReturningClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ReturningClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ReturningClause(node) => Some(node),
_ => None,
}
}
}
impl From<ReturningClause> for Node {
fn from(node: ReturningClause) -> Node {
Node::ReturningClause(Box::new(node))
}
}
impl NodeType for ReturningOption {
fn into_node(self: Box<Self>) -> Node {
Node::ReturningOption(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ReturningOption(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ReturningOption(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ReturningOption(node) => Some(node),
_ => None,
}
}
}
impl From<ReturningOption> for Node {
fn from(node: ReturningOption) -> Node {
Node::ReturningOption(Box::new(node))
}
}
impl NodeType for RoleSpec {
fn into_node(self: Box<Self>) -> Node {
Node::RoleSpec(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RoleSpec(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RoleSpec(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RoleSpec(node) => Some(node),
_ => None,
}
}
}
impl From<RoleSpec> for Node {
fn from(node: RoleSpec) -> Node {
Node::RoleSpec(Box::new(node))
}
}
impl NodeType for RowExpr {
fn into_node(self: Box<Self>) -> Node {
Node::RowExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RowExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RowExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RowExpr(node) => Some(node),
_ => None,
}
}
}
impl From<RowExpr> for Node {
fn from(node: RowExpr) -> Node {
Node::RowExpr(Box::new(node))
}
}
impl NodeType for RuleStmt {
fn into_node(self: Box<Self>) -> Node {
Node::RuleStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::RuleStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::RuleStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::RuleStmt(node) => Some(node),
_ => None,
}
}
}
impl From<RuleStmt> for Node {
fn from(node: RuleStmt) -> Node {
Node::RuleStmt(Box::new(node))
}
}
impl NodeType for SQLValueFunction {
fn into_node(self: Box<Self>) -> Node {
Node::SQLValueFunction(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::SQLValueFunction(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::SQLValueFunction(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::SQLValueFunction(node) => Some(node),
_ => None,
}
}
}
impl From<SQLValueFunction> for Node {
fn from(node: SQLValueFunction) -> Node {
Node::SQLValueFunction(Box::new(node))
}
}
impl NodeType for SecLabelStmt {
fn into_node(self: Box<Self>) -> Node {
Node::SecLabelStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::SecLabelStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::SecLabelStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::SecLabelStmt(node) => Some(node),
_ => None,
}
}
}
impl From<SecLabelStmt> for Node {
fn from(node: SecLabelStmt) -> Node {
Node::SecLabelStmt(Box::new(node))
}
}
impl NodeType for SelectStmt {
fn into_node(self: Box<Self>) -> Node {
Node::SelectStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::SelectStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::SelectStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::SelectStmt(node) => Some(node),
_ => None,
}
}
}
impl From<SelectStmt> for Node {
fn from(node: SelectStmt) -> Node {
Node::SelectStmt(Box::new(node))
}
}
impl NodeType for SetToDefault {
fn into_node(self: Box<Self>) -> Node {
Node::SetToDefault(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::SetToDefault(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::SetToDefault(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::SetToDefault(node) => Some(node),
_ => None,
}
}
}
impl From<SetToDefault> for Node {
fn from(node: SetToDefault) -> Node {
Node::SetToDefault(Box::new(node))
}
}
impl NodeType for SortBy {
fn into_node(self: Box<Self>) -> Node {
Node::SortBy(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::SortBy(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::SortBy(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::SortBy(node) => Some(node),
_ => None,
}
}
}
impl From<SortBy> for Node {
fn from(node: SortBy) -> Node {
Node::SortBy(Box::new(node))
}
}
impl NodeType for StatsElem {
fn into_node(self: Box<Self>) -> Node {
Node::StatsElem(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::StatsElem(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::StatsElem(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::StatsElem(node) => Some(node),
_ => None,
}
}
}
impl From<StatsElem> for Node {
fn from(node: StatsElem) -> Node {
Node::StatsElem(Box::new(node))
}
}
impl NodeType for SubLink {
fn into_node(self: Box<Self>) -> Node {
Node::SubLink(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::SubLink(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::SubLink(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::SubLink(node) => Some(node),
_ => None,
}
}
}
impl From<SubLink> for Node {
fn from(node: SubLink) -> Node {
Node::SubLink(Box::new(node))
}
}
impl NodeType for TableLikeClause {
fn into_node(self: Box<Self>) -> Node {
Node::TableLikeClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::TableLikeClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::TableLikeClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::TableLikeClause(node) => Some(node),
_ => None,
}
}
}
impl From<TableLikeClause> for Node {
fn from(node: TableLikeClause) -> Node {
Node::TableLikeClause(Box::new(node))
}
}
impl NodeType for TransactionStmt {
fn into_node(self: Box<Self>) -> Node {
Node::TransactionStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::TransactionStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::TransactionStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::TransactionStmt(node) => Some(node),
_ => None,
}
}
}
impl From<TransactionStmt> for Node {
fn from(node: TransactionStmt) -> Node {
Node::TransactionStmt(Box::new(node))
}
}
impl NodeType for TriggerTransition {
fn into_node(self: Box<Self>) -> Node {
Node::TriggerTransition(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::TriggerTransition(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::TriggerTransition(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::TriggerTransition(node) => Some(node),
_ => None,
}
}
}
impl From<TriggerTransition> for Node {
fn from(node: TriggerTransition) -> Node {
Node::TriggerTransition(Box::new(node))
}
}
impl NodeType for TruncateStmt {
fn into_node(self: Box<Self>) -> Node {
Node::TruncateStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::TruncateStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::TruncateStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::TruncateStmt(node) => Some(node),
_ => None,
}
}
}
impl From<TruncateStmt> for Node {
fn from(node: TruncateStmt) -> Node {
Node::TruncateStmt(Box::new(node))
}
}
impl NodeType for TypeCast {
fn into_node(self: Box<Self>) -> Node {
Node::TypeCast(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::TypeCast(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::TypeCast(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::TypeCast(node) => Some(node),
_ => None,
}
}
}
impl From<TypeCast> for Node {
fn from(node: TypeCast) -> Node {
Node::TypeCast(Box::new(node))
}
}
impl NodeType for TypeName {
fn into_node(self: Box<Self>) -> Node {
Node::TypeName(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::TypeName(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::TypeName(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::TypeName(node) => Some(node),
_ => None,
}
}
}
impl From<TypeName> for Node {
fn from(node: TypeName) -> Node {
Node::TypeName(Box::new(node))
}
}
impl NodeType for UnlistenStmt {
fn into_node(self: Box<Self>) -> Node {
Node::UnlistenStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::UnlistenStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::UnlistenStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::UnlistenStmt(node) => Some(node),
_ => None,
}
}
}
impl From<UnlistenStmt> for Node {
fn from(node: UnlistenStmt) -> Node {
Node::UnlistenStmt(Box::new(node))
}
}
impl NodeType for UpdateStmt {
fn into_node(self: Box<Self>) -> Node {
Node::UpdateStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::UpdateStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::UpdateStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::UpdateStmt(node) => Some(node),
_ => None,
}
}
}
impl From<UpdateStmt> for Node {
fn from(node: UpdateStmt) -> Node {
Node::UpdateStmt(Box::new(node))
}
}
impl NodeType for VacuumRelation {
fn into_node(self: Box<Self>) -> Node {
Node::VacuumRelation(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::VacuumRelation(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::VacuumRelation(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::VacuumRelation(node) => Some(node),
_ => None,
}
}
}
impl From<VacuumRelation> for Node {
fn from(node: VacuumRelation) -> Node {
Node::VacuumRelation(Box::new(node))
}
}
impl NodeType for VacuumStmt {
fn into_node(self: Box<Self>) -> Node {
Node::VacuumStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::VacuumStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::VacuumStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::VacuumStmt(node) => Some(node),
_ => None,
}
}
}
impl From<VacuumStmt> for Node {
fn from(node: VacuumStmt) -> Node {
Node::VacuumStmt(Box::new(node))
}
}
impl NodeType for VariableSetStmt {
fn into_node(self: Box<Self>) -> Node {
Node::VariableSetStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::VariableSetStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::VariableSetStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::VariableSetStmt(node) => Some(node),
_ => None,
}
}
}
impl From<VariableSetStmt> for Node {
fn from(node: VariableSetStmt) -> Node {
Node::VariableSetStmt(Box::new(node))
}
}
impl NodeType for VariableShowStmt {
fn into_node(self: Box<Self>) -> Node {
Node::VariableShowStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::VariableShowStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::VariableShowStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::VariableShowStmt(node) => Some(node),
_ => None,
}
}
}
impl From<VariableShowStmt> for Node {
fn from(node: VariableShowStmt) -> Node {
Node::VariableShowStmt(Box::new(node))
}
}
impl NodeType for ViewStmt {
fn into_node(self: Box<Self>) -> Node {
Node::ViewStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::ViewStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::ViewStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::ViewStmt(node) => Some(node),
_ => None,
}
}
}
impl From<ViewStmt> for Node {
fn from(node: ViewStmt) -> Node {
Node::ViewStmt(Box::new(node))
}
}
impl NodeType for WaitStmt {
fn into_node(self: Box<Self>) -> Node {
Node::WaitStmt(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::WaitStmt(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::WaitStmt(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::WaitStmt(node) => Some(node),
_ => None,
}
}
}
impl From<WaitStmt> for Node {
fn from(node: WaitStmt) -> Node {
Node::WaitStmt(Box::new(node))
}
}
impl NodeType for WindowDef {
fn into_node(self: Box<Self>) -> Node {
Node::WindowDef(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::WindowDef(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::WindowDef(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::WindowDef(node) => Some(node),
_ => None,
}
}
}
impl From<WindowDef> for Node {
fn from(node: WindowDef) -> Node {
Node::WindowDef(Box::new(node))
}
}
impl NodeType for WithClause {
fn into_node(self: Box<Self>) -> Node {
Node::WithClause(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::WithClause(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::WithClause(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::WithClause(node) => Some(node),
_ => None,
}
}
}
impl From<WithClause> for Node {
fn from(node: WithClause) -> Node {
Node::WithClause(Box::new(node))
}
}
impl NodeType for XmlExpr {
fn into_node(self: Box<Self>) -> Node {
Node::XmlExpr(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::XmlExpr(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::XmlExpr(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::XmlExpr(node) => Some(node),
_ => None,
}
}
}
impl From<XmlExpr> for Node {
fn from(node: XmlExpr) -> Node {
Node::XmlExpr(Box::new(node))
}
}
impl NodeType for XmlSerialize {
fn into_node(self: Box<Self>) -> Node {
Node::XmlSerialize(self)
}
fn from_node(node: Node) -> Result<Box<Self>, Node> {
match node {
Node::XmlSerialize(node) => Ok(node),
other => Err(other),
}
}
fn peek(node: &Node) -> Option<&Self> {
match node {
Node::XmlSerialize(node) => Some(node),
_ => None,
}
}
fn peek_mut(node: &mut Node) -> Option<&mut Self> {
match node {
Node::XmlSerialize(node) => Some(node),
_ => None,
}
}
}
impl From<XmlSerialize> for Node {
fn from(node: XmlSerialize) -> Node {
Node::XmlSerialize(Box::new(node))
}
}