No count by default (#700)
* WIP: disable counting total table size by default * Remove commented tests since PUT is no longer supported * Fix tests for invalid range which require count * Do not report count in PATCH response if not asked * Return count of deleted items only if asked * Return count for bulk insert when requested * Changelog entry
This commit is contained in:
@@ -153,7 +153,7 @@ userApiRequest schema req reqBody =
|
||||
, iPayload = relevantPayload
|
||||
, iPreferRepresentation = representation
|
||||
, iPreferSingular = singular
|
||||
, iPreferCount = not $ singular || hasPrefer "count=none"
|
||||
, iPreferCount = not singular && hasPrefer "count=exact"
|
||||
, iFilters = [ (toS k, toS $ fromJust v) | (k,v) <- qParams, isJust v, k /= "select", k /= "offset", not (endingIn ["order", "limit"] k) ]
|
||||
, iSelect = toS $ fromMaybe "*" $ fromMaybe (Just "*") $ lookup "select" qParams
|
||||
, iOrder = [(toS k, toS $ fromJust v) | (k,v) <- qParams, isJust v, endingIn ["order"] k ]
|
||||
|
||||
Reference in New Issue
Block a user