6 | ||| Render a single query column into its SQL representation.
7 | |||
8 | ||| `Column` leaves the supplied expression unchanged.
9 | |||
10 | ||| `JSONColumn` wraps the supplied expression with `JSON_SERIALIZE(... RETURNING CLOB)` so that Oracle returns the JSON value as CLOB text rather than as a native Oracle JSON value.
11 | |||
15 | expression
19 | " RETURNING CLOB)"
21 | ||| Construct the SQL statement represented by a Query.
22 | |||
23 | ||| The query columns are rendered into the SELECT projection and joined with commas.
24 | |||
25 | ||| The query body is appended after FROM and is expected to contain the table expression and any additional SQL clauses.
26 | |||
27 | ||| For example:
28 | |||
29 | ||| buildQuerySQL $
30 | ||| MkQuery
31 | ||| [Column "id", JSONColumn "profile"]
32 | ||| "people"
33 | ||| []
34 | |||
35 | ||| Produces:
36 | |||
37 | ||| SELECT id, JSON_SERIALIZE(profile RETURNING CLOB) FROM people
38 | |||