4 | ||| A query whose selected expression is expected to produce a JSON value.
5 | |||
6 | ||| The expression is wrapped by queryJSON as: JSON_SERIALIZE(expression RETURNING CLOB)
7 | |||
8 | ||| The resulting CLOB is then returned to Idris as a String.
9 | |||
10 | ||| `querybody` should contain the FROM clause and any additional SQL clauses required to identify the rows being queried.
11 | |||
12 | ||| For example:
13 | |||
14 | ||| MkJSONQuery
15 | ||| "payload"
16 | ||| "documents"
17 | ||| []
18 | |||
19 | ||| Produces SQL equivalent to:
20 | |||
21 | ||| SELECT JSON_SERIALIZE(payload RETURNING CLOB)
22 | ||| FROM documents
23 | |||