| 程序包 | 说明 |
|---|---|
| org.opoo.tools.db | |
| org.opoo.tools.db.copy | |
| org.opoo.tools.db.diff | |
| org.opoo.tools.db.util |
| 限定符和类型 | 方法和说明 |
|---|---|
Table |
Table.withWhereCondition(java.lang.String whereCondition) |
| 构造器和说明 |
|---|
TableInput(Table table,
java.sql.Connection connection) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
AbstractSameDbTableCopier.batchCopy(java.sql.Connection connection,
Table sourceTable,
Table targetTable,
Id previousOffsetId,
Id offsetId)
复制一个批次,该批次主键的区间为开闭区间 (previousOffsetId, offsetId]。
|
protected SqlAndParams |
AbstractSameDbTableCopier.buildCopySql(Table sourceTable,
Table targetTable,
Id previousOffsetId,
Id offsetId)
构建复制一个批次的 SQL 语句和对应的参数集合。
|
protected SqlAndParams |
MySQLSameDbTableCopier.buildCopySql(Table sourceTable,
Table targetTable,
Id previousOffsetId,
Id offsetId) |
protected abstract SqlAndParams |
AbstractSameDbTableCopier.buildGetOffsetIdSql(Table table,
int batchSize,
Id previousOffsetId)
构建获取当前批次区间上限的 SQL 语句和对应的参数集合。
|
protected SqlAndParams |
MySQLSameDbTableCopier.buildGetOffsetIdSql(Table table,
int batchSize,
Id previousOffsetId) |
protected java.lang.String |
MySQLTableCopier.buildInsertSql(Table sourceTable,
Table targetTable) |
protected java.lang.String |
SimpleTableCopier.buildInsertSql(Table sourceTable,
Table targetTable) |
protected java.lang.String |
SimpleTableCopier.buildQuerySql(Table table) |
int |
SameDbTableCopier.copy(java.sql.Connection connection,
Table sourceTable,
Table targetTable,
int batchSize)
同库复制表。
|
int |
AbstractSameDbTableCopier.copy(java.sql.Connection connection,
Table sourceTable,
Table targetTable,
int batchSize) |
protected Id |
AbstractSameDbTableCopier.getOffsetId(java.sql.Connection connection,
Table table,
int batchSize,
Id previousOffsetId)
查询区间上限的主键。
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.lang.String |
SimpleTableComparator.buildSql(Table table) |
protected SimpleTableComparator.Context |
SimpleTableComparator.createContext(Table tableA,
Table tableB,
java.sql.ResultSet rsA,
java.sql.ResultSet rsB) |
protected java.sql.PreparedStatement |
SimpleTableComparator.preparedStatement(Table table,
java.sql.Connection conn) |
| 限定符和类型 | 方法和说明 |
|---|---|
static Table |
DbUtils.buildTable(java.lang.String tableName,
java.sql.Connection conn)
获取表的字段集合,含字段是否主键的标识。
|
static Table |
DbUtils.buildTable(java.lang.String catalog,
java.lang.String schemaPattern,
java.lang.String tableName,
java.sql.Connection conn) |
| 限定符和类型 | 方法和说明 |
|---|---|
static Id |
DbUtils.getNextId(Table table,
java.sql.ResultSet resultSet)
获取下一条记录的主键值,如果已经到表尾,返回null。
|
Copyright © 2025. All rights reserved.