Skip to content

Commit

Permalink
fix(grammar): JSON_VALUE function should accept multiple ON MISMATCH …
Browse files Browse the repository at this point in the history
…clauses
  • Loading branch information
felipebz committed Sep 30, 2024
1 parent 0985521 commit 4b68157
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"adjsn/clauses-used-in-functions-and-conditions-for-json-1.sql" : [
4
],
"adjsn/clauses-used-in-functions-and-conditions-for-json-14.sql" : [
9
],
"adjsn/conditions-is-json-and-is-not-json-6.sql" : [
6
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ enum class SingleRowSqlFunctionsGrammar : GrammarRuleKey {
b.optional(JSON_VALUE_RETURNING_CLAUSE),
b.optional(JSON_VALUE_ON_ERROR_CLAUSE),
b.optional(JSON_VALUE_ON_EMPTY_CLAUSE),
b.optional(JSON_VALUE_ON_MISMATCH_CLAUSE),
b.zeroOrMore(JSON_VALUE_ON_MISMATCH_CLAUSE),
b.optional(TYPE, b.firstOf(STRICT, LAX)),
RPARENTHESIS
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class JsonValueTest : RuleTest() {
returning varchar2(10) truncate
error on error
error on empty
error on mismatch
error on mismatch (missing data)
ignore on mismatch (extra data)
type strict)""")
}

Expand Down

0 comments on commit 4b68157

Please sign in to comment.