@@ -3599,6 +3599,125 @@ func_expr_common_subexpr
35993599 | XMLPI OPEN_PAREN NAME_P collabel (COMMA a_expr)? CLOSE_PAREN
36003600 | XMLROOT OPEN_PAREN XML_P a_expr COMMA xml_root_version opt_xml_root_standalone? CLOSE_PAREN
36013601 | XMLSERIALIZE OPEN_PAREN document_or_content a_expr AS simpletypename CLOSE_PAREN
3602+ | JSON_OBJECT ' (' func_arg_list ' )'
3603+ | JSON_OBJECT ' (' json_name_and_value_list json_object_constructor_null_clause? json_key_uniqueness_constraint? json_returning_clause? ' )'
3604+ | JSON_OBJECT ' (' json_returning_clause? ' )'
3605+ | JSON_ARRAY ' (' json_value_expr_list json_array_constructor_null_clause? json_returning_clause? ' )'
3606+ | JSON_ARRAY ' (' select_no_parens json_format_clause_opt? json_returning_clause? ' )'
3607+ | JSON_ARRAY ' (' json_returning_clause? ' )'
3608+ | JSON ' (' json_value_expr json_key_uniqueness_constraint? ' )'
3609+ | JSON_SCALAR ' (' a_expr ' )'
3610+ | JSON_SERIALIZE ' (' json_value_expr json_returning_clause? ' )'
3611+ | MERGE_ACTION ' (' ' )'
3612+ | JSON_QUERY ' ('
3613+ json_value_expr ' ,' a_expr json_passing_clause?
3614+ json_returning_clause?
3615+ json_wrapper_behavior
3616+ json_quotes_clause?
3617+ json_behavior_clause?
3618+ ' )'
3619+ | JSON_EXISTS ' ('
3620+ json_value_expr ' ,' a_expr json_passing_clause?
3621+ json_on_error_clause?
3622+ ' )'
3623+ | JSON_VALUE ' ('
3624+ json_value_expr ' ,' a_expr json_passing_clause?
3625+ json_returning_clause?
3626+ json_behavior_clause?
3627+ ' )'
3628+ ;
3629+
3630+ json_on_error_clause
3631+ : json_behavior ON ERROR
3632+ ;
3633+
3634+ json_behavior_clause
3635+ : json_behavior ON EMPTY
3636+ | json_behavior ON ERROR
3637+ | json_behavior ON EMPTY json_behavior ON ERROR
3638+ ;
3639+
3640+ json_behavior
3641+ : DEFAULT a_expr
3642+ | json_behavior_type
3643+ ;
3644+
3645+ json_behavior_type
3646+ : ERROR
3647+ | NULL_P
3648+ | TRUE_P
3649+ | FALSE_P
3650+ | UNKNOWN
3651+ | EMPTY ARRAY
3652+ | EMPTY OBJECT_P
3653+ | EMPTY
3654+ ;
3655+
3656+ json_quotes_clause
3657+ : (KEEP | OMIT ) QUOTES (ON SCALAR STRING )
3658+ ;
3659+
3660+ json_wrapper_behavior
3661+ : WITHOUT ARRAY ? WRAPPER
3662+ | WITH (CONDITIONAL | UNCONDITIONAL )? ARRAY ? WRAPPER
3663+ ;
3664+
3665+ json_passing_clause
3666+ : PASSING json_arguments
3667+ ;
3668+
3669+ json_arguments
3670+ : json_argument (COMMA json_argument)*
3671+ ;
3672+
3673+ json_argument
3674+ : json_value_expr AS collabel
3675+ ;
3676+
3677+ json_format_clause_opt
3678+ : FORMAT JSON ENCODING name
3679+ | FORMAT JSON
3680+ ;
3681+
3682+ json_value_expr_list
3683+ : json_value_expr (COMMA json_value_expr)*
3684+ ;
3685+
3686+ json_returning_clause
3687+ : RETURNING typename json_format_clause?
3688+ ;
3689+
3690+ json_key_uniqueness_constraint
3691+ : WITH UNIQUE KEYS ?
3692+ | WITHOUT UNIQUE KEYS ?
3693+ ;
3694+
3695+ json_array_constructor_null_clause
3696+ : NULL_P ON NULL_P
3697+ | ABSENT ON NULL_P
3698+ ;
3699+
3700+ json_object_constructor_null_clause
3701+ : NULL_P ON NULL_P
3702+ | ABSENT ON NULL_P
3703+ ;
3704+
3705+ json_name_and_value_list
3706+ : json_name_and_value (COMMA json_name_and_value)*
3707+ ;
3708+
3709+ json_name_and_value
3710+ : c_expr VALUE_P json_value_expr
3711+ | a_expr COLON json_value_expr
3712+ ;
3713+
3714+ json_value_expr
3715+ : a_expr json_format_clause?
3716+ ;
3717+
3718+ json_format_clause
3719+ : FORMAT JSON ENCODING name
3720+ | FORMAT JSON
36023721 ;
36033722
36043723xml_root_version
0 commit comments