← Back to team overview

maria-developers team mailing list archive



Hi, Alexander!

On May 17, Alexander Barkov wrote:
> Hello Monty,
> We discussed extracting data in JSON format today,
> to make it possible to return data as a single JSON value
> (as a result set consisting of a single row and a single column):
> SELECT id,name,address FROM users FOR JSON;

This can be built on the existing functionality.

"FOR JSON" is a result filter, something that gets the result of a query
and transforms it into something different, different set of columns

Natirally, in MySQL language this should've been

  SELECT id,name,address FROM users PROCEDURE JSON;

And tada - it took only 15 years for a second useful procedure to appear :)

Although, seriously, I don't expect PROCEDURE JSON to work out of the
box - procedure api is way too old and hardly ever used. I woldn't be
surprised if it's broken in many subtle ways.


Follow ups