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

Support for JSON operators column->path and column->>path

    Details

    • Type: Task
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: JSON
    • Labels:
      None

      Description

      Function JSON_EXTRACT() in MariaDB 10.2.x don't support column->path and column->>path operators that are supported in MySQL since version 5.7.13.
      https://mariadb.com/kb/en/mariadb/json_extract

      More details about syntax and examples here.

      It work and in MySQL and in MariaDB.

      SELECT JSON_EXTRACT('{"id":"1", "name":"Name"}', '$.name') `name`;
      SELECT JSON_UNQUOTE(JSON_EXTRACT('{"id":"1", "name":"Name"}', '$.name')) `name`;
      

      It work only in MySQL.

      SELECT '{"id":"1", "name":"Name"}'->'$.name' `name`;
      SELECT '{"id":"1", "name":"Name"}'->>'$.name' `name`;
      

      https://dev.mysql.com/doc/refman/5.7/en/json-search-functions.html#operator_json-column-path
      https://dev.mysql.com/doc/refman/5.7/en/json-search-functions.html#operator_json-inline-path

      Because of this issue, I can't transparent migrate all my projects from MySQL to MariaDB.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ilya Илья Индиго
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: