Move unwords higher for branch parity
This commit is contained in:
@@ -340,11 +340,9 @@ requestToQuery schema (DbMutate (Insert mainTbl (PayloadJSON (UniformObjects row
|
|||||||
insInto = unwords [ "INSERT INTO" , fromQi qi,
|
insInto = unwords [ "INSERT INTO" , fromQi qi,
|
||||||
if T.null colsString then "" else "(" <> colsString <> ")"
|
if T.null colsString then "" else "(" <> colsString <> ")"
|
||||||
]
|
]
|
||||||
vals = if T.null colsString
|
vals = unwords $ if T.null colsString
|
||||||
then "DEFAULT VALUES"
|
then ["DEFAULT VALUES"]
|
||||||
else unwords [
|
else ["SELECT", colsString, "FROM json_populate_recordset(null::" , fromQi qi, ", $1)"] in
|
||||||
"SELECT", colsString, "FROM json_populate_recordset(null::" , fromQi qi, ", $1)"
|
|
||||||
] in
|
|
||||||
insInto <> vals
|
insInto <> vals
|
||||||
|
|
||||||
requestToQuery schema (DbMutate (Update mainTbl (PayloadJSON (UniformObjects rows)) conditions)) =
|
requestToQuery schema (DbMutate (Update mainTbl (PayloadJSON (UniformObjects rows)) conditions)) =
|
||||||
|
|||||||
Reference in New Issue
Block a user