Module io.helidon.dbclient
Package io.helidon.dbclient
Interface DbStatement<D extends DbStatement<D>>
- Type Parameters:
D
- Type of the descendant of this class
- All Known Subinterfaces:
DbStatementDml
,DbStatementGet
,DbStatementQuery
- All Known Implementing Classes:
DbStatementBase
,JdbcStatement
,MongoDbStatementDml
,MongoDbStatementGet
,MongoDbStatementQuery
public interface DbStatement<D extends DbStatement<D>>
Database statement that can process parameters.
Once parameters are set using one of the params
methods, all other methods throw an
IllegalStateException
.
Once a parameter is added using addParam(Object)
or addParam(String, Object)
, all other
params
methods throw an IllegalStateException
.
-
Method Summary
Modifier and TypeMethodDescriptionaddParam
(boolean parameter) Add next boolean parameter to the list of ordered parameters (e.g.addParam
(byte parameter) Add next byte parameter to the list of ordered parameters (e.g.addParam
(byte[] parameter) Add next byte[] parameter to the list of ordered parameters (e.g.addParam
(double parameter) Add next double parameter to the list of ordered parameters (e.g.addParam
(float parameter) Add next float parameter to the list of ordered parameters (e.g.addParam
(int parameter) Add next integer parameter to the list of ordered parameters (e.g.addParam
(long parameter) Add next long parameter to the list of ordered parameters (e.g.addParam
(short parameter) Add next short parameter to the list of ordered parameters (e.g.Add next parameter to the list of ordered parameters (e.g.Add nextString
parameter to the list of ordered parameters (e.g.Add next boolean parameter to the map of named parameters (e.g.Add next byte parameter to the map of named parameters (e.g.Add next byte[] parameter to the map of named parameters (e.g.Add next double parameter to the map of named parameters (e.g.Add next float parameter to the map of named parameters (e.g.Add next int parameter to the map of named parameters (e.g.Add next long parameter to the map of named parameters (e.g.Add next short parameter to the map of named parameters (e.g.Add next parameter to the map of named parameters (e.g.Add nextString
parameter to the map of named parameters (e.g.addParam
(String name, BigDecimal parameter) Add nextBigDecimal
parameter to the map of named parameters (e.g.addParam
(String name, BigInteger parameter) Add nextBigInteger
parameter to the map of named parameters (e.g.addParam
(BigDecimal parameter) Add nextBigDecimal
parameter to the list of ordered parameters (e.g.addParam
(BigInteger parameter) Add nextBigInteger
parameter to the list of ordered parameters (e.g.indexedParam
(Object parameters) Configure parameters usingObject
instance with registered mapper.namedParam
(Object parameters) Configure parameters usingObject
instance with registered mapper.default D
Configure parameters from an array by order.Configure parameters from aList
by order.Configure named parameters.
-
Method Details
-
params
Configure parameters from aList
by order. The statement must use indexed parameters and configure them by order in the provided array.- Parameters:
parameters
- ordered parameters to set on this statement, never null- Returns:
- updated db statement
-
params
Configure parameters from an array by order. The statement must use indexed parameters and configure them by order in the provided array.- Parameters:
parameters
- ordered parameters to set on this statement- Returns:
- updated db statement
-
params
Configure named parameters. The statement must use named parameters and configure them from the provided map.- Parameters:
parameters
- named parameters to set on this statement- Returns:
- updated db statement
-
namedParam
Configure parameters usingObject
instance with registered mapper. The statement must use named parameters and configure them from the map provided by mapper.- Parameters:
parameters
-Object
instance containing parameters- Returns:
- updated db statement
-
indexedParam
Configure parameters usingObject
instance with registered mapper. The statement must use indexed parameters and configure them by order in the array provided by mapper.- Parameters:
parameters
-Object
instance containing parameters- Returns:
- updated db statement
-
addParam
Add next parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next boolean parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add nextString
parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next byte parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next short parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next integer parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next long parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next float parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next double parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add nextBigInteger
parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add nextBigDecimal
parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next byte[] parameter to the list of ordered parameters (e.g. the ones that use?
in SQL).- Parameters:
parameter
- next parameter to set on this statement- Returns:
- updated db statement
-
addParam
Add next parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next boolean parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add nextString
parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next byte parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next short parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next int parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next long parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next float parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next double parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add nextBigInteger
parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add nextBigDecimal
parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-
addParam
Add next byte[] parameter to the map of named parameters (e.g. the ones that use:name
in Helidon JDBC SQL integration).- Parameters:
name
- name of parameterparameter
- value of parameter- Returns:
- updated db statement
-