Implements Prefer count=none header

Uses Maybe for total parameter in contentRangeH
This commit is contained in:
Diogo Biazus
2015-09-25 10:52:44 -04:00
parent 1fbf276474
commit e28b2dd00e
3 changed files with 37 additions and 17 deletions
+3
View File
@@ -101,6 +101,9 @@ countT s =
countRows :: QualifiedIdentifier -> PStmt
countRows t = B.Stmt ("select pg_catalog.count(1) from " <> fromQi t) empty True
countNone :: PStmt
countNone = B.Stmt "select null" empty True
asCsvWithCount :: QualifiedIdentifier -> StatementT
asCsvWithCount table = withCount . asCsv table