Rename functions

This commit is contained in:
calebmer
2015-11-11 15:53:52 -05:00
parent 0374d4e651
commit b8b073810f
4 changed files with 23 additions and 23 deletions
+6 -6
View File
@@ -55,7 +55,7 @@ import PostgREST.Auth (tokenJWT)
import Prelude
app :: DbStructure -> AppConfig -> BL.ByteString -> Request -> H.Tx P.Postgres s Response
app db conf reqBody req =
app dbStructure conf reqBody req =
case (path, verb) of
([table], "GET") ->
@@ -71,7 +71,7 @@ app db conf reqBody req =
to = frm+queryTotal-1
contentRange = contentRangeH frm to tableTotal
status = rangeStatus frm to tableTotal
canonical = urlEncodeVars -- should this be moved to the db (location)?
canonical = urlEncodeVars -- should this be moved to the dbStructure (location)?
. sortBy (comparing fst)
. map (join (***) cs)
. parseSimpleQuery
@@ -160,10 +160,10 @@ app db conf reqBody req =
return $ responseLBS status404 [] ""
where
allTabs = tables db
allRels = relations db
allCols = columns db
allPrKeys = primaryKeys db
allTabs = tables dbStructure
allRels = relations dbStructure
allCols = columns dbStructure
allPrKeys = primaryKeys dbStructure
filterCol sc table (Column{colTable=Table{tableSchema=s, tableName=t}}) = s==sc && table==t
filterCol _ _ _ = False
filterPk sc table pk = sc == (tableSchema . pkTable) pk && table == (tableName . pkTable) pk