Package de.chojo.sqlutil.wrapper.stage
Interface StatementStage<T>
- Type Parameters:
T- type
- All Known Implementing Classes:
QueryBuilder
public interface StatementStage<T>
Statement stage of a
QueryBuilder-
Method Summary
Modifier and TypeMethodDescriptiondefault ResultStage<T>Skip this stage and set no parameters in the query.Set the parameter of thePreparedStatementof the query.Deprecated.This method exists for the sole purpose of backwards compatibility.default ResultStage<T>Deprecated, for removal: This API element is subject to removal in a future version.useparameter(ThrowingConsumer)instead
-
Method Details
-
params
Deprecated.This method exists for the sole purpose of backwards compatibility. Usage ofparameter(ThrowingConsumer)is prefered.Set the parameter of thePreparedStatementof the query.- Parameters:
stmt- statement to change- Returns:
- The
QueryBuilderin aResultStagewith the parameters applied to the query.
-
paramsBuilder
@Deprecated(forRemoval=true) default ResultStage<T> paramsBuilder(ThrowingConsumer<ParamBuilder, SQLException> params) Deprecated, for removal: This API element is subject to removal in a future version.useparameter(ThrowingConsumer)insteadSet the parameter of thePreparedStatementof the query.Use the query builder so set the parameters in the defined order.
stmt -> stmt.setString("value").setInt(1)- Parameters:
params- a consumer of a param builder used for simple setting of params.- Returns:
- The
QueryBuilderin aResultStagewith the parameters applied to the query.
-
parameter
Set the parameter of thePreparedStatementof the query.Use the query builder so set the parameters in the defined order.
stmt -> stmt.setString("value").setInt(1)- Parameters:
stmt- a consumer of a param builder used for simple setting of params.- Returns:
- The
QueryBuilderin aResultStagewith the parameters applied to the query.
-
emptyParams
Skip this stage and set no parameters in the query.You can also call
QueryStage.queryWithoutParams(String)on the previousQueryStageinstead to avoid this step completely.- Returns:
- The
QueryBuilderin aResultStagewith no parameters set.
-