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

Add JSON_DECODE() function to decode a json string to a dynamic column structure

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Dynamic column functionality includes a COLUMN_JSON() function to transform a dynamic column structure to a JSON string. It would be handy to also have a counterpart function that decodes a JSON string into a dynamic column structure. It could potentially be used like this

      SELECT COLUMN_GET(JSON_DECODE('{"child_column":12345}'), 'child_column' AS int);
      SELECT COLUMN_GET(COLUMN_GET(JSON_DECODE('{"parent_column":{"child_column":12345}}'), 'parent_column' AS char), 'child_column' AS int);
      

      I currently store quite some JSON values as TEXT in tables, so alternatively this could also allow me to use JSON_DECODE() on INSERT to store it as a dynamic column structure directly.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                pprkut Heinz Wiesinger
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: