File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Database/PostgreSQL/Simple Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,16 @@ module Database.PostgreSQL.Simple.Util
21
21
import Control.Exception (finally )
22
22
import Database.PostgreSQL.Simple (Connection , Only (.. ), begin ,
23
23
query , rollback )
24
+ import GHC.Int (Int64 )
24
25
25
26
-- | Checks if the table with the given name exists in the database.
26
27
existsTable :: Connection -> String -> IO Bool
27
28
existsTable con table =
28
- fmap checkRowCount (query con q (Only table) :: IO [[Int ]])
29
+ fmap checkRowCount (query con q (Only table) :: IO [[Int64 ]])
29
30
where
30
31
q = " select count(relname) from pg_class where relname = ?"
31
32
32
- checkRowCount :: [[Int ]] -> Bool
33
+ checkRowCount :: [[Int64 ]] -> Bool
33
34
checkRowCount ((1 : _): _) = True
34
35
checkRowCount _ = False
35
36
You can’t perform that action at this time.
0 commit comments