The SQLite json_group_array()
function is an aggregate function that returns a JSON array comprised of all values in the aggregation.
In other words, it constructs an array from the values provided by its argument.
Continue readingThe SQLite json_group_array()
function is an aggregate function that returns a JSON array comprised of all values in the aggregation.
In other words, it constructs an array from the values provided by its argument.
Continue readingIn SQLite, the json_valid()
function checks whether or not its argument is well-formed JSON.
It returns 1
if the argument is well-formed JSON, and 0
if it’s not.
In SQLite, the json_array()
function returns a well-formed JSON array based on its arguments.
The function accepts zero or more arguments, and each argument becomes an element in the resulting array.
Continue readingThe SQLite json_object()
function returns a well-formed JSON object based on its arguments.
The function accepts zero or more pairs of arguments and returns a well-formed JSON object based on those arguments.
Continue readingStarting with SQLite version 3.38.0 (released on 22 February 2022), we can now use the ->
and ->>
operators to extract subcomponents of JSON documents.
The aim with these operators is to be compatible with the equivalent MySQL and PostgreSQL operators.
Continue readingSQLite’s JSON functions and operators are now enabled by default, starting from SQLite 3.38.0 (released on 22 February 2022).
Continue readingMariaDB includes two selectors that enable us to select elements from JSON arrays:
[N]
selects element number N in the array (for example, [0]
to select the first element). [*]
selects all elements in the array.These can be used in a number of JSON functions that are included in MariaDB. The following examples use them with the JSON_EXTRACT()
function in order to return selected array elements.
When working with JSON in MariaDB, you can use JSONPath expressions to manipulate data within a JSON document.
One powerful feature that MariaDB provides is the wildcard step (**
). This allows you to recursively select all child elements of the current element.
The wildcard step is a non-standard extension, and it’s also supported with the same meaning in MySQL.
Continue readingWhen using SQLcl with Oracle Database, you can export your query results to a JSON file with the SPOOL
command.
In MySQL, the JSON_VALUE()
function extracts a value from a JSON document at the specified path.
The function was introduced in MySQL 8.0.21.
Continue reading