break: remove limited updated/delete feature (#3907)
BREAKING CHANGE As agreed on https://github.com/PostgREST/postgrest/issues/3013#issuecomment-1770186262, this removes the limited update/delete feature. The feature was complicated, largely unused and caused other bugs in mutations. It was added in #2195 and #2211.
This commit is contained in:
+2
-15
@@ -84,11 +84,9 @@ instance PgrstError ApiRequestError where
|
||||
status UnacceptableFilter{} = HTTP.status400
|
||||
status UnacceptableSchema{} = HTTP.status406
|
||||
status UnsupportedMethod{} = HTTP.status405
|
||||
status LimitNoOrderError = HTTP.status400
|
||||
status ColumnNotFound{} = HTTP.status400
|
||||
status GucHeadersError = HTTP.status500
|
||||
status GucStatusError = HTTP.status500
|
||||
status OffLimitsChangesError{} = HTTP.status400
|
||||
status PutMatchingPkError = HTTP.status400
|
||||
status SingularityError{} = HTTP.status406
|
||||
status PGRSTParseError{} = HTTP.status500
|
||||
@@ -140,15 +138,6 @@ instance JSON.ToJSON ApiRequestError where
|
||||
Nothing
|
||||
(Just $ JSON.String $ "Verify that '" <> resource <> "' is included in the 'select' query parameter.")
|
||||
|
||||
toJSON LimitNoOrderError = toJsonPgrstError
|
||||
ApiRequestErrorCode09 "A 'limit' was applied without an explicit 'order'" Nothing (Just "Apply an 'order' using unique column(s)")
|
||||
|
||||
toJSON (OffLimitsChangesError n maxs) = toJsonPgrstError
|
||||
ApiRequestErrorCode10
|
||||
"The maximum number of rows allowed to change was surpassed"
|
||||
(Just $ JSON.String $ T.unwords ["Results contain", show n, "rows changed but the maximum number allowed is", show maxs])
|
||||
Nothing
|
||||
|
||||
toJSON GucHeadersError = toJsonPgrstError
|
||||
ApiRequestErrorCode11 "response.headers guc must be a JSON array composed of objects with a single key and a string value" Nothing Nothing
|
||||
|
||||
@@ -618,8 +607,8 @@ data ErrorCode
|
||||
| ApiRequestErrorCode06
|
||||
| ApiRequestErrorCode07
|
||||
| ApiRequestErrorCode08
|
||||
| ApiRequestErrorCode09
|
||||
| ApiRequestErrorCode10
|
||||
-- | ApiRequestErrorCode09 -- no longer used (used to be mapped to LimitNoOrderError)
|
||||
-- | ApiRequestErrorCode10 -- no longer used (used to be mapped to OffLimitsChangesError)
|
||||
| ApiRequestErrorCode11
|
||||
-- | ApiRequestErrorCode13 -- no longer used (used to be mapped to BinaryFieldError)
|
||||
| ApiRequestErrorCode12
|
||||
@@ -668,8 +657,6 @@ buildErrorCode code = case code of
|
||||
ApiRequestErrorCode06 -> "PGRST106"
|
||||
ApiRequestErrorCode07 -> "PGRST107"
|
||||
ApiRequestErrorCode08 -> "PGRST108"
|
||||
ApiRequestErrorCode09 -> "PGRST109"
|
||||
ApiRequestErrorCode10 -> "PGRST110"
|
||||
ApiRequestErrorCode11 -> "PGRST111"
|
||||
ApiRequestErrorCode12 -> "PGRST112"
|
||||
ApiRequestErrorCode14 -> "PGRST114"
|
||||
|
||||
Reference in New Issue
Block a user