-
Notifications
You must be signed in to change notification settings - Fork 712
Builtin Functions for JSON documents
We also introduced several JSON built-in functions, which work on blob, text, and document columns.
- JSON_VALID
- JSON_EXTRACT
- JSON_EXTRACT_VALUE
- JSON_CONTAINS_KEY
- JSON_ARRAY_LENGTH
- JSON_CONTAINS
JSON_VALID (column_name)
Returns true if the first parameter is a valid json doc, or otherwise returns false.
JSON_EXTRACT (column_name, key1[, key2, ...])
Given the key path (key1, ...), it returns the corresponding value in JSON format.
JSON_EXTRACT_VALUE (column_name, key1[, key2, ...])
Similar to json_extract, except that some primitive values may not be in JSON format.
JSON_CONTAINS_KEY (column_name, key1[, key2, ...])
Returns true if the key path exists, or otherwise false.
JSON_ARRAY_LENGTH (column_name)
Returns the size of the json array. NULL if the string is not a valid json array type.
JSON_CONTAINS (column_name, key, [value])
Returns true if the specified key-value pair is found on any level of the JSON document in the first parameter. The value is an optional argument; if it is omitted, the function just searches for the existence of the key in the document.
Documentation license here.
Installation
MyRocks
- Overview
- Transaction
- Backup
- Performance Tuning
- Monitoring
- Migration
- Internals
- Vector Database
DocStore
- Document column type
- Document Path: a new way to query JSON data
- Built-in Functions for JSON documents
MySQL/InnoDB Enhancements