public class UpgradeSharding extends UpgradeProcess
UpgradeProcess.Alterable, UpgradeProcess.AlterColumnName, UpgradeProcess.AlterColumnType, UpgradeProcess.AlterTableAddColumn, UpgradeProcess.AlterTableDropColumn
connection
Constructor and Description |
---|
UpgradeSharding() |
Modifier and Type | Method and Description |
---|---|
protected void |
copyCompanyTable(java.sql.Connection sourceConnection,
java.sql.Connection targetConnection,
java.lang.String shardName) |
protected void |
copyControlTable(java.sql.Connection sourceConnection,
java.sql.Connection targetConnection,
java.lang.String tableName,
java.lang.Object[][] columns,
java.lang.String createSQL) |
protected void |
copyControlTables(java.util.List<java.lang.String> shardNames) |
protected void |
copyControlTables(java.lang.String shardName) |
protected void |
doUpgrade() |
protected void |
dropTable(java.sql.Connection connection,
java.lang.String tableName) |
protected java.util.List<java.lang.Long> |
getCompanyIds(java.lang.String shardName) |
protected java.util.List<java.lang.String> |
getShardNames() |
alter, clearIndexesCache, getIndexesSQL, getTableName, getThreshold, increment, increment, increment, isSupportsAlterColumnName, isSupportsAlterColumnType, isSupportsStringCaseSensitiveQuery, isSupportsUpdateWithInnerJoin, normalizeName, upgrade, upgrade, upgrade, upgrade, upgradeTable, upgradeTable
doHasTable, hasColumn, hasColumnType, hasRows, hasRows, hasTable, runSQL, runSQL, runSQL, runSQL, runSQLTemplate, runSQLTemplate, runSQLTemplateString
protected void copyCompanyTable(java.sql.Connection sourceConnection, java.sql.Connection targetConnection, java.lang.String shardName) throws java.lang.Exception
java.lang.Exception
protected void copyControlTable(java.sql.Connection sourceConnection, java.sql.Connection targetConnection, java.lang.String tableName, java.lang.Object[][] columns, java.lang.String createSQL) throws java.lang.Exception
java.lang.Exception
protected void copyControlTables(java.util.List<java.lang.String> shardNames) throws java.lang.Exception
java.lang.Exception
protected void copyControlTables(java.lang.String shardName) throws java.lang.Exception
java.lang.Exception
protected void doUpgrade() throws java.lang.Exception
doUpgrade
in class UpgradeProcess
java.lang.Exception
protected void dropTable(java.sql.Connection connection, java.lang.String tableName) throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
protected java.util.List<java.lang.Long> getCompanyIds(java.lang.String shardName) throws java.lang.Exception
java.lang.Exception
protected java.util.List<java.lang.String> getShardNames() throws java.lang.Exception
java.lang.Exception