@Experimental public class JdbcNumericBetweenParametersProvider extends Object implements JdbcParameterValuesProvider
For example, if there's a table BOOKS with a numeric PK id, using a
query like:
SELECT * FROM BOOKS WHERE id BETWEEN ? AND ?
You can take advantage of this class to automatically generate the parameters of the BETWEEN clause, based on the passed constructor parameters.
| 构造器和说明 |
|---|
JdbcNumericBetweenParametersProvider(long minVal,
long maxVal)
NumericBetweenParametersProviderJdbc constructor.
|
JdbcNumericBetweenParametersProvider(long fetchSize,
long minVal,
long maxVal)
NumericBetweenParametersProviderJdbc constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Serializable[][] |
getParameterValues()
Returns the necessary parameters array to use for query in parallel a table.
|
JdbcNumericBetweenParametersProvider |
ofBatchNum(int batchNum) |
JdbcNumericBetweenParametersProvider |
ofBatchSize(long batchSize) |
public JdbcNumericBetweenParametersProvider(long minVal,
long maxVal)
minVal - the lower bound of the produced "from" valuesmaxVal - the upper bound of the produced "to" valuespublic JdbcNumericBetweenParametersProvider(long fetchSize,
long minVal,
long maxVal)
fetchSize - the max distance between the produced from/to pairsminVal - the lower bound of the produced "from" valuesmaxVal - the upper bound of the produced "to" valuespublic JdbcNumericBetweenParametersProvider ofBatchSize(long batchSize)
public JdbcNumericBetweenParametersProvider ofBatchNum(int batchNum)
public Serializable[][] getParameterValues()
JdbcParameterValuesProviderCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.