Class JdbcTemplateHelper
-
- All Implemented Interfaces:
public class JdbcTemplateHelper- Since:
2024-01-25
trydofor
-
-
Field Summary
Fields Modifier and Type Field Description public final static ResultSetExtractor<String>FirstStringOrNullpublic final static ResultSetExtractor<Long>FirstLongOrNullpublic final static ResultSetExtractor<Integer>FirstIntegerOrNullpublic final static ResultSetExtractor<Boolean>FirstBooleanOrNull
-
Constructor Summary
Constructors Constructor Description JdbcTemplateHelper()
-
Method Summary
Modifier and Type Method Description static StringsafeWhere(String where)where clause of PreparedStatement, must, - start with ' WHERE ' case-ignored - not empty - not contains ';'static voidinitSafeTable(JdbcTemplate tmpl)static booleanisSafeTable(String table)whether the table is in the safe list static StringsafeName(@NotNull() String name)quote name, e.g. static StringsafeTable(String table)check and quote table -
-
Method Detail
-
safeWhere
static String safeWhere(String where)
where clause of PreparedStatement, must, - start with ' WHERE ' case-ignored - not empty - not contains ';'
-
initSafeTable
static void initSafeTable(JdbcTemplate tmpl)
-
isSafeTable
static boolean isSafeTable(String table)
whether the table is in the safe list
-
-
-
-