From 945eabda7dc6d9eb535773eb5981751e2500b291 Mon Sep 17 00:00:00 2001 From: Kei Hibino Date: Mon, 18 Jun 2018 03:07:07 +0900 Subject: [PATCH] relational-query-HDBC: warn about primary-key only enableWarning. --- relational-query-HDBC/src/Database/HDBC/Query/TH.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relational-query-HDBC/src/Database/HDBC/Query/TH.hs b/relational-query-HDBC/src/Database/HDBC/Query/TH.hs index 3e523e25..ea0a4856 100644 --- a/relational-query-HDBC/src/Database/HDBC/Query/TH.hs +++ b/relational-query-HDBC/src/Database/HDBC/Query/TH.hs @@ -129,7 +129,7 @@ tableAlongWithSchema connect config drv scm tbl derives = do | verboseAsCompilerWarning config = reportWarning | otherwise = const $ pure () mapM_ (foldLog reportVerbose reportWarning' reportError) logs - when (null primaryCols) . reportWarning + when (null primaryCols) . reportWarning' $ "getPrimaryKey: Primary key not found for table: " ++ scm ++ "." ++ tbl let colIxMap = Map.fromList $ zip [c | (c, _) <- cols] [(0 :: Int) .. ]