Fix alias in select for mutate queries and small refactor (#779)

This commit is contained in:
Steve Chávez
2017-01-16 23:20:02 -08:00
committed by Joe Nelson
parent 104a7ed4fa
commit 7e2cb5fe1c
7 changed files with 85 additions and 54 deletions
+3
View File
@@ -35,6 +35,9 @@ spec =
, matchStatus = 200
, matchHeaders = ["Content-Range" <:> "*/*"]
}
it "can rename and cast the selected columns" $
request methodDelete "/complex_items?id=eq.3&select=ciId:id::text,ciName:name" [("Prefer", "return=representation")] ""
`shouldRespondWith` [str|[{"ciId":"3","ciName":"Three"}]|]
it "can embed (parent) entities" $
request methodDelete "/tasks?id=eq.8&select=id,name,project{id}" [("Prefer", "return=representation")] ""
`shouldRespondWith` ResponseMatcher {