A MySQL helper for turning a subquery into a JSON object.
The subquery must only return one row.
NOTE: This helper is only guaranteed to fully work with the built-in MysqlDialect.
While the produced SQL is compatible with all MySQL databases, some third-party dialects
may not parse the nested JSON into objects. In these cases you can use the built in
ParseJSONResultsPlugin to parse the results.
A MySQL helper for turning a subquery into a JSON object.
The subquery must only return one row.
NOTE: This helper is only guaranteed to fully work with the built-in
MysqlDialect. While the produced SQL is compatible with all MySQL databases, some third-party dialects may not parse the nested JSON into objects. In these cases you can use the built inParseJSONResultsPluginto parse the results.Examples
The generated SQL (MySQL):