@@ -231,7 +231,7 @@ private String createFindAllInListSql() {
231
231
}
232
232
233
233
private String createExistsSql () {
234
- return String .format ("select count (*) from %s where %s = :id" , entity .getTableName (), entity .getIdColumn ());
234
+ return String .format ("SELECT COUNT (*) FROM %s WHERE %s = :id" , entity .getTableName (), entity .getIdColumn ());
235
235
}
236
236
237
237
private String createCountSql () {
@@ -240,7 +240,7 @@ private String createCountSql() {
240
240
241
241
private String createInsertSql (Set <String > additionalColumns ) {
242
242
243
- String insertTemplate = "insert into %s (%s) values (%s)" ;
243
+ String insertTemplate = "INSERT INTO %s (%s) VALUES (%s)" ;
244
244
245
245
LinkedHashSet <String > columnNamesForInsert = new LinkedHashSet <>(nonIdColumnNames );
246
246
columnNamesForInsert .addAll (additionalColumns );
@@ -253,7 +253,7 @@ private String createInsertSql(Set<String> additionalColumns) {
253
253
254
254
private String createUpdateSql () {
255
255
256
- String updateTemplate = "update %s set %s where %s = :%s" ;
256
+ String updateTemplate = "UPDATE %s SET %s WHERE %s = :%s" ;
257
257
258
258
String setClause = columnNames .stream ()//
259
259
.map (n -> String .format ("%s = :%s" , n , n ))//
@@ -263,7 +263,7 @@ private String createUpdateSql() {
263
263
}
264
264
265
265
private String createDeleteSql () {
266
- return String .format ("DELETE from %s where %s = :id" , entity .getTableName (), entity .getIdColumn ());
266
+ return String .format ("DELETE FROM %s WHERE %s = :id" , entity .getTableName (), entity .getIdColumn ());
267
267
}
268
268
269
269
String createDeleteAllSql (PropertyPath path ) {
0 commit comments