relational-query-HDBC: warn about primary-key only enableWarning.

This commit is contained in:
Kei Hibino 2018-06-18 03:07:07 +09:00
parent 9542af81d5
commit 945eabda7d

View File

@ -129,7 +129,7 @@ tableAlongWithSchema connect config drv scm tbl derives = do
| verboseAsCompilerWarning config = reportWarning | verboseAsCompilerWarning config = reportWarning
| otherwise = const $ pure () | otherwise = const $ pure ()
mapM_ (foldLog reportVerbose reportWarning' reportError) logs mapM_ (foldLog reportVerbose reportWarning' reportError) logs
when (null primaryCols) . reportWarning when (null primaryCols) . reportWarning'
$ "getPrimaryKey: Primary key not found for table: " ++ scm ++ "." ++ tbl $ "getPrimaryKey: Primary key not found for table: " ++ scm ++ "." ++ tbl
let colIxMap = Map.fromList $ zip [c | (c, _) <- cols] [(0 :: Int) .. ] let colIxMap = Map.fromList $ zip [c | (c, _) <- cols] [(0 :: Int) .. ]