Use accept header version to set schema

This commit is contained in:
Joe Nelson
2014-07-18 00:22:39 -07:00
parent c4550f97b0
commit dd1547adea
4 changed files with 23 additions and 11 deletions
+2 -2
View File
@@ -97,8 +97,8 @@ columns t conn = do
namedColumnHash :: [Column] -> HashMap String Column
namedColumnHash = fromList . (Prelude.zip =<< Prelude.map colName)
printTables :: Connection -> IO BL.ByteString
printTables conn = JSON.encode <$> tables "base" conn
printTables :: Int -> Connection -> IO BL.ByteString
printTables schema conn = JSON.encode <$> tables (show schema) conn
printColumns :: T.Text -> Connection -> IO BL.ByteString
printColumns table conn = JSON.encode . namedColumnHash <$> columns table conn