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:
committed by
Steve Chavez
parent
1442e02f5f
commit
bc1fb67df0
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user