Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37072

Support for IS JSON predicate

    XMLWordPrintable

Details

    • Hide
      Support for the SQL standard IS JSON predicate has been added.
      * Syntax:
      expr IS [ NOT ] JSON [ { VALUE | ARRAY | OBJECT | SCALAR } ]
      [ { WITH | WITHOUT } UNIQUE [ KEYS ] ]

      * The predicate allows checking if an expression is valid JSON
      and optionally constrains the JSON type (VALUE, ARRAY, OBJECT,
      SCALAR) and whether object keys are unique.
      Show
      Support for the SQL standard IS JSON predicate has been added. * Syntax: expr IS [ NOT ] JSON [ { VALUE | ARRAY | OBJECT | SCALAR } ] [ { WITH | WITHOUT } UNIQUE [ KEYS ] ] * The predicate allows checking if an expression is valid JSON and optionally constrains the JSON type (VALUE, ARRAY, OBJECT, SCALAR) and whether object keys are unique.

    Description

      https://modern-sql.com/caniuse/is-json

      IS JSON is a predicate to determine if the previous is a JSON object.

      The SQL 2016 syntax is (2:8.22)

      <expr> [ FORMAT JSON [ ENCODING { UTF8 | UTF16 | UTF32 } ] ]
             IS [ NOT ] JSON
             [ { VALUE | ARRAY | OBJECT | SCALAR } ]
             [ { WITH | WITHOUT } UNIQUE [ KEYS ] ]
      

      but can only implement a subset of it, of course.

      With IS being a parsed comparison its a small extension.

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              danblack Daniel Black
              Rucha Deodhar Rucha Deodhar
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.