[DO NOT MERGE] demo feat: json_object support
SELECT JSON_OBJECT('id: user.id', 'town: user.town', 'town_2: LA') as info FROM users
{"id": 1, "town": "Bristol", "town_2": "LA"}
The syntax is a bit unusual. Can we use the SQL/JSON standard syntax instead? Ex.:
select JSON_OBJECT('id': user.id, 'town': user.town, 'town_2': 'LA')
and/or
select JSON_OBJECT('id' VALUE user.id, 'town' VALUE user.town, 'town_2' VALUE 'LA')
On advantage is that there is a clear distinction between value literals 'LA' and column references user.id.
More info: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/JSON_OBJECT.html#GUID-1EF347AE-7FDA-4B41-AFE0-DD5A49E8B370
The syntax is a bit unusual. Can we use the SQL/JSON standard syntax instead? Ex.:
select JSON_OBJECT('id': user.id, 'town': user.town, 'town_2': 'LA')and/or
select JSON_OBJECT('id' VALUE user.id, 'town' VALUE user.town, 'town_2' VALUE 'LA')On advantage is that there is a clear distinction between value literals
'LA'and column referencesuser.id.More info: https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/JSON_OBJECT.html#GUID-1EF347AE-7FDA-4B41-AFE0-DD5A49E8B370
yes, we are aware of that - this is hacky way to implement this feature as fast as possible, request from Bei for demo purpose. Not merging for main, of course. I have implemented this way cause of our backend limitation. We should take one of your approaches when we are implementing properly later on.