The following table describes the JSON functions supported by OceanBase AI Database.
Function Name |
Description |
|---|---|
| JSON_ARRAY | Creates a JSON array. |
| JSON_ARRAYAGG | Aggregate the results into a single JSON array. |
| JSON_ARRAY_APPEND | Appends a specified value to a JSON document. |
| JSON_APPEND | Appends a specified value to a JSON document. |
| JSON_ARRAY_INSERT | Inserts an array into a JSON document. |
| JSON_CONTAINS | Checks whether the specified JSON document is contained in the target JSON document. |
| JSON_CONTAINS_PATH | Check whether the data in the specified path is contained in the target JSON document. |
| JSON_DEPTH | Returns the maximum depth of a JSON document. |
| JSON_EXTRACT | Returns data from a JSON document. |
| JSON_INSERT | Insert data into a JSON document. |
| JSON_KEYS | Returns an array of keys at the specified path from a JSON document. |
| JSON_LENGTH | Returns the length of the JSON document. |
| JSON_MERGE | Merges multiple JSON documents. |
| JSON_MERGE_PATCH | When merging multiple JSON documents, members with duplicate keys are not retained in the result. |
| JSON_MERGE_PRESERVE | Merges multiple JSON documents. |
| JSON_OBJECT | Create a JSON object. |
| JSON_OVERLAPS | Compares two JSON documents. |
| JSON_PRETTY | Prints the JSON document in the specified format. |
| JSON_QUOTE | Reference JSON documentation |
| JSON_REMOVE | Delete data from a JSON document. |
| JSON_REPLACE | Replace the value in the JSON document. |
| JSON_SEARCH | Returns the path of a value in a JSON document. |
| JSON_SET | Insert data into a JSON document. |
| JSON_STORAGE_SIZE | The binary bytes stored in the JSON document. |
| JSON_TABLE function | Extracts data from a JSON document and returns a relational table with specified columns. |
| JSON_TYPE | Returns the type of the JSON value. |
| JSON_UNQUOTE | Unreference the JSON value. |
| JSON_VALUE | Extracts values from a JSON document at the specified path and returns them. |
| JSON_VALID | Determines whether a JSON value is valid. |
| JSON_OBJECTAGG | Returns a JSON object containing key-value pairs. |
| MEMBER OF | If the element being searched is equal to any element in the JSON array, the function returns 1; otherwise, it returns 0. |
| JSON_SCHEMA_VALIDATION_REPORT | If the JSON document conforms to the JSON Schema, 1 is returned; otherwise, 0 is returned. |
| JSON_SCHEMA_VALID | Returns a JSON format validation report for the JSON schema. |