Package adalid.util.sql
Class SqlMerger
- java.lang.Object
-
- adalid.util.sql.SqlUtil
-
- adalid.util.sql.SqlMerger
-
- Direct Known Subclasses:
SqlMerger2nd
public class SqlMerger extends SqlUtil
- Author:
- Jorge Campins
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adalid.util.sql.SqlUtil
SqlUtil.PreparedStatementWrapper
-
-
Field Summary
-
Fields inherited from class adalid.util.sql.SqlUtil
_argIndex, _args, _connection, _database, _dbms, _driver, _host, _initialised, _password, _port, _programmer, _schema, _url, _urlPattern, _user
-
-
Method Summary
-
Methods inherited from class adalid.util.sql.SqlUtil
arg, close, close, close, connect, executeStatement, getClassForName, getCommonsPackage, getDatabase, getDbms, getDefaultPackage, getDriver, getHost, getMetajavaPath, getNewInstanceForName, getPassword, getPort, getSchema, getSourceMetajavaPackage, getSqlUtilSyntax, getTargetMetajavaPackage, getUrl, getUser, isInitialised, isRemoteConnection, logInvalidArgument, logSyntaxError, logValidArgument, prepareStatement
-
-
-
-
Constructor Detail
-
SqlMerger
public SqlMerger()
-
SqlMerger
public SqlMerger(String[] args)
-
-
Method Detail
-
old
protected String old()
-
isInfoLoggingEnabled
public boolean isInfoLoggingEnabled()
-
enableInfoLogging
public void enableInfoLogging()
-
disableInfoLogging
public void disableInfoLogging()
-
isDetailLoggingEnabled
public boolean isDetailLoggingEnabled()
-
enableDetailLogging
public void enableDetailLogging()
-
disableDetailLogging
public void disableDetailLogging()
-
isThereChanceOfRenamedTables
public boolean isThereChanceOfRenamedTables()
-
isThereChanceOfRenamedColumns
public boolean isThereChanceOfRenamedColumns()
-
isIncrementallyUpgradeable
public boolean isIncrementallyUpgradeable()
incrementally upgradeable indicator. A database can be safely incrementally upgraded if there are no:- dropped tables
- dropped columns
- tables with new not-nullable columns with no default value
- tables with matching columns now not-nullable with no default value
- tables with matching columns with incompatible data types
- tables with matching columns with shorter length
- tables with matching columns with fewer integer digits
- tables with matching columns with new foreign-key constraint
- tables with matching columns with different foreign-key constraint
- rows in referenced enumeration tables with matching primary-key but different business-key
- rows deleted in referenced enumeration tables
- Returns:
- true, if the database can be safely incrementally upgraded; false otherwise
-
isTestingPhase
public boolean isTestingPhase()
-
getNewSchema
public String getNewSchema()
-
getOldSchema
public String getOldSchema()
-
getOldHost
public String getOldHost()
-
getOldPort
public String getOldPort()
-
getOldUser
public String getOldUser()
-
getOldPassword
public String getOldPassword()
-
getOldDatabase
public String getOldDatabase()
-
getProjectAlias
public String getProjectAlias()
-
setProjectAlias
public void setProjectAlias(String alias)
-
getOldDataFolder
public String getOldDataFolder()
-
setOldDataFolder
public void setOldDataFolder(String folder)
-
getOddColumns
public List<SqlColumnPair> getOddColumns()
-
getAddedValues
public List<SqlRowValue> getAddedValues()
-
getUpdatedRows
public Map<String,SqlRowPair> getUpdatedRows()
-
getSharedTables
public List<SqlTableWrapper> getSharedTables()
-
clear
public void clear()
-
merge
public boolean merge()
-
merge
public boolean merge(boolean testing)
-
read1
protected boolean read1()
-
read1
protected boolean read1(boolean simple)
-
reader1_args
protected String[] reader1_args()
-
reader2_args
protected String[] reader2_args()
-
setTablesLoadMap
public void setTablesLoadMap(Map<String,String> map)
- Parameters:
map- the tables load map to set
-
getCatalogTablesMap
public Map<String,String> getCatalogTablesMap()
- Returns:
- the catalog tables map
-
setCatalogTablesMap
public void setCatalogTablesMap(Map<String,String> map)
- Parameters:
map- the catalog tables map to set
-
platform
protected String platform()
-
-