19 lines
354 B
Haskell
19 lines
354 B
Haskell
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
module Main (main) where
|
|
|
|
import Database.PostgreSQL.LibPQ (connectdb)
|
|
|
|
import qualified Yore.DB
|
|
|
|
main :: IO ()
|
|
main = do
|
|
conn <- connectdb "host=localhost port=5432"
|
|
result <- Yore.DB.getTables conn
|
|
|
|
case result of
|
|
Left e ->
|
|
putStrLn $ "Got error: " ++ show e
|
|
Right rows ->
|
|
mapM_ print rows
|