Open
Description
As a user I would like to be able to extract JSON values from a query. This would be useful for faking multiset
support similar to jOOQ.
Proposed Additions
- Add a new
JsonValue
newtype wrapper with a SqlSelect based on JSON parsing - Add support for
to_json
onSqlExpr (Value a)
andSqlExpr (Entity a)
and tuples (up to 8?)Value a
is trivially implemented using the built into_json
Entity a
can use theentityDef
tojson_build_object
assuming that theFieldDef.fieldHaskell
matches the default persistentjson
- Tuples can be represented using
json_build_array
- Add support for
json_agg :: SqlExpr (JsonValue a) -> SqlExpr (JsonValue [a])
this is limited toJsonValue
to enforce the use of ourto_json
implementation instead of relying on the default postgres behavior.
Metadata
Metadata
Assignees
Labels
No labels