public class BatchUpdateOperator extends AbstractOperator implements IBatchUpdateOperator
executed, expenseTime, sql| Constructor and Description |
|---|
BatchUpdateOperator(IDatabaseConnectionHolder connectionHolder) |
BatchUpdateOperator(IDatabaseConnectionHolder connectionHolder,
IAccessorConfig accessorConfig) |
BatchUpdateOperator(String sql,
IDatabaseConnectionHolder connectionHolder) |
BatchUpdateOperator(String sql,
IDatabaseConnectionHolder connectionHolder,
IAccessorConfig accessorConfig) |
| Modifier and Type | Method and Description |
|---|---|
IBatchUpdateOperator |
addBatchParameter(SQLBatchParameter parameter)
添加批量SQL参数
|
IBatchUpdateOperator |
addBatchSQL(String sql)
添加SQL语句
|
IOperator |
addParameter(Object parameter)
添加SQL参数,若参数为NULL则将默认向SQL传递NULL值对象
|
IOperator |
addParameter(SQLParameter parameter)
添加SQL参数,若参数为NULL则忽略
|
protected int |
doExecute()
执行具体的操作过程
|
List<SQLBatchParameter> |
getBatchParameters()
获取批量SQL参数集合
|
int[] |
getEffectCounts()
对于 INSERT、UPDATE 或 DELETE 语句,返回行数; 对于无返回结果的SQL语句,返回 0
|
int |
getEffectCountsTotal()
获取累计受影响的总记录数
|
List<SQLParameter> |
getParameters()
获取SQL参数集合
|
static int |
parseEffectCounts(int[] effectCounts) |
protected String |
serializeParameters() |
doAppendStackTraces, doSetParameters, execute, getAccessorConfig, getConnectionHolder, getExpenseTime, getSQL, isExecuted, setAccessorConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecute, getAccessorConfig, getConnectionHolder, getExpenseTime, getSQL, isExecuted, setAccessorConfigpublic BatchUpdateOperator(IDatabaseConnectionHolder connectionHolder)
public BatchUpdateOperator(IDatabaseConnectionHolder connectionHolder, IAccessorConfig accessorConfig)
public BatchUpdateOperator(String sql, IDatabaseConnectionHolder connectionHolder)
public BatchUpdateOperator(String sql, IDatabaseConnectionHolder connectionHolder, IAccessorConfig accessorConfig)
public static int parseEffectCounts(int[] effectCounts)
protected String serializeParameters()
serializeParameters in class AbstractOperatorprotected int doExecute()
throws Exception
AbstractOperatordoExecute in class AbstractOperatorException - 执行过程中产生的异常public int[] getEffectCounts()
IBatchUpdateOperatorgetEffectCounts in interface IBatchUpdateOperatorpublic int getEffectCountsTotal()
IBatchUpdateOperatorgetEffectCountsTotal in interface IBatchUpdateOperatorpublic IBatchUpdateOperator addBatchSQL(String sql)
IBatchUpdateOperatoraddBatchSQL in interface IBatchUpdateOperatorsql - SQL语句public IBatchUpdateOperator addBatchParameter(SQLBatchParameter parameter)
IBatchUpdateOperatoraddBatchParameter in interface IBatchUpdateOperatorparameter - 批量SQL参数对象public List<SQLBatchParameter> getBatchParameters()
IBatchUpdateOperatorgetBatchParameters in interface IBatchUpdateOperatorpublic IOperator addParameter(Object parameter)
IOperatoraddParameter in interface IOperatoraddParameter in class AbstractOperatorparameter - SQL参数值public IOperator addParameter(SQLParameter parameter)
IOperatoraddParameter in interface IOperatoraddParameter in class AbstractOperatorparameter - SQL参数对象public List<SQLParameter> getParameters()
IOperatorgetParameters in interface IOperatorgetParameters in class AbstractOperatorCopyright © 2022. All rights reserved.