Class JournalJdbcHelper
-
- All Implemented Interfaces:
public class JournalJdbcHelperHelper for journal operations on databases, table must have delete_dt and commit_id columns. Before deleting, update commit_id=? and delete_dt=NOW(3), and then actually delete the record.
- Since:
2019-09-28
trydofor
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringCOL_CREATE_DTpublic final static StringCOL_MODIFY_DTpublic final static StringCOL_MODIFY_TMpublic final static StringCOL_DELETE_DTpublic final static StringCOL_IS_DELETEDpublic final static StringCOL_COMMIT_ID
-
Constructor Summary
Constructors Constructor Description JournalJdbcHelper()
-
Method Summary
Modifier and Type Method Description static StringgetJournalDateColumn(ResultSet rs, boolean needClose)static StringgetJournalDateColumn(String table, Function<String, String> fun)static StringgetJournalDateColumn(JdbcTemplate tmpl, String table)static intdeleteByIds(JdbcTemplate tmpl, String table, JournalService.Journal commit, Array<Long> ids)static intdeleteByIds(JdbcTemplate tmpl, String table, JournalService.Journal commit, Collection<Long> ids)static intdeleteByIds(JdbcTemplate tmpl, String table, Long commitId, Array<Long> ids)static intdeleteByIds(JdbcTemplate tmpl, String table, Long commitId, Collection<Long> ids)static intdeleteByIds(JdbcTemplate tmpl, String table, Long commitId, LocalDateTime now, Array<Long> ids)static intdeleteByIds(JdbcTemplate tmpl, String table, Long commitId, LocalDateTime now, Collection<Long> ids)static intdeleteWhere(JdbcTemplate tmpl, String table, JournalService.Journal commit, String where, Array<Object> args)static intdeleteWhere(JdbcTemplate tmpl, String table, Long commitId, String where, Array<Object> args)static intdeleteWhere(JdbcTemplate tmpl, String table, Long commitId, LocalDateTime now, String where, Array<Object> args)static Array<String>extractColumn(ResultSetMetaData md, Array<String> name)static StringgetFieldName(String name)-
-
Method Detail
-
getJournalDateColumn
static String getJournalDateColumn(ResultSet rs, boolean needClose)
-
getJournalDateColumn
static String getJournalDateColumn(JdbcTemplate tmpl, String table)
-
deleteByIds
static int deleteByIds(JdbcTemplate tmpl, String table, JournalService.Journal commit, Array<Long> ids)
-
deleteByIds
static int deleteByIds(JdbcTemplate tmpl, String table, JournalService.Journal commit, Collection<Long> ids)
-
deleteByIds
static int deleteByIds(JdbcTemplate tmpl, String table, Long commitId, Array<Long> ids)
-
deleteByIds
static int deleteByIds(JdbcTemplate tmpl, String table, Long commitId, Collection<Long> ids)
-
deleteByIds
static int deleteByIds(JdbcTemplate tmpl, String table, Long commitId, LocalDateTime now, Array<Long> ids)
-
deleteByIds
static int deleteByIds(JdbcTemplate tmpl, String table, Long commitId, LocalDateTime now, Collection<Long> ids)
-
deleteWhere
static int deleteWhere(JdbcTemplate tmpl, String table, JournalService.Journal commit, String where, Array<Object> args)
-
deleteWhere
static int deleteWhere(JdbcTemplate tmpl, String table, Long commitId, String where, Array<Object> args)
-
deleteWhere
static int deleteWhere(JdbcTemplate tmpl, String table, Long commitId, LocalDateTime now, String where, Array<Object> args)
-
extractColumn
static Array<String> extractColumn(ResultSetMetaData md, Array<String> name)
-
getFieldName
static String getFieldName(String name)
-
-
-
-