Package adalid.util.sql
Class SqlMerger
java.lang.Object
adalid.util.sql.SqlUtil
adalid.util.sql.SqlMerger
- Direct Known Subclasses:
SqlMerger2nd
- 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidvoidvoidvoidprotected Stringbooleanbooleanincrementally upgradeable indicator.booleanbooleanbooleanbooleanbooleanmerge()booleanmerge(boolean testing) protected Stringold()protected Stringplatform()protected booleanread1()protected booleanread1(boolean simple) protected String[]protected String[]voidsetCatalogTablesMap(Map<String, String> map) voidsetOldDataFolder(String folder) voidsetProjectAlias(String alias) voidsetSelectTemplatesPath(String selectTemplatesPath) voidsetTablesLoadMap(Map<String, String> map) Methods inherited from class adalid.util.sql.SqlUtil
arg, close, close, close, connect, executeStatement, executeStatement, getClassForName, getCommonsPackage, getDatabase, getDbms, getDefaultPackage, getDriver, getHost, getMetajavaPath, getNewInstanceForName, getPassword, getPort, getSchema, getSourceMetajavaPackage, getSqlUtilSyntax, getTargetMetajavaPackage, getUrl, getUser, isInitialised, isRemoteConnection, isSlowConnection, logInvalidArgument, logSyntaxError, logValidArgument, prepareStatement
-
Constructor Details
-
SqlMerger
public SqlMerger() -
SqlMerger
-
-
Method Details
-
old
-
getSyntax
-
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
-
getOldSchema
-
getOldHost
-
getOldPort
-
getOldUser
-
getOldPassword
-
getOldDatabase
-
getProjectAlias
-
setProjectAlias
-
getOldDataFolder
-
setOldDataFolder
-
getSelectTemplatesPath
-
setSelectTemplatesPath
-
getTableNames
-
getExcludableTableNames
-
getCurrentKeyTableNames
-
getMutableKeyTableNames
-
getAddedKeyTableNames
-
getUpdatedKeyTableNames
-
getUpdatedRowTableNames
-
getDeletedRowTableNames
-
getAddedTables
-
getDroppedTables
-
getNewColumns
-
getOldColumns
-
getOddColumns
-
getModifiedColumnNames
-
getAddedColumns
-
getDroppedColumns
-
getAddedConstraintIndexes
-
getDroppedConstraintIndexes
-
getAddedPrimaryKeyConstraints
-
getDroppedPrimaryKeyConstraints
-
getAddedRows
-
getDeletedRows
-
getAddedValues
-
getUpdatedRows
-
getMessages
-
getWarnings
-
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
-
reader2_args
-
getTablesLoadSet
- Returns:
- the tables load set
-
getTablesLoadMap
- Returns:
- the tables load map
-
setTablesLoadMap
- Parameters:
map- the tables load map to set
-
getCatalogTablesSet
- Returns:
- the catalog tables set
-
getCatalogTablesMap
- Returns:
- the catalog tables map
-
setCatalogTablesMap
- Parameters:
map- the catalog tables map to set
-
platform
-