diff options
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 287 |
1 files changed, 0 insertions, 287 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 64b5169f993..3e835b8c465 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1595,293 +1595,6 @@ typedef struct TriggerTransition bool isTable; } TriggerTransition; -/* Nodes for SQL/JSON support */ - -/* - * JsonQuotes - - * representation of [KEEP|OMIT] QUOTES clause for JSON_QUERY() - */ -typedef enum JsonQuotes -{ - JS_QUOTES_UNSPEC, /* unspecified */ - JS_QUOTES_KEEP, /* KEEP QUOTES */ - JS_QUOTES_OMIT /* OMIT QUOTES */ -} JsonQuotes; - -/* - * JsonTableColumnType - - * enumeration of JSON_TABLE column types - */ -typedef enum JsonTableColumnType -{ - JTC_FOR_ORDINALITY, - JTC_REGULAR, - JTC_EXISTS, - JTC_FORMATTED, - JTC_NESTED, -} JsonTableColumnType; - -/* - * JsonOutput - - * representation of JSON output clause (RETURNING type [FORMAT format]) - */ -typedef struct JsonOutput -{ - NodeTag type; - TypeName *typeName; /* RETURNING type name, if specified */ - JsonReturning *returning; /* RETURNING FORMAT clause and type Oids */ -} JsonOutput; - -/* - * JsonArgument - - * representation of argument from JSON PASSING clause - */ -typedef struct JsonArgument -{ - NodeTag type; - JsonValueExpr *val; /* argument value expression */ - char *name; /* argument name */ -} JsonArgument; - -/* - * JsonCommon - - * representation of common syntax of functions using JSON path - */ -typedef struct JsonCommon -{ - NodeTag type; - JsonValueExpr *expr; /* context item expression */ - Node *pathspec; /* JSON path specification expression */ - char *pathname; /* path name, if any */ - List *passing; /* list of PASSING clause arguments, if any */ - int location; /* token location, or -1 if unknown */ -} JsonCommon; - -/* - * JsonFuncExpr - - * untransformed representation of JSON function expressions - */ -typedef struct JsonFuncExpr -{ - NodeTag type; - JsonExprOp op; /* expression type */ - JsonCommon *common; /* common syntax */ - JsonOutput *output; /* output clause, if specified */ - JsonBehavior *on_empty; /* ON EMPTY behavior, if specified */ - JsonBehavior *on_error; /* ON ERROR behavior, if specified */ - JsonWrapper wrapper; /* array wrapper behavior (JSON_QUERY only) */ - bool omit_quotes; /* omit or keep quotes? (JSON_QUERY only) */ - int location; /* token location, or -1 if unknown */ -} JsonFuncExpr; - -/* - * JsonTableColumn - - * untransformed representation of JSON_TABLE column - */ -typedef struct JsonTableColumn -{ - NodeTag type; - JsonTableColumnType coltype; /* column type */ - char *name; /* column name */ - TypeName *typeName; /* column type name */ - char *pathspec; /* path specification, if any */ - char *pathname; /* path name, if any */ - JsonFormat *format; /* JSON format clause, if specified */ - JsonWrapper wrapper; /* WRAPPER behavior for formatted columns */ - bool omit_quotes; /* omit or keep quotes on scalar strings? */ - List *columns; /* nested columns */ - JsonBehavior *on_empty; /* ON EMPTY behavior */ - JsonBehavior *on_error; /* ON ERROR behavior */ - int location; /* token location, or -1 if unknown */ -} JsonTableColumn; - -/* - * JsonTablePlanType - - * flags for JSON_TABLE plan node types representation - */ -typedef enum JsonTablePlanType -{ - JSTP_DEFAULT, - JSTP_SIMPLE, - JSTP_JOINED, -} JsonTablePlanType; - -/* - * JsonTablePlanJoinType - - * flags for JSON_TABLE join types representation - */ -typedef enum JsonTablePlanJoinType -{ - JSTPJ_INNER = 0x01, - JSTPJ_OUTER = 0x02, - JSTPJ_CROSS = 0x04, - JSTPJ_UNION = 0x08, -} JsonTablePlanJoinType; - -typedef struct JsonTablePlan JsonTablePlan; - -/* - * JsonTablePlan - - * untransformed representation of JSON_TABLE plan node - */ -struct JsonTablePlan -{ - NodeTag type; - JsonTablePlanType plan_type; /* plan type */ - JsonTablePlanJoinType join_type; /* join type (for joined plan only) */ - JsonTablePlan *plan1; /* first joined plan */ - JsonTablePlan *plan2; /* second joined plan */ - char *pathname; /* path name (for simple plan only) */ - int location; /* token location, or -1 if unknown */ -}; - -/* - * JsonTable - - * untransformed representation of JSON_TABLE - */ -typedef struct JsonTable -{ - NodeTag type; - JsonCommon *common; /* common JSON path syntax fields */ - List *columns; /* list of JsonTableColumn */ - JsonTablePlan *plan; /* join plan, if specified */ - JsonBehavior *on_error; /* ON ERROR behavior, if specified */ - Alias *alias; /* table alias in FROM clause */ - bool lateral; /* does it have LATERAL prefix? */ - int location; /* token location, or -1 if unknown */ -} JsonTable; - -/* - * JsonKeyValue - - * untransformed representation of JSON object key-value pair for - * JSON_OBJECT() and JSON_OBJECTAGG() - */ -typedef struct JsonKeyValue -{ - NodeTag type; - Expr *key; /* key expression */ - JsonValueExpr *value; /* JSON value expression */ -} JsonKeyValue; - -/* - * JsonParseExpr - - * untransformed representation of JSON() - */ -typedef struct JsonParseExpr -{ - NodeTag type; - JsonValueExpr *expr; /* string expression */ - JsonOutput *output; /* RETURNING clause, if specified */ - bool unique_keys; /* WITH UNIQUE KEYS? */ - int location; /* token location, or -1 if unknown */ -} JsonParseExpr; - -/* - * JsonScalarExpr - - * untransformed representation of JSON_SCALAR() - */ -typedef struct JsonScalarExpr -{ - NodeTag type; - Expr *expr; /* scalar expression */ - JsonOutput *output; /* RETURNING clause, if specified */ - int location; /* token location, or -1 if unknown */ -} JsonScalarExpr; - -/* - * JsonSerializeExpr - - * untransformed representation of JSON_SERIALIZE() function - */ -typedef struct JsonSerializeExpr -{ - NodeTag type; - JsonValueExpr *expr; /* json value expression */ - JsonOutput *output; /* RETURNING clause, if specified */ - int location; /* token location, or -1 if unknown */ -} JsonSerializeExpr; - -/* - * JsonObjectConstructor - - * untransformed representation of JSON_OBJECT() constructor - */ -typedef struct JsonObjectConstructor -{ - NodeTag type; - List *exprs; /* list of JsonKeyValue pairs */ - JsonOutput *output; /* RETURNING clause, if specified */ - bool absent_on_null; /* skip NULL values? */ - bool unique; /* check key uniqueness? */ - int location; /* token location, or -1 if unknown */ -} JsonObjectConstructor; - -/* - * JsonArrayConstructor - - * untransformed representation of JSON_ARRAY(element,...) constructor - */ -typedef struct JsonArrayConstructor -{ - NodeTag type; - List *exprs; /* list of JsonValueExpr elements */ - JsonOutput *output; /* RETURNING clause, if specified */ - bool absent_on_null; /* skip NULL elements? */ - int location; /* token location, or -1 if unknown */ -} JsonArrayConstructor; - -/* - * JsonArrayQueryConstructor - - * untransformed representation of JSON_ARRAY(subquery) constructor - */ -typedef struct JsonArrayQueryConstructor -{ - NodeTag type; - Node *query; /* subquery */ - JsonOutput *output; /* RETURNING clause, if specified */ - JsonFormat *format; /* FORMAT clause for subquery, if specified */ - bool absent_on_null; /* skip NULL elements? */ - int location; /* token location, or -1 if unknown */ -} JsonArrayQueryConstructor; - -/* - * JsonAggConstructor - - * common fields of untransformed representation of - * JSON_ARRAYAGG() and JSON_OBJECTAGG() - */ -typedef struct JsonAggConstructor -{ - NodeTag type; - JsonOutput *output; /* RETURNING clause, if any */ - Node *agg_filter; /* FILTER clause, if any */ - List *agg_order; /* ORDER BY clause, if any */ - struct WindowDef *over; /* OVER clause, if any */ - int location; /* token location, or -1 if unknown */ -} JsonAggConstructor; - -/* - * JsonObjectAgg - - * untransformed representation of JSON_OBJECTAGG() - */ -typedef struct JsonObjectAgg -{ - NodeTag type; - JsonAggConstructor *constructor; /* common fields */ - JsonKeyValue *arg; /* object key-value pair */ - bool absent_on_null; /* skip NULL values? */ - bool unique; /* check key uniqueness? */ -} JsonObjectAgg; - -/* - * JsonArrayAgg - - * untransformed representation of JSON_ARRRAYAGG() - */ -typedef struct JsonArrayAgg -{ - NodeTag type; - JsonAggConstructor *constructor; /* common fields */ - JsonValueExpr *arg; /* array element expression */ - bool absent_on_null; /* skip NULL elements? */ -} JsonArrayAgg; - - /***************************************************************************** * Raw Grammar Output Statements *****************************************************************************/ |