Package cc.carm.lib.easysql.action.query
Class PreparedQueryActionImpl
- java.lang.Object
-
- cc.carm.lib.easysql.action.AbstractSQLAction<SQLQuery>
-
- cc.carm.lib.easysql.action.query.QueryActionImpl
-
- cc.carm.lib.easysql.action.query.PreparedQueryActionImpl
-
- All Implemented Interfaces:
PreparedQueryAction,QueryAction,SQLAction<SQLQuery>
public class PreparedQueryActionImpl extends QueryActionImpl implements PreparedQueryAction
-
-
Field Summary
-
Fields inherited from class cc.carm.lib.easysql.action.AbstractSQLAction
sqlContent
-
-
Constructor Summary
Constructors Constructor Description PreparedQueryActionImpl(@NotNull SQLManagerImpl manager, @NotNull java.lang.String sql)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull SQLQueryImplexecute()执行该Action对应的SQL语句PreparedQueryActionImplhandleStatement(@Nullable java.util.function.Consumer<java.sql.PreparedStatement> statement)直接对PreparedStatement进行处理PreparedQueryActionImplsetParams(@Nullable java.lang.Iterable<java.lang.Object> params)设定SQL语句中所有 ?PreparedQueryActionImplsetParams(@Nullable java.lang.Object... params)设定SQL语句中所有 ?-
Methods inherited from class cc.carm.lib.easysql.action.query.QueryActionImpl
executeAsync
-
Methods inherited from class cc.carm.lib.easysql.action.AbstractSQLAction
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.action.query.QueryAction
executeFunction
-
Methods inherited from interface cc.carm.lib.easysql.api.SQLAction
defaultExceptionHandler, execute, execute, execute, executeAsync, executeAsync, executeAsync, executeFunction, getActionUUID, getCreateTime, getManager, getShortID, getSQLContent, handleException, setExceptionHandler
-
-
-
-
Constructor Detail
-
PreparedQueryActionImpl
public PreparedQueryActionImpl(@NotNull @NotNull SQLManagerImpl manager, @NotNull @NotNull java.lang.String sql)
-
-
Method Detail
-
setParams
public PreparedQueryActionImpl setParams(@Nullable @Nullable java.lang.Object... params)
Description copied from interface:PreparedQueryAction设定SQL语句中所有 ? 对应的参数- Specified by:
setParamsin interfacePreparedQueryAction- Parameters:
params- 参数内容- Returns:
PreparedQueryAction
-
setParams
public PreparedQueryActionImpl setParams(@Nullable @Nullable java.lang.Iterable<java.lang.Object> params)
Description copied from interface:PreparedQueryAction设定SQL语句中所有 ? 对应的参数- Specified by:
setParamsin interfacePreparedQueryAction- Parameters:
params- 参数内容- Returns:
PreparedQueryAction
-
handleStatement
public PreparedQueryActionImpl handleStatement(@Nullable @Nullable java.util.function.Consumer<java.sql.PreparedStatement> statement)
Description copied from interface:PreparedQueryAction直接对PreparedStatement进行处理- Specified by:
handleStatementin interfacePreparedQueryAction- Parameters:
statement-Consumer处理操作 若为空则不进行处理- Returns:
PreparedQueryAction
-
execute
@NotNull public @NotNull SQLQueryImpl execute() throws java.sql.SQLException
Description copied from interface:SQLAction执行该Action对应的SQL语句- Specified by:
executein interfaceSQLAction<SQLQuery>- Overrides:
executein classQueryActionImpl- Returns:
- 指定数据类型
- Throws:
java.sql.SQLException- 当SQL操作出现问题时抛出
-
-