disallow limit/offset on views

This commit is contained in:
steve-chavez
2022-03-26 15:29:13 +01:00
committed by Steve Chavez
parent 73dc2692b1
commit f3f9030c48
8 changed files with 52 additions and 7 deletions
+9
View File
@@ -520,7 +520,16 @@ spec = do
`shouldRespondWith` ""
{ matchStatus = 204 }
it "doesn't work with views" $
request methodPatch "/limited_update_items_view?limit=1&offset=1"
[("Prefer", "tx=commit")]
[json| {"name": "updated-item"} |]
`shouldRespondWith`
[json| {"hint":null,"details":null,"code":"PGRST507","message":"limit/offset is not implemented for views"} |]
{ matchStatus = 501 }
it "works with views with an inferred pk" $ do
pendingWith "not implemented yet"
get "/limited_update_items_view"
`shouldRespondWith`
[json|[