From 517e1c9cac793d8fa8b3949635b6eeb60507d810 Mon Sep 17 00:00:00 2001 From: Markus Friedli Date: Wed, 6 Sep 2023 09:45:31 +0200 Subject: [PATCH] Use lowercase table and column names in SQL query to support MSSQL (#183) --- .../InspectionViolationDao.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/teamcity-inspection-notification-plugin-server/src/main/java/com/github/frimtec/teamcity/plugin/inspectionnotification/InspectionViolationDao.java b/teamcity-inspection-notification-plugin-server/src/main/java/com/github/frimtec/teamcity/plugin/inspectionnotification/InspectionViolationDao.java index 346f35c..0d52a21 100644 --- a/teamcity-inspection-notification-plugin-server/src/main/java/com/github/frimtec/teamcity/plugin/inspectionnotification/InspectionViolationDao.java +++ b/teamcity-inspection-notification-plugin-server/src/main/java/com/github/frimtec/teamcity/plugin/inspectionnotification/InspectionViolationDao.java @@ -10,15 +10,15 @@ public class InspectionViolationDao { private static final String SELECT_NEW_INSPECTION_VIOLATION_STATEMENT = - "select distinct IDA.SEVERITY as SEVERITY," - + " IIN.INSPECTION_NAME as INSPECTION_NAME," - + " IDA.FILE_NAME as FILE_NAME," - + " IRE.LINE as LINE" - + " from INSPECTION_DIFF IDI " - + " join INSPECTION_DATA IDA on (IDA.HASH = IDI.HASH) " - + " join INSPECTION_INFO IIN on (IIN.ID = IDA.INSPECTION_ID) " - + " join INSPECTION_RESULTS IRE on (IRE.HASH = IDI.HASH) " - + "where IDI.BUILD_ID = "; + "select distinct IDA.severity as SEVERITY," + + " IIN.inspection_name as INSPECTION_NAME," + + " IDA.file_name as FILE_NAME," + + " IRE.line as LINE" + + " from inspection_diff IDI" + + " join inspection_data IDA on (IDA.hash = IDI.hash) " + + " join inspection_info IIN on (IIN.id = IDA.inspection_id) " + + " join inspection_results IRE on (IRE.hash = IDI.hash) " + + "where IDI.build_id = "; public List findNewInspectionViolations(Connection connection, long buildId) throws SQLException { List newViolations = new ArrayList<>();