Flake & cabal setup
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
{-# 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
|
||||
Reference in New Issue
Block a user