In MariaDB, JSON_MERGE_PATCH()
is a built-in function that merges two or more JSON documents and returns the result.
The JSON_MERGE_PATCH()
function is an RFC 7396-compliant replacement for the JSON_MERGE()
function, which has been deprecated.
In MariaDB, JSON_MERGE_PATCH()
is a built-in function that merges two or more JSON documents and returns the result.
The JSON_MERGE_PATCH()
function is an RFC 7396-compliant replacement for the JSON_MERGE()
function, which has been deprecated.
In MariaDB, JSON_MERGE_PRESERVE()
is a built-in function that merges two or more JSON documents and returns the result.
JSON_MERGE_PRESERVE()
is a synonym for JSON_MERGE()
, which has been deprecated. To avoid future issues, you should use the JSON_MERGE_PATCH()
function instead. The JSON_MERGE_PATCH()
function is an RFC 7396-compliant replacement for JSON_MERGE()
.
In MariaDB, JSON_MERGE()
is a built-in function that merges two or more JSON documents and returns the result.
The JSON_MERGE()
function has been deprecated, and to avoid future issues, you should use the JSON_MERGE_PATCH()
function instead. The JSON_MERGE_PATCH()
function is an RFC 7396-compliant replacement for JSON_MERGE()
.
In MariaDB, JSON_EXTRACT()
is a built-in function that extracts data from a JSON document, based on a given path or paths.
It can return single values and multiple values. If a single value is matched, a single value is returned. If multiple values are matched, then those values are returned in an array.
Continue readingIn MariaDB, JSON_DETAILED()
is a built-in function that takes a JSON document, and returns it in a more human-readable format.
This is sometimes referred to as prettifying the document. It’s similar to MySQL’s JSON_PRETTY()
function.
For the opposite effect (i.e. to condense a JSON document down), use the JSON_COMPACT()
function.
In MariaDB, JSON_COMPACT()
is a built-in function that removes all unnecessary spaces from a JSON document, so that it’s as short and compact as possible, and returns the result.
This can be handy for when you need to store JSON data in a database column, and you don’t want the JSON documents to use up any more space than is necessary.
For the opposite effect (i.e. to prettify a JSON document by adding indents and spreading it over multiple lines), use the JSON_DETAILED()
function.
In MariaDB, JSON_CONTAINS_PATH()
is a built-in function that indicates whether a given JSON document contains data at the specified path or paths.
It returns 1
if the document does contain data at the specified path/s, 0
if it doesn’t, and NULL
if any of the arguments are NULL
.
In MariaDB, JSON_CONTAINS()
is a built-in function that allows you to find out whether a specified value is found in the given JSON document, or at a specific path within the document.
It returns 1
if it does contain the value, 0
if it doesn’t, and NULL
if any of the arguments are NULL
.
Below are 4 functions that enable you to return the minutes portion from a time value in MariaDB.
Continue readingIn MariaDB, JSON_OBJECTAGG()
is a built-in function that returns a JSON object containing key-value pairs, based on its two arguments.