public abstract class BaseInsertExecutor<T,S extends Statement> extends AbstractDMLBaseExecutor<T,S> implements InsertExecutor<T>
| Modifier and Type | Field and Description |
|---|---|
protected static String |
PLACEHOLDER |
GROUP_BY, WHEREsqlRecognizer, sqlRecognizers, statementCallback, statementProxy| Constructor and Description |
|---|
BaseInsertExecutor(StatementProxy<S> statementProxy,
StatementCallback<T,S> statementCallback,
SQLRecognizer sqlRecognizer)
Instantiates a new Abstract dml base executor.
|
| Modifier and Type | Method and Description |
|---|---|
protected TableRecords |
afterImage(TableRecords beforeImage)
After image table records.
|
protected TableRecords |
beforeImage()
Before image table records.
|
protected boolean |
checkPkValues(Map<String,List<Object>> pkValues,
boolean ps)
Check pk values boolean.
|
protected boolean |
checkPkValuesForMultiPk(Map<String,List<Object>> pkValues)
check pk values for multi Pk
At most one null per row.
|
protected boolean |
checkPkValuesForSinglePk(List<Object> pkValues,
boolean ps)
check pk values for single pk
|
protected boolean |
containsColumns()
judge sql specify column
|
protected boolean |
containsPK() |
List<Object> |
getGeneratedKeys()
Deprecated.
|
List<Object> |
getGeneratedKeys(String pkKey)
default get generated keys.
|
protected Map<String,Integer> |
getPkIndex()
get pk index
|
protected List<Object> |
getPkValuesBySequence(SqlSequenceExpr expr)
Deprecated.
|
protected List<Object> |
getPkValuesBySequence(SqlSequenceExpr expr,
String pkKey)
the modify for test
|
protected Map<String,List<Object>> |
parsePkValuesFromStatement()
parse primary key value from statement.
|
doExecute, executeAutoCommitFalse, executeAutoCommitTruebuildLimitCondition, buildLockKey, buildOrderCondition, buildTableRecords, buildTableRecords, buildUndoItem, buildWhereCondition, containPK, containsPK, containsPK, execute, getColumnNameInSQL, getColumnNamesInSQL, getColumnNamesInSQLList, getColumnNamesWithTablePrefix, getColumnNamesWithTablePrefixList, getColumnNameWithTablePrefix, getDbType, getFromTableInSQL, getNeedColumns, getStandardPkColumnName, getTableMeta, getTableMeta, prepareUndoLog, validPkclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPkValues, getPkValuesByColumnprotected static final String PLACEHOLDER
public BaseInsertExecutor(StatementProxy<S> statementProxy, StatementCallback<T,S> statementCallback, SQLRecognizer sqlRecognizer)
statementProxy - the statement proxystatementCallback - the statement callbacksqlRecognizer - the sql recognizerprotected TableRecords beforeImage() throws SQLException
AbstractDMLBaseExecutorbeforeImage in class AbstractDMLBaseExecutor<T,S extends Statement>SQLException - the sql exceptionprotected TableRecords afterImage(TableRecords beforeImage) throws SQLException
AbstractDMLBaseExecutorafterImage in class AbstractDMLBaseExecutor<T,S extends Statement>beforeImage - the before imageSQLException - the sql exceptionprotected boolean containsPK()
protected boolean containsColumns()
protected Map<String,Integer> getPkIndex()
protected Map<String,List<Object>> parsePkValuesFromStatement()
@Deprecated public List<Object> getGeneratedKeys() throws SQLException
SQLException - the sql exceptionpublic List<Object> getGeneratedKeys(String pkKey) throws SQLException
pkKey - the pk keySQLException@Deprecated protected List<Object> getPkValuesBySequence(SqlSequenceExpr expr) throws SQLException
expr - the exprSQLException - the sql exceptionprotected List<Object> getPkValuesBySequence(SqlSequenceExpr expr, String pkKey) throws SQLException
expr - the exprpkKey - the pk keySQLException - the sql exceptionprotected boolean checkPkValuesForMultiPk(Map<String,List<Object>> pkValues)
pkValues - the pk valuesprotected boolean checkPkValues(Map<String,List<Object>> pkValues, boolean ps)
pkValues - the pk valuesps - the psCopyright © 2024 Apache. All rights reserved.