encode json body in binary, using modified hasql dep
- switch from "unknown" parameter in text format to a "json" parameter in binary format (no dependency update required) - use a lazy bytestring "json" encoder (via updated hasql)
This commit is contained in:
@@ -128,7 +128,7 @@ normalizedBody body =
|
||||
"END AS val",
|
||||
"FROM pgrst_payload)"])
|
||||
where
|
||||
jsonPlaceHolder = SQL.encoderAndParam (HE.nullable HE.unknown) (LBS.toStrict <$> body) <> "::json"
|
||||
jsonPlaceHolder = SQL.encoderAndParam (HE.nullable HE.jsonLazyBytes) body
|
||||
|
||||
singleParameter :: Maybe LBS.ByteString -> ByteString -> SQL.Snippet
|
||||
singleParameter body typ =
|
||||
|
||||
Reference in New Issue
Block a user