类 JdbcNumericBetweenParametersProvider
- java.lang.Object
-
- org.apache.seatunnel.connectors.seatunnel.jdbc.internal.split.JdbcNumericBetweenParametersProvider
-
- 所有已实现的接口:
JdbcParameterValuesProvider
public class JdbcNumericBetweenParametersProvider extends Object implements JdbcParameterValuesProvider
This query parameters generator is an helper class to parameterize from/to queries on a numeric column. The generated array of from/to values will be equally sized to fetchSize (apart from the last one), ranging from minVal up to maxVal.For example, if there's a table
BOOKSwith a numeric PKid, 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 fetchSize, BigDecimal minVal, BigDecimal maxVal)NumericBetweenParametersProviderJdbc constructor.JdbcNumericBetweenParametersProvider(BigDecimal minVal, BigDecimal maxVal)NumericBetweenParametersProviderJdbc constructor.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Serializable[][]getParameterValues()Returns the necessary parameters array to use for query in parallel a table.JdbcNumericBetweenParametersProviderofBatchNum(int batchNum)JdbcNumericBetweenParametersProviderofBatchSize(long batchSize)
-
-
-
构造器详细资料
-
JdbcNumericBetweenParametersProvider
public JdbcNumericBetweenParametersProvider(BigDecimal minVal, BigDecimal maxVal)
NumericBetweenParametersProviderJdbc constructor.- 参数:
minVal- the lower bound of the produced "from" valuesmaxVal- the upper bound of the produced "to" values
-
JdbcNumericBetweenParametersProvider
public JdbcNumericBetweenParametersProvider(long fetchSize, BigDecimal minVal, BigDecimal maxVal)NumericBetweenParametersProviderJdbc constructor.- 参数:
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" values
-
-
方法详细资料
-
ofBatchSize
public JdbcNumericBetweenParametersProvider ofBatchSize(long batchSize)
-
ofBatchNum
public JdbcNumericBetweenParametersProvider ofBatchNum(int batchNum)
-
getParameterValues
public Serializable[][] getParameterValues()
从接口复制的说明:JdbcParameterValuesProviderReturns the necessary parameters array to use for query in parallel a table.
-
-