This is a concept different from ORM for solving the object-relational impedance mismatch problem. It:
a) Abstracts away the host language (Java etc.) from SQL, so that data access logic can be built with SQL only;
b) Abstracts away the hard object-relational transformation problem from developer, so that the developer has the flexibility to query objects of any shape he/she needs from PostgreSQL or MySQL. Here is the output from an example query service:
[
{
"id": 1,
"arr1": [
{
"id1": 1
}
],
"arr2": [{
"id2": 1,
"arr3": [{
"id3": 1,
"val": "abc"
}]
}]
}
]
the single SELECT statement for the query is like:
select 10 as id, 1 as id1, 2 as id2, 3 as id3, 'X' as val
union all
select 20, 2, 4, 6, 'Y'