UNPKG

@libpg-query/parser

Version:
849 lines (802 loc) 5.41 MB
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ (function(global, factory) { /* global define, require, module */ /* AMD */ if (typeof define === 'function' && define.amd) define(["@launchql/protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) module.exports = factory(require("@launchql/protobufjs/minimal")); })(this, function($protobuf) { "use strict"; // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); $root.pg_query = (function() { /** * Namespace pg_query. * @exports pg_query * @namespace */ var pg_query = {}; pg_query.ParseResult = (function() { /** * Properties of a ParseResult. * @memberof pg_query * @interface IParseResult * @property {number|null} [version] ParseResult version * @property {Array.<pg_query.IRawStmt>|null} [stmts] ParseResult stmts */ /** * Constructs a new ParseResult. * @memberof pg_query * @classdesc Represents a ParseResult. * @implements IParseResult * @constructor * @param {pg_query.IParseResult=} [properties] Properties to set */ function ParseResult(properties) { this.stmts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ParseResult version. * @member {number} version * @memberof pg_query.ParseResult * @instance */ ParseResult.prototype.version = 0; /** * ParseResult stmts. * @member {Array.<pg_query.IRawStmt>} stmts * @memberof pg_query.ParseResult * @instance */ ParseResult.prototype.stmts = $util.emptyArray; /** * Creates a new ParseResult instance using the specified properties. * @function create * @memberof pg_query.ParseResult * @static * @param {pg_query.IParseResult=} [properties] Properties to set * @returns {pg_query.ParseResult} ParseResult instance */ ParseResult.create = function create(properties) { return new ParseResult(properties); }; /** * Encodes the specified ParseResult message. Does not implicitly {@link pg_query.ParseResult.verify|verify} messages. * @function encode * @memberof pg_query.ParseResult * @static * @param {pg_query.IParseResult} message ParseResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ParseResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); if (message.stmts != null && message.stmts.length) for (var i = 0; i < message.stmts.length; ++i) $root.pg_query.RawStmt.encode(message.stmts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified ParseResult message, length delimited. Does not implicitly {@link pg_query.ParseResult.verify|verify} messages. * @function encodeDelimited * @memberof pg_query.ParseResult * @static * @param {pg_query.IParseResult} message ParseResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ParseResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ParseResult message from the specified reader or buffer. * @function decode * @memberof pg_query.ParseResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {pg_query.ParseResult} ParseResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ParseResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pg_query.ParseResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.version = reader.int32(); break; } case 2: { if (!(message.stmts && message.stmts.length)) message.stmts = []; message.stmts.push($root.pg_query.RawStmt.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ParseResult message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof pg_query.ParseResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {pg_query.ParseResult} ParseResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ParseResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ParseResult message. * @function verify * @memberof pg_query.ParseResult * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ParseResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.version != null && message.hasOwnProperty("version")) if (!$util.isInteger(message.version)) return "version: integer expected"; if (message.stmts != null && message.hasOwnProperty("stmts")) { if (!Array.isArray(message.stmts)) return "stmts: array expected"; for (var i = 0; i < message.stmts.length; ++i) { var error = $root.pg_query.RawStmt.verify(message.stmts[i]); if (error) return "stmts." + error; } } return null; }; /** * Creates a ParseResult message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof pg_query.ParseResult * @static * @param {Object.<string,*>} object Plain object * @returns {pg_query.ParseResult} ParseResult */ ParseResult.fromObject = function fromObject(object) { if (object instanceof $root.pg_query.ParseResult) return object; var message = new $root.pg_query.ParseResult(); if (object.version != null) message.version = object.version | 0; if (object.stmts) { if (!Array.isArray(object.stmts)) throw TypeError(".pg_query.ParseResult.stmts: array expected"); message.stmts = []; for (var i = 0; i < object.stmts.length; ++i) { if (typeof object.stmts[i] !== "object") throw TypeError(".pg_query.ParseResult.stmts: object expected"); message.stmts[i] = $root.pg_query.RawStmt.fromObject(object.stmts[i]); } } return message; }; /** * Creates a plain object from a ParseResult message. Also converts values to other types if specified. * @function toObject * @memberof pg_query.ParseResult * @static * @param {pg_query.ParseResult} message ParseResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ ParseResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.stmts = []; if (options.defaults) object.version = 0; if (message.version != null && message.hasOwnProperty("version")) object.version = message.version; if (message.stmts && message.stmts.length) { object.stmts = []; for (var j = 0; j < message.stmts.length; ++j) object.stmts[j] = $root.pg_query.RawStmt.toObject(message.stmts[j], options); } return object; }; /** * Converts this ParseResult to JSON. * @function toJSON * @memberof pg_query.ParseResult * @instance * @returns {Object.<string,*>} JSON object */ ParseResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ParseResult * @function getTypeUrl * @memberof pg_query.ParseResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ParseResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/pg_query.ParseResult"; }; return ParseResult; })(); pg_query.ScanResult = (function() { /** * Properties of a ScanResult. * @memberof pg_query * @interface IScanResult * @property {number|null} [version] ScanResult version * @property {Array.<pg_query.IScanToken>|null} [tokens] ScanResult tokens */ /** * Constructs a new ScanResult. * @memberof pg_query * @classdesc Represents a ScanResult. * @implements IScanResult * @constructor * @param {pg_query.IScanResult=} [properties] Properties to set */ function ScanResult(properties) { this.tokens = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * ScanResult version. * @member {number} version * @memberof pg_query.ScanResult * @instance */ ScanResult.prototype.version = 0; /** * ScanResult tokens. * @member {Array.<pg_query.IScanToken>} tokens * @memberof pg_query.ScanResult * @instance */ ScanResult.prototype.tokens = $util.emptyArray; /** * Creates a new ScanResult instance using the specified properties. * @function create * @memberof pg_query.ScanResult * @static * @param {pg_query.IScanResult=} [properties] Properties to set * @returns {pg_query.ScanResult} ScanResult instance */ ScanResult.create = function create(properties) { return new ScanResult(properties); }; /** * Encodes the specified ScanResult message. Does not implicitly {@link pg_query.ScanResult.verify|verify} messages. * @function encode * @memberof pg_query.ScanResult * @static * @param {pg_query.IScanResult} message ScanResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ScanResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.version != null && Object.hasOwnProperty.call(message, "version")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.version); if (message.tokens != null && message.tokens.length) for (var i = 0; i < message.tokens.length; ++i) $root.pg_query.ScanToken.encode(message.tokens[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified ScanResult message, length delimited. Does not implicitly {@link pg_query.ScanResult.verify|verify} messages. * @function encodeDelimited * @memberof pg_query.ScanResult * @static * @param {pg_query.IScanResult} message ScanResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ScanResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ScanResult message from the specified reader or buffer. * @function decode * @memberof pg_query.ScanResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {pg_query.ScanResult} ScanResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ScanResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.pg_query.ScanResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { message.version = reader.int32(); break; } case 2: { if (!(message.tokens && message.tokens.length)) message.tokens = []; message.tokens.push($root.pg_query.ScanToken.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ScanResult message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof pg_query.ScanResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {pg_query.ScanResult} ScanResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ScanResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ScanResult message. * @function verify * @memberof pg_query.ScanResult * @static * @param {Object.<string,*>} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ScanResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.version != null && message.hasOwnProperty("version")) if (!$util.isInteger(message.version)) return "version: integer expected"; if (message.tokens != null && message.hasOwnProperty("tokens")) { if (!Array.isArray(message.tokens)) return "tokens: array expected"; for (var i = 0; i < message.tokens.length; ++i) { var error = $root.pg_query.ScanToken.verify(message.tokens[i]); if (error) return "tokens." + error; } } return null; }; /** * Creates a ScanResult message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof pg_query.ScanResult * @static * @param {Object.<string,*>} object Plain object * @returns {pg_query.ScanResult} ScanResult */ ScanResult.fromObject = function fromObject(object) { if (object instanceof $root.pg_query.ScanResult) return object; var message = new $root.pg_query.ScanResult(); if (object.version != null) message.version = object.version | 0; if (object.tokens) { if (!Array.isArray(object.tokens)) throw TypeError(".pg_query.ScanResult.tokens: array expected"); message.tokens = []; for (var i = 0; i < object.tokens.length; ++i) { if (typeof object.tokens[i] !== "object") throw TypeError(".pg_query.ScanResult.tokens: object expected"); message.tokens[i] = $root.pg_query.ScanToken.fromObject(object.tokens[i]); } } return message; }; /** * Creates a plain object from a ScanResult message. Also converts values to other types if specified. * @function toObject * @memberof pg_query.ScanResult * @static * @param {pg_query.ScanResult} message ScanResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.<string,*>} Plain object */ ScanResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.tokens = []; if (options.defaults) object.version = 0; if (message.version != null && message.hasOwnProperty("version")) object.version = message.version; if (message.tokens && message.tokens.length) { object.tokens = []; for (var j = 0; j < message.tokens.length; ++j) object.tokens[j] = $root.pg_query.ScanToken.toObject(message.tokens[j], options); } return object; }; /** * Converts this ScanResult to JSON. * @function toJSON * @memberof pg_query.ScanResult * @instance * @returns {Object.<string,*>} JSON object */ ScanResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ScanResult * @function getTypeUrl * @memberof pg_query.ScanResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ScanResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/pg_query.ScanResult"; }; return ScanResult; })(); pg_query.Node = (function() { /** * Properties of a Node. * @memberof pg_query * @interface INode * @property {pg_query.IAlias|null} [Alias] Node Alias * @property {pg_query.IRangeVar|null} [RangeVar] Node RangeVar * @property {pg_query.ITableFunc|null} [TableFunc] Node TableFunc * @property {pg_query.IIntoClause|null} [IntoClause] Node IntoClause * @property {pg_query.IVar|null} [Var] Node Var * @property {pg_query.IParam|null} [Param] Node Param * @property {pg_query.IAggref|null} [Aggref] Node Aggref * @property {pg_query.IGroupingFunc|null} [GroupingFunc] Node GroupingFunc * @property {pg_query.IWindowFunc|null} [WindowFunc] Node WindowFunc * @property {pg_query.IWindowFuncRunCondition|null} [WindowFuncRunCondition] Node WindowFuncRunCondition * @property {pg_query.IMergeSupportFunc|null} [MergeSupportFunc] Node MergeSupportFunc * @property {pg_query.ISubscriptingRef|null} [SubscriptingRef] Node SubscriptingRef * @property {pg_query.IFuncExpr|null} [FuncExpr] Node FuncExpr * @property {pg_query.INamedArgExpr|null} [NamedArgExpr] Node NamedArgExpr * @property {pg_query.IOpExpr|null} [OpExpr] Node OpExpr * @property {pg_query.IDistinctExpr|null} [DistinctExpr] Node DistinctExpr * @property {pg_query.INullIfExpr|null} [NullIfExpr] Node NullIfExpr * @property {pg_query.IScalarArrayOpExpr|null} [ScalarArrayOpExpr] Node ScalarArrayOpExpr * @property {pg_query.IBoolExpr|null} [BoolExpr] Node BoolExpr * @property {pg_query.ISubLink|null} [SubLink] Node SubLink * @property {pg_query.ISubPlan|null} [SubPlan] Node SubPlan * @property {pg_query.IAlternativeSubPlan|null} [AlternativeSubPlan] Node AlternativeSubPlan * @property {pg_query.IFieldSelect|null} [FieldSelect] Node FieldSelect * @property {pg_query.IFieldStore|null} [FieldStore] Node FieldStore * @property {pg_query.IRelabelType|null} [RelabelType] Node RelabelType * @property {pg_query.ICoerceViaIO|null} [CoerceViaIO] Node CoerceViaIO * @property {pg_query.IArrayCoerceExpr|null} [ArrayCoerceExpr] Node ArrayCoerceExpr * @property {pg_query.IConvertRowtypeExpr|null} [ConvertRowtypeExpr] Node ConvertRowtypeExpr * @property {pg_query.ICollateExpr|null} [CollateExpr] Node CollateExpr * @property {pg_query.ICaseExpr|null} [CaseExpr] Node CaseExpr * @property {pg_query.ICaseWhen|null} [CaseWhen] Node CaseWhen * @property {pg_query.ICaseTestExpr|null} [CaseTestExpr] Node CaseTestExpr * @property {pg_query.IArrayExpr|null} [ArrayExpr] Node ArrayExpr * @property {pg_query.IRowExpr|null} [RowExpr] Node RowExpr * @property {pg_query.IRowCompareExpr|null} [RowCompareExpr] Node RowCompareExpr * @property {pg_query.ICoalesceExpr|null} [CoalesceExpr] Node CoalesceExpr * @property {pg_query.IMinMaxExpr|null} [MinMaxExpr] Node MinMaxExpr * @property {pg_query.ISQLValueFunction|null} [SQLValueFunction] Node SQLValueFunction * @property {pg_query.IXmlExpr|null} [XmlExpr] Node XmlExpr * @property {pg_query.IJsonFormat|null} [JsonFormat] Node JsonFormat * @property {pg_query.IJsonReturning|null} [JsonReturning] Node JsonReturning * @property {pg_query.IJsonValueExpr|null} [JsonValueExpr] Node JsonValueExpr * @property {pg_query.IJsonConstructorExpr|null} [JsonConstructorExpr] Node JsonConstructorExpr * @property {pg_query.IJsonIsPredicate|null} [JsonIsPredicate] Node JsonIsPredicate * @property {pg_query.IJsonBehavior|null} [JsonBehavior] Node JsonBehavior * @property {pg_query.IJsonExpr|null} [JsonExpr] Node JsonExpr * @property {pg_query.IJsonTablePath|null} [JsonTablePath] Node JsonTablePath * @property {pg_query.IJsonTablePathScan|null} [JsonTablePathScan] Node JsonTablePathScan * @property {pg_query.IJsonTableSiblingJoin|null} [JsonTableSiblingJoin] Node JsonTableSiblingJoin * @property {pg_query.INullTest|null} [NullTest] Node NullTest * @property {pg_query.IBooleanTest|null} [BooleanTest] Node BooleanTest * @property {pg_query.IMergeAction|null} [MergeAction] Node MergeAction * @property {pg_query.ICoerceToDomain|null} [CoerceToDomain] Node CoerceToDomain * @property {pg_query.ICoerceToDomainValue|null} [CoerceToDomainValue] Node CoerceToDomainValue * @property {pg_query.ISetToDefault|null} [SetToDefault] Node SetToDefault * @property {pg_query.ICurrentOfExpr|null} [CurrentOfExpr] Node CurrentOfExpr * @property {pg_query.INextValueExpr|null} [NextValueExpr] Node NextValueExpr * @property {pg_query.IInferenceElem|null} [InferenceElem] Node InferenceElem * @property {pg_query.ITargetEntry|null} [TargetEntry] Node TargetEntry * @property {pg_query.IRangeTblRef|null} [RangeTblRef] Node RangeTblRef * @property {pg_query.IJoinExpr|null} [JoinExpr] Node JoinExpr * @property {pg_query.IFromExpr|null} [FromExpr] Node FromExpr * @property {pg_query.IOnConflictExpr|null} [OnConflictExpr] Node OnConflictExpr * @property {pg_query.IQuery|null} [Query] Node Query * @property {pg_query.ITypeName|null} [TypeName] Node TypeName * @property {pg_query.IColumnRef|null} [ColumnRef] Node ColumnRef * @property {pg_query.IParamRef|null} [ParamRef] Node ParamRef * @property {pg_query.IA_Expr|null} [A_Expr] Node A_Expr * @property {pg_query.ITypeCast|null} [TypeCast] Node TypeCast * @property {pg_query.ICollateClause|null} [CollateClause] Node CollateClause * @property {pg_query.IRoleSpec|null} [RoleSpec] Node RoleSpec * @property {pg_query.IFuncCall|null} [FuncCall] Node FuncCall * @property {pg_query.IA_Star|null} [A_Star] Node A_Star * @property {pg_query.IA_Indices|null} [A_Indices] Node A_Indices * @property {pg_query.IA_Indirection|null} [A_Indirection] Node A_Indirection * @property {pg_query.IA_ArrayExpr|null} [A_ArrayExpr] Node A_ArrayExpr * @property {pg_query.IResTarget|null} [ResTarget] Node ResTarget * @property {pg_query.IMultiAssignRef|null} [MultiAssignRef] Node MultiAssignRef * @property {pg_query.ISortBy|null} [SortBy] Node SortBy * @property {pg_query.IWindowDef|null} [WindowDef] Node WindowDef * @property {pg_query.IRangeSubselect|null} [RangeSubselect] Node RangeSubselect * @property {pg_query.IRangeFunction|null} [RangeFunction] Node RangeFunction * @property {pg_query.IRangeTableFunc|null} [RangeTableFunc] Node RangeTableFunc * @property {pg_query.IRangeTableFuncCol|null} [RangeTableFuncCol] Node RangeTableFuncCol * @property {pg_query.IRangeTableSample|null} [RangeTableSample] Node RangeTableSample * @property {pg_query.IColumnDef|null} [ColumnDef] Node ColumnDef * @property {pg_query.ITableLikeClause|null} [TableLikeClause] Node TableLikeClause * @property {pg_query.IIndexElem|null} [IndexElem] Node IndexElem * @property {pg_query.IDefElem|null} [DefElem] Node DefElem * @property {pg_query.ILockingClause|null} [LockingClause] Node LockingClause * @property {pg_query.IXmlSerialize|null} [XmlSerialize] Node XmlSerialize * @property {pg_query.IPartitionElem|null} [PartitionElem] Node PartitionElem * @property {pg_query.IPartitionSpec|null} [PartitionSpec] Node PartitionSpec * @property {pg_query.IPartitionBoundSpec|null} [PartitionBoundSpec] Node PartitionBoundSpec * @property {pg_query.IPartitionRangeDatum|null} [PartitionRangeDatum] Node PartitionRangeDatum * @property {pg_query.ISinglePartitionSpec|null} [SinglePartitionSpec] Node SinglePartitionSpec * @property {pg_query.IPartitionCmd|null} [PartitionCmd] Node PartitionCmd * @property {pg_query.IRangeTblEntry|null} [RangeTblEntry] Node RangeTblEntry * @property {pg_query.IRTEPermissionInfo|null} [RTEPermissionInfo] Node RTEPermissionInfo * @property {pg_query.IRangeTblFunction|null} [RangeTblFunction] Node RangeTblFunction * @property {pg_query.ITableSampleClause|null} [TableSampleClause] Node TableSampleClause * @property {pg_query.IWithCheckOption|null} [WithCheckOption] Node WithCheckOption * @property {pg_query.ISortGroupClause|null} [SortGroupClause] Node SortGroupClause * @property {pg_query.IGroupingSet|null} [GroupingSet] Node GroupingSet * @property {pg_query.IWindowClause|null} [WindowClause] Node WindowClause * @property {pg_query.IRowMarkClause|null} [RowMarkClause] Node RowMarkClause * @property {pg_query.IWithClause|null} [WithClause] Node WithClause * @property {pg_query.IInferClause|null} [InferClause] Node InferClause * @property {pg_query.IOnConflictClause|null} [OnConflictClause] Node OnConflictClause * @property {pg_query.ICTESearchClause|null} [CTESearchClause] Node CTESearchClause * @property {pg_query.ICTECycleClause|null} [CTECycleClause] Node CTECycleClause * @property {pg_query.ICommonTableExpr|null} [CommonTableExpr] Node CommonTableExpr * @property {pg_query.IMergeWhenClause|null} [MergeWhenClause] Node MergeWhenClause * @property {pg_query.ITriggerTransition|null} [TriggerTransition] Node TriggerTransition * @property {pg_query.IJsonOutput|null} [JsonOutput] Node JsonOutput * @property {pg_query.IJsonArgument|null} [JsonArgument] Node JsonArgument * @property {pg_query.IJsonFuncExpr|null} [JsonFuncExpr] Node JsonFuncExpr * @property {pg_query.IJsonTablePathSpec|null} [JsonTablePathSpec] Node JsonTablePathSpec * @property {pg_query.IJsonTable|null} [JsonTable] Node JsonTable * @property {pg_query.IJsonTableColumn|null} [JsonTableColumn] Node JsonTableColumn * @property {pg_query.IJsonKeyValue|null} [JsonKeyValue] Node JsonKeyValue * @property {pg_query.IJsonParseExpr|null} [JsonParseExpr] Node JsonParseExpr * @property {pg_query.IJsonScalarExpr|null} [JsonScalarExpr] Node JsonScalarExpr * @property {pg_query.IJsonSerializeExpr|null} [JsonSerializeExpr] Node JsonSerializeExpr * @property {pg_query.IJsonObjectConstructor|null} [JsonObjectConstructor] Node JsonObjectConstructor * @property {pg_query.IJsonArrayConstructor|null} [JsonArrayConstructor] Node JsonArrayConstructor * @property {pg_query.IJsonArrayQueryConstructor|null} [JsonArrayQueryConstructor] Node JsonArrayQueryConstructor * @property {pg_query.IJsonAggConstructor|null} [JsonAggConstructor] Node JsonAggConstructor * @property {pg_query.IJsonObjectAgg|null} [JsonObjectAgg] Node JsonObjectAgg * @property {pg_query.IJsonArrayAgg|null} [JsonArrayAgg] Node JsonArrayAgg * @property {pg_query.IRawStmt|null} [RawStmt] Node RawStmt * @property {pg_query.IInsertStmt|null} [InsertStmt] Node InsertStmt * @property {pg_query.IDeleteStmt|null} [DeleteStmt] Node DeleteStmt * @property {pg_query.IUpdateStmt|null} [UpdateStmt] Node UpdateStmt * @property {pg_query.IMergeStmt|null} [MergeStmt] Node MergeStmt * @property {pg_query.ISelectStmt|null} [SelectStmt] Node SelectStmt * @property {pg_query.ISetOperationStmt|null} [SetOperationStmt] Node SetOperationStmt * @property {pg_query.IReturnStmt|null} [ReturnStmt] Node ReturnStmt * @property {pg_query.IPLAssignStmt|null} [PLAssignStmt] Node PLAssignStmt * @property {pg_query.ICreateSchemaStmt|null} [CreateSchemaStmt] Node CreateSchemaStmt * @property {pg_query.IAlterTableStmt|null} [AlterTableStmt] Node AlterTableStmt * @property {pg_query.IReplicaIdentityStmt|null} [ReplicaIdentityStmt] Node ReplicaIdentityStmt * @property {pg_query.IAlterTableCmd|null} [AlterTableCmd] Node AlterTableCmd * @property {pg_query.IAlterCollationStmt|null} [AlterCollationStmt] Node AlterCollationStmt * @property {pg_query.IAlterDomainStmt|null} [AlterDomainStmt] Node AlterDomainStmt * @property {pg_query.IGrantStmt|null} [GrantStmt] Node GrantStmt * @property {pg_query.IObjectWithArgs|null} [ObjectWithArgs] Node ObjectWithArgs * @property {pg_query.IAccessPriv|null} [AccessPriv] Node AccessPriv * @property {pg_query.IGrantRoleStmt|null} [GrantRoleStmt] Node GrantRoleStmt * @property {pg_query.IAlterDefaultPrivilegesStmt|null} [AlterDefaultPrivilegesStmt] Node AlterDefaultPrivilegesStmt * @property {pg_query.ICopyStmt|null} [CopyStmt] Node CopyStmt * @property {pg_query.IVariableSetStmt|null} [VariableSetStmt] Node VariableSetStmt * @property {pg_query.IVariableShowStmt|null} [VariableShowStmt] Node VariableShowStmt * @property {pg_query.ICreateStmt|null} [CreateStmt] Node CreateStmt * @property {pg_query.IConstraint|null} [Constraint] Node Constraint * @property {pg_query.ICreateTableSpaceStmt|null} [CreateTableSpaceStmt] Node CreateTableSpaceStmt * @property {pg_query.IDropTableSpaceStmt|null} [DropTableSpaceStmt] Node DropTableSpaceStmt * @property {pg_query.IAlterTableSpaceOptionsStmt|null} [AlterTableSpaceOptionsStmt] Node AlterTableSpaceOptionsStmt * @property {pg_query.IAlterTableMoveAllStmt|null} [AlterTableMoveAllStmt] Node AlterTableMoveAllStmt * @property {pg_query.ICreateExtensionStmt|null} [CreateExtensionStmt] Node CreateExtensionStmt * @property {pg_query.IAlterExtensionStmt|null} [AlterExtensionStmt] Node AlterExtensionStmt * @property {pg_query.IAlterExtensionContentsStmt|null} [AlterExtensionContentsStmt] Node AlterExtensionContentsStmt * @property {pg_query.ICreateFdwStmt|null} [CreateFdwStmt] Node CreateFdwStmt * @property {pg_query.IAlterFdwStmt|null} [AlterFdwStmt] Node AlterFdwStmt * @property {pg_query.ICreateForeignServerStmt|null} [CreateForeignServerStmt] Node CreateForeignServerStmt * @property {pg_query.IAlterForeignServerStmt|null} [AlterForeignServerStmt] Node AlterForeignServerStmt * @property {pg_query.ICreateForeignTableStmt|null} [CreateForeignTableStmt] Node CreateForeignTableStmt * @property {pg_query.ICreateUserMappingStmt|null} [CreateUserMappingStmt] Node CreateUserMappingStmt * @property {pg_query.IAlterUserMappingStmt|null} [AlterUserMappingStmt] Node AlterUserMappingStmt * @property {pg_query.IDropUserMappingStmt|null} [DropUserMappingStmt] Node DropUserMappingStmt * @property {pg_query.IImportForeignSchemaStmt|null} [ImportForeignSchemaStmt] Node ImportForeignSchemaStmt * @property {pg_query.ICreatePolicyStmt|null} [CreatePolicyStmt] Node CreatePolicyStmt * @property {pg_query.IAlterPolicyStmt|null} [AlterPolicyStmt] Node AlterPolicyStmt * @property {pg_query.ICreateAmStmt|null} [CreateAmStmt] Node CreateAmStmt * @property {pg_query.ICreateTrigStmt|null} [CreateTrigStmt] Node CreateTrigStmt * @property {pg_query.ICreateEventTrigStmt|null} [CreateEventTrigStmt] Node CreateEventTrigStmt * @property {pg_query.IAlterEventTrigStmt|null} [AlterEventTrigStmt] Node AlterEventTrigStmt * @property {pg_query.ICreatePLangStmt|null} [CreatePLangStmt] Node CreatePLangStmt * @property {pg_query.ICreateRoleStmt|null} [CreateRoleStmt] Node CreateRoleStmt * @property {pg_query.IAlterRoleStmt|null} [AlterRoleStmt] Node AlterRoleStmt * @property {pg_query.IAlterRoleSetStmt|null} [AlterRoleSetStmt] Node AlterRoleSetStmt * @property {pg_query.IDropRoleStmt|null} [DropRoleStmt] Node DropRoleStmt * @property {pg_query.ICreateSeqStmt|null} [CreateSeqStmt] Node CreateSeqStmt * @property {pg_query.IAlterSeqStmt|null} [AlterSeqStmt] Node AlterSeqStmt * @property {pg_query.IDefineStmt|null} [DefineStmt] Node DefineStmt * @property {pg_query.ICreateDomainStmt|null} [CreateDomainStmt] Node CreateDomainStmt * @property {pg_query.ICreateOpClassStmt|null} [CreateOpClassStmt] Node CreateOpClassStmt * @property {pg_query.ICreateOpClassItem|null} [CreateOpClassItem] Node CreateOpClassItem * @property {pg_query.ICreateOpFamilyStmt|null} [CreateOpFamilyStmt] Node CreateOpFamilyStmt * @property {pg_query.IAlterOpFamilyStmt|null} [AlterOpFamilyStmt] Node AlterOpFamilyStmt * @property {pg_query.IDropStmt|null} [DropStmt] Node DropStmt * @property {pg_query.ITruncateStmt|null} [TruncateStmt] Node TruncateStmt * @property {pg_query.ICommentStmt|null} [CommentStmt] Node CommentStmt * @property {pg_query.ISecLabelStmt|null} [SecLabelStmt] Node SecLabelStmt * @property {pg_query.IDeclareCursorStmt|null} [DeclareCursorStmt] Node DeclareCursorStmt * @property {pg_query.IClosePortalStmt|null} [ClosePortalStmt] Node ClosePortalStmt * @property {pg_query.IFetchStmt|null} [FetchStmt] Node FetchStmt * @property {pg_query.IIndexStmt|null} [IndexStmt] Node IndexStmt * @property {pg_query.ICreateStatsStmt|null} [CreateStatsStmt] Node CreateStatsStmt * @property {pg_query.IStatsElem|null} [StatsElem] Node StatsElem * @property {pg_query.IAlterStatsStmt|null} [AlterStatsStmt] Node AlterStatsStmt * @property {pg_query.ICreateFunctionStmt|null} [CreateFunctionStmt] Node CreateFunctionStmt * @property {pg_query.IFunctionParameter|null} [FunctionParameter] Node FunctionParameter * @property {pg_query.IAlterFunctionStmt|null} [AlterFunctionStmt] Node AlterFunctionStmt * @property {pg_query.IDoStmt|null} [DoStmt] Node DoStmt * @property {pg_query.IInlineCodeBlock|null} [InlineCodeBlock] Node InlineCodeBlock * @property {pg_query.ICallStmt|null} [CallStmt] Node CallStmt * @property {pg_query.ICallContext|null} [CallContext] Node CallContext * @property {pg_query.IRenameStmt|null} [RenameStmt] Node RenameStmt * @property {pg_query.IAlterObjectDependsStmt|null} [AlterObjectDependsStmt] Node AlterObjectDependsStmt * @property {pg_query.IAlterObjectSchemaStmt|null} [AlterObjectSchemaStmt] Node AlterObjectSchemaStmt * @property {pg_query.IAlterOwnerStmt|null} [AlterOwnerStmt] Node AlterOwnerStmt * @property {pg_query.IAlterOperatorStmt|null} [AlterOperatorStmt] Node AlterOperatorStmt * @property {pg_query.IAlterTypeStmt|null} [AlterTypeStmt] Node AlterTypeStmt * @property {pg_query.IRuleStmt|null} [RuleStmt] Node RuleStmt * @property {pg_query.INotifyStmt|null} [NotifyStmt] Node NotifyStmt * @property {pg_query.IListenStmt|null} [ListenStmt] Node ListenStmt * @property {pg_query.IUnlistenStmt|null} [UnlistenStmt] Node UnlistenStmt * @property {pg_query.ITransactionStmt|null} [TransactionStmt] Node TransactionStmt * @property {pg_query.ICompositeTypeStmt|null} [CompositeTypeStmt] Node CompositeTypeStmt * @property {pg_query.ICreateEnumStmt|null} [CreateEnumStmt] Node CreateEnumStmt * @property {pg_query.ICreateRangeStmt|null} [CreateRangeStmt] Node CreateRangeStmt * @property {pg_query.IAlterEnumStmt|null} [AlterEnumStmt] Node AlterEnumStmt * @property {pg_query.IViewStmt|null} [ViewStmt] Node ViewStmt * @property {pg_query.ILoadStmt|null} [LoadStmt] Node LoadStmt * @property {pg_query.ICreatedbStmt|null} [CreatedbStmt] Node CreatedbStmt * @property {pg_query.IAlterDatabaseStmt|null} [AlterDatabaseStmt] Node AlterDatabaseStmt * @property {pg_query.IAlterDatabaseRefreshCollStmt|null} [AlterDatabaseRefreshCollStmt] Node AlterDatabaseRefreshCollStmt * @property {pg_query.IAlterDatabaseSetStmt|null} [AlterDatabaseSetStmt] Node AlterDatabaseSetStmt * @property {pg_query.IDropdbStmt|null} [DropdbStmt] Node DropdbStmt * @property {pg_query.IAlterSystemStmt|null} [AlterSystemStmt] Node AlterSystemStmt * @property {pg_query.IClusterStmt|null} [ClusterStmt] Node ClusterStmt * @property {pg_query.IVacuumStmt|null} [VacuumStmt] Node VacuumStmt * @property {pg_query.IVacuumRelation|null} [VacuumRelation] Node VacuumRelation * @property {pg_query.IExplainStmt|null} [ExplainStmt] Node ExplainStmt * @property {pg_query.ICreateTableAsStmt|null} [CreateTableAsStmt] Node CreateTableAsStmt * @property {pg_query.IRefreshMatViewStmt|null} [RefreshMatViewStmt] Node RefreshMatViewStmt * @property {pg_query.ICheckPointStmt|null} [CheckPointStmt] Node CheckPointStmt * @property {pg_query.IDiscardStmt|null} [DiscardStmt] Node DiscardStmt * @property {pg_query.ILockStmt|null} [LockStmt] Node LockStmt * @property {pg_query.IConstraintsSetStmt|null} [ConstraintsSetStmt] Node ConstraintsSetStmt * @property {pg_query.IReindexStmt|null} [ReindexStmt] Node ReindexStmt * @property {pg_query.ICreateConversionStmt|null} [CreateConversionStmt] Node CreateConversionStmt * @property {pg_query.ICreateCastStmt|null} [CreateCastStmt] Node CreateCastStmt * @property {pg_query.ICreateTransformStmt|null} [CreateTransformStmt] Node CreateTransformStmt * @property {pg_query.IPrepareStmt|null} [PrepareStmt] Node PrepareStmt * @property {pg_query.IExecuteStmt|null} [ExecuteStmt] Node ExecuteStmt * @property {pg_query.IDeallocateStmt|null} [DeallocateStmt] Node DeallocateStmt * @property {pg_query.IDropOwnedStmt|null} [DropOwnedStmt] Node DropOwnedStmt * @property {pg_query.IReassignOwnedStmt|null} [ReassignOwnedStmt] Node ReassignOwnedStmt * @property {pg_query.IAlterTSDictionaryStmt|null} [AlterTSDictionaryStmt] Node AlterTSDictionaryStmt * @property {pg_query.IAlterTSConfigurationStmt|null} [AlterTSConfigurationStmt] Node AlterTSConfigurationStmt * @property {pg_query.IPublicationTable|null} [PublicationTable] Node PublicationTable * @property {pg_query.IPublicationObjSpec|null} [PublicationObjSpec] Node PublicationObjSpec * @property {pg_query.ICreatePublicationStmt|null} [CreatePublicationStmt] Node CreatePublicationStmt * @property {pg_query.IAlterPublicationStmt|null} [AlterPublicationStmt] Node AlterPublicationStmt * @property {pg_query.ICreateSubscriptionStmt|null} [CreateSubscriptionStmt] Node CreateSubscriptionStmt * @property {pg_query.IAlterSubscriptionStmt|null} [AlterSubscriptionStmt] Node AlterSubscriptionStmt * @property {pg_query.IDropSubscriptionStmt|null} [DropSubscriptionStmt] Node DropSubscriptionStmt * @property {pg_query.IInteger|null} [Integer] Node Integer * @property {pg_query.IFloat|null} [Float] Node Float * @property {pg_query.IBoolean|null} [Boolean] Node Boolean * @property {pg_query.IString|null} [String] Node String * @property {pg_query.IBitString|null} [BitString] Node BitString * @property {pg_query.IList|null} [List] Node List * @property {pg_query.IIntList|null} [IntList] Node IntList * @property {pg_query.IOidList|null} [OidList] Node OidList * @property {pg_query.IA_Const|null} [A_Const] Node A_Const */ /** * Constructs a new Node. * @memberof pg_query * @classdesc Represents a Node. * @implements INode * @constructor * @param {pg_query.INode=} [properties] Properties to set */ function Node(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } /** * Node Alias. * @member {pg_query.IAlias|null|undefined} Alias * @memberof pg_query.Node * @instance */ Node.prototype.Alias = null; /** * Node RangeVar. * @member {pg_query.IRangeVar|null|undefined} RangeVar * @memberof pg_query.Node * @instance */ Node.prototype.RangeVar = null; /** * Node TableFunc. * @member {pg_query.ITableFunc|null|undefined} TableFunc * @memberof pg_query.Node * @instance */ Node.prototype.TableFunc = null; /** * Node IntoClause. * @member {pg_query.IIntoClause|null|undefined} IntoClause * @memberof pg_query.Node * @instance */ Node.prototype.IntoClause = null; /** * Node Var. * @member {pg_query.IVar|null|undefined