[MDEV-19888] Add abstract class Item_json_func Created: 2019-06-27  Updated: 2019-06-28  Resolved: 2019-06-28

Status: Closed
Project: MariaDB Server
Component/s: Data types
Fix Version/s: 10.5.0

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed
blocks MDEV-17832 Protocol: extensions for Pluggable ty... Closed

 Description   

Client-server protocol will be extended soon to return extended data type information in result set metadata.
All functions returning JSON will mark themself of having the "json" format.

In order to reuse the code easier, let's introduce a new abstract class Item_json_func and derive all Item_str_func descendants returning JSON (and implemented in item_jsonfunc.h) from this new class.

So the class hierarchy in item_jsonfunc.h will look like this:

Item_str_func
  Item_json_func
    Item_func_json_query
    Item_json_str_multipath
      Item_func_json_extract
      Item_func_json_array_append
        Item_func_json_array_insert
      Item_func_json_insert
      Item_func_json_remove
      Item_func_json_search
    Item_func_json_array
      Item_func_json_object
      Item_func_json_merge
        Item_func_json_merge_patch
    Item_func_json_format
  Item_func_json_value
  Item_func_json_quote
  Item_func_json_unquote
  Item_func_json_type
  Item_func_json_keys

Note, we earlier did the same for other data types, e.g.:

  • Item_timefunc
  • Item_datefunc
  • Item_datetimefunc
  • Item_geometry_func
    etc.

Generated at Thu Feb 08 08:55:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.