drop: Prefer: params=multiple-objects on RPC

BREAKING CHANGE

A function with a JSON array or object parameter should be used instead
This commit is contained in:
steve-chavez
2023-04-04 19:55:10 -05:00
committed by Steve Chavez
parent 1442e02f5f
commit bc1fb67df0
9 changed files with 10 additions and 65 deletions
-16
View File
@@ -15,7 +15,6 @@ import Network.HTTP.Types
import Test.Hspec hiding (pendingWith)
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Text.Heredoc
import PostgREST.Config.PgVersion (PgVersion, pgVersion120,
pgVersion130)
@@ -331,21 +330,6 @@ spec actualPgVersion = do
liftIO $ planCost r `shouldSatisfy` (< 1.18)
context "params=multiple-objects" $ do
it "should not exceed cost when calling setof composite proc" $ do
r <- request methodPost "/rpc/get_projects_below"
[planHdr, ("Prefer", "params=multiple-objects")]
[str| [{"id": 1}, {"id": 4}] |]
liftIO $ planCost r `shouldSatisfy` (< 4503.4)
it "should not exceed cost when calling scalar proc" $ do
r <- request methodPost "/rpc/add_them"
[planHdr, ("Prefer", "params=multiple-objects")]
[str| [{"a": 3, "b": 4}, {"a": 1, "b": 2}, {"a": 8, "b": 7}] |]
liftIO $ planCost r `shouldSatisfy` (< 5.85)
context "function inlining" $ do
it "should inline a zero argument function(the function won't appear in the plan tree)" $ do
r <- request methodGet "/rpc/getallusers?id=eq.1"