limited update/delete requires explicit order

* limited update/delete now works on views with explicit order
* no default order, enforce order presence
* apply row count to ensure limited mutations
* move requiring order to ApiRequest
This commit is contained in:
steve-chavez
2022-05-02 11:12:02 -05:00
committed by Steve Chavez
parent 5ad8800773
commit e90391b7ac
14 changed files with 216 additions and 144 deletions
-4
View File
@@ -23,7 +23,6 @@ module PostgREST.DbStructure
, queryDbStructure
, accessibleTables
, accessibleProcs
, findIfView
, schemaDescription
) where
@@ -66,9 +65,6 @@ data DbStructure = DbStructure
}
deriving (Generic, JSON.ToJSON)
findIfView :: QualifiedIdentifier -> TablesMap -> Bool
findIfView identifier tbls = maybe False tableIsView $ M.lookup identifier tbls
-- | A view foreign key or primary key dependency detected on its source table
data ViewKeyDependency = ViewKeyDependency {
keyDepTable :: QualifiedIdentifier