public class SqlServerUtils extends Object
| 构造器和说明 |
|---|
SqlServerUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
buildSplitScanQuery(TableId tableId,
SeaTunnelRowType rowType,
boolean isFirstSplit,
boolean isLastSplit)
Get split scan query for the given table.
|
static io.debezium.connector.sqlserver.SqlServerDatabaseSchema |
createSqlServerDatabaseSchema(io.debezium.connector.sqlserver.SqlServerConnectorConfig connectorConfig) |
static LsnOffset |
currentLsn(io.debezium.connector.sqlserver.SqlServerConnection connection)
Fetch current largest log sequence number (LSN) of the database.
|
static Offset |
getLsn(org.apache.kafka.connect.source.SourceRecord record) |
static LsnOffset |
getLsnPosition(Map<String,?> offset) |
static SeaTunnelRowType |
getSplitType(Column splitColumn) |
static SeaTunnelRowType |
getSplitType(Table table) |
static long |
queryApproximateRowCnt(io.debezium.jdbc.JdbcConnection jdbc,
TableId tableId) |
static Object |
queryMin(io.debezium.jdbc.JdbcConnection jdbc,
TableId tableId,
String columnName,
Object excludedLowerBound) |
static Object[] |
queryMinMax(io.debezium.jdbc.JdbcConnection jdbc,
TableId tableId,
String columnName) |
static Object |
queryNextChunkMax(io.debezium.jdbc.JdbcConnection jdbc,
TableId tableId,
String splitColumnName,
int chunkSize,
Object includedLowerBound)
Returns the next LSN to be read from the database.
|
static String |
quote(String dbOrTableName) |
static String |
quote(TableId tableId) |
static PreparedStatement |
readTableSplitDataStatement(io.debezium.jdbc.JdbcConnection jdbc,
String sql,
boolean isFirstSplit,
boolean isLastSplit,
Object[] splitStart,
Object[] splitEnd,
int primaryKeyNum,
int fetchSize)
Get table split data PreparedStatement.
|
public static Object[] queryMinMax(io.debezium.jdbc.JdbcConnection jdbc, TableId tableId, String columnName) throws SQLException
SQLExceptionpublic static long queryApproximateRowCnt(io.debezium.jdbc.JdbcConnection jdbc,
TableId tableId)
throws SQLException
SQLExceptionpublic static Object queryMin(io.debezium.jdbc.JdbcConnection jdbc, TableId tableId, String columnName, Object excludedLowerBound) throws SQLException
SQLExceptionpublic static Object queryNextChunkMax(io.debezium.jdbc.JdbcConnection jdbc, TableId tableId, String splitColumnName, int chunkSize, Object includedLowerBound) throws SQLException
SQLExceptionpublic static SeaTunnelRowType getSplitType(Table table)
public static SeaTunnelRowType getSplitType(Column splitColumn)
public static Offset getLsn(org.apache.kafka.connect.source.SourceRecord record)
public static LsnOffset currentLsn(io.debezium.connector.sqlserver.SqlServerConnection connection)
public static String buildSplitScanQuery(TableId tableId, SeaTunnelRowType rowType, boolean isFirstSplit, boolean isLastSplit)
public static PreparedStatement readTableSplitDataStatement(io.debezium.jdbc.JdbcConnection jdbc, String sql, boolean isFirstSplit, boolean isLastSplit, Object[] splitStart, Object[] splitEnd, int primaryKeyNum, int fetchSize)
public static io.debezium.connector.sqlserver.SqlServerDatabaseSchema createSqlServerDatabaseSchema(io.debezium.connector.sqlserver.SqlServerConnectorConfig connectorConfig)
Copyright © 2023 The Apache Software Foundation. All rights reserved.