| 限定符和类型 | 字段和说明 |
|---|---|
protected SQLRecognizer |
sqlRecognizer
The Sql recognizer.
|
protected List<SQLRecognizer> |
sqlRecognizers
The Sql recognizer.
|
protected StatementCallback<T,S> |
statementCallback
The Statement callback.
|
protected StatementProxy<S> |
statementProxy
The Statement proxy.
|
| 构造器和说明 |
|---|
BaseTransactionalExecutor(StatementProxy<S> statementProxy,
StatementCallback<T,S> statementCallback,
List<SQLRecognizer> sqlRecognizers)
Instantiates a new Base transactional executor.
|
BaseTransactionalExecutor(StatementProxy<S> statementProxy,
StatementCallback<T,S> statementCallback,
SQLRecognizer sqlRecognizer)
Instantiates a new Base transactional executor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected String |
buildLockKey(TableRecords rowsIncludingPK)
build lockKey
|
protected TableRecords |
buildTableRecords(Map<String,List<Object>> pkValuesMap)
build TableRecords
|
protected TableRecords |
buildTableRecords(TableMeta tableMeta,
String selectSQL,
ArrayList<List<Object>> paramAppenderList)
build a BeforeImage
|
protected SQLUndoLog |
buildUndoItem(TableRecords beforeImage,
TableRecords afterImage)
build a SQLUndoLog
|
protected String |
buildWhereCondition(WhereRecognizer recognizer,
ArrayList<List<Object>> paramAppenderList)
build buildWhereCondition
|
protected boolean |
containPK(String columnName)
compare column name and primary key name
|
protected boolean |
containsPK(List<String> columns)
the columns contains table meta pk
|
protected abstract T |
doExecute(Object... args)
Do execute object.
|
T |
execute(Object... args)
Execute t.
|
protected String |
getColumnNameInSQL(String columnName)
Gets column name in sql.
|
protected String |
getColumnNamesInSQL(List<String> columnNameList)
Gets several column name in sql.
|
protected String |
getDbType()
get db type
|
protected String |
getFromTableInSQL()
Gets from table in sql.
|
protected String |
getStandardPkColumnName(String userColumnName)
get standard pk column name from user sql column name
|
protected TableMeta |
getTableMeta()
Gets table meta.
|
protected TableMeta |
getTableMeta(String tableName)
Gets table meta.
|
protected void |
prepareUndoLog(TableRecords beforeImage,
TableRecords afterImage)
prepare undo log.
|
protected StatementProxy<S extends Statement> statementProxy
protected StatementCallback<T,S extends Statement> statementCallback
protected SQLRecognizer sqlRecognizer
protected List<SQLRecognizer> sqlRecognizers
public BaseTransactionalExecutor(StatementProxy<S> statementProxy, StatementCallback<T,S> statementCallback, SQLRecognizer sqlRecognizer)
statementProxy - the statement proxystatementCallback - the statement callbacksqlRecognizer - the sql recognizerpublic BaseTransactionalExecutor(StatementProxy<S> statementProxy, StatementCallback<T,S> statementCallback, List<SQLRecognizer> sqlRecognizers)
statementProxy - the statement proxystatementCallback - the statement callbacksqlRecognizers - the multi sql recognizerprotected abstract T doExecute(Object... args) throws Throwable
args - the argsThrowable - the throwableprotected String buildWhereCondition(WhereRecognizer recognizer, ArrayList<List<Object>> paramAppenderList)
recognizer - the recognizerparamAppenderList - the param paramAppender listprotected String getColumnNameInSQL(String columnName)
columnName - the column nameprotected String getColumnNamesInSQL(List<String> columnNameList)
columnNameList - the column nameprotected String getFromTableInSQL()
protected TableMeta getTableMeta()
protected TableMeta getTableMeta(String tableName)
tableName - the table nameprotected boolean containsPK(List<String> columns)
columns - the column name listprotected boolean containPK(String columnName)
columnName - the primary key column nameprotected String getStandardPkColumnName(String userColumnName)
protected void prepareUndoLog(TableRecords beforeImage, TableRecords afterImage) throws SQLException
beforeImage - the before imageafterImage - the after imageSQLException - the sql exceptionprotected String buildLockKey(TableRecords rowsIncludingPK)
rowsIncludingPK - the recordsprotected SQLUndoLog buildUndoItem(TableRecords beforeImage, TableRecords afterImage)
beforeImage - the before imageafterImage - the after imageprotected TableRecords buildTableRecords(TableMeta tableMeta, String selectSQL, ArrayList<List<Object>> paramAppenderList) throws SQLException
tableMeta - the tableMetaselectSQL - the selectSQLparamAppenderList - the paramAppender listSQLException - the sql exceptionprotected TableRecords buildTableRecords(Map<String,List<Object>> pkValuesMap) throws SQLException
pkValuesMap - the pkValuesMapSQLExceptionprotected String getDbType()
Copyright © 2020 Seata. All rights reserved.