Package cc.carm.lib.easysql.action
Class SQLUpdateActionImpl
- java.lang.Object
-
- cc.carm.lib.easysql.action.AbstractSQLAction<java.lang.Integer>
-
- cc.carm.lib.easysql.action.SQLUpdateActionImpl
-
- All Implemented Interfaces:
SQLUpdateAction,SQLAction<java.lang.Integer>
- Direct Known Subclasses:
PreparedSQLUpdateActionImpl
public class SQLUpdateActionImpl extends AbstractSQLAction<java.lang.Integer> implements SQLUpdateAction
-
-
Field Summary
-
Fields inherited from class cc.carm.lib.easysql.action.AbstractSQLAction
sqlContent
-
-
Constructor Summary
Constructors Constructor Description SQLUpdateActionImpl(@NotNull SQLManagerImpl manager, @NotNull java.lang.String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.Integerexecute()执行该Action对应的SQL语句SQLUpdateActionImplsetKeyIndex(int keyIndex)设定自增主键的序列-
Methods inherited from class cc.carm.lib.easysql.action.AbstractSQLAction
executeAsync, getActionUUID, getCreateTime, getManager, getShortID, getSQLContent, outputDebugMessage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cc.carm.lib.easysql.api.SQLAction
defaultExceptionHandler, execute, execute, execute, executeAsync, executeAsync, executeAsync, executeFunction, executeFunction, getActionUUID, getCreateTime, getManager, getShortID, getSQLContent, handleException, setExceptionHandler
-
Methods inherited from interface cc.carm.lib.easysql.api.action.SQLUpdateAction
defaultKeyIndex
-
-
-
-
Constructor Detail
-
SQLUpdateActionImpl
public SQLUpdateActionImpl(@NotNull @NotNull SQLManagerImpl manager, @NotNull @NotNull java.lang.String sql)
-
-
Method Detail
-
execute
@NotNull public @NotNull java.lang.Integer execute() throws java.sql.SQLExceptionDescription copied from interface:SQLAction执行该Action对应的SQL语句
-
setKeyIndex
public SQLUpdateActionImpl setKeyIndex(int keyIndex)
Description copied from interface:SQLUpdateAction设定自增主键的序列- Specified by:
setKeyIndexin interfaceSQLUpdateAction- Parameters:
keyIndex- 自增主键的序列
若该值 > 0,则SQLAction.execute()返回自增主键数值
若该值 ≤ 0,则SQLAction.execute()返回变更的行数- Returns:
SQLUpdateAction
-
-