Class YugabyteDBDatabaseType
- java.lang.Object
-
- migratedb.core.internal.database.base.BaseDatabaseType
-
- migratedb.core.internal.database.postgresql.PostgreSQLDatabaseType
-
- migratedb.core.internal.database.yugabytedb.YugabyteDBDatabaseType
-
- All Implemented Interfaces:
DatabaseType
public class YugabyteDBDatabaseType extends PostgreSQLDatabaseType
-
-
Field Summary
-
Fields inherited from class migratedb.core.internal.database.base.BaseDatabaseType
APPLICATION_NAME, LOG
-
-
Constructor Summary
Constructors Constructor Description YugabyteDBDatabaseType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Database<?>createDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)Initializes the Database used by this Database Type.BaseParsercreateParser(Configuration configuration, ResourceProvider resourceProvider, ParsingContext parsingContext)Initializes the Parser used by this Database Type.StringgetName()intgetPriority()When identifying database types, the priority with which this type will be used.booleanhandlesDatabaseProductNameAndVersion(String databaseProductName, String databaseProductVersion, Connection connection)This allows more fine-grained control over which DatabaseType handles which connection.booleanhandlesJDBCUrl(String url)Whether this database type should handle the given JDBC url.-
Methods inherited from class migratedb.core.internal.database.postgresql.PostgreSQLDatabaseType
detectPasswordRequiredByUrl, detectUserRequiredByUrl, externalAuthPropertiesRequired, getDriverClass, getExternalAuthProperties, getNullType, modifyDefaultConnectionProps
-
Methods inherited from class migratedb.core.internal.database.base.BaseDatabaseType
alterConnectionAsNeeded, createDatabase, createExecutionStrategy, createSqlScriptExecutorFactory, createSqlScriptFactory, createTransactionalExecutionTemplate, getBackupDriverClass, getDefaultJDBCCredentialsPattern, getJDBCCredentialsPattern, getSelectVersionOutput, instantiateClassExtendedErrorMessage, modifyConfigConnectionProps, modifyOverridingConnectionProps, shutdownDatabase, toString
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceDatabaseType- Overrides:
getNamein classPostgreSQLDatabaseType- Returns:
- The human-readable name for this database.
-
handlesJDBCUrl
public boolean handlesJDBCUrl(String url)
Description copied from class:BaseDatabaseTypeWhether this database type should handle the given JDBC url.- Specified by:
handlesJDBCUrlin interfaceDatabaseType- Overrides:
handlesJDBCUrlin classPostgreSQLDatabaseType- Parameters:
url- The JDBC url.- Returns:
trueif this handles the JDBC url,falseif not.
-
getPriority
public int getPriority()
Description copied from class:BaseDatabaseTypeWhen identifying database types, the priority with which this type will be used. High numbers indicate that this type will be used in preference to others.- Specified by:
getPriorityin interfaceDatabaseType- Overrides:
getPriorityin classBaseDatabaseType
-
handlesDatabaseProductNameAndVersion
public boolean handlesDatabaseProductNameAndVersion(String databaseProductName, String databaseProductVersion, Connection connection)
Description copied from class:BaseDatabaseTypeThis allows more fine-grained control over which DatabaseType handles which connection. MigrateDB will use the first DatabaseType that returns true for this method.- Specified by:
handlesDatabaseProductNameAndVersionin interfaceDatabaseType- Overrides:
handlesDatabaseProductNameAndVersionin classPostgreSQLDatabaseType- Parameters:
databaseProductName- The product name returned by the database.databaseProductVersion- The product version returned by the database.connection- The connection used to connect to the database.- Returns:
trueif this handles the product name and version,falseif not.
-
createDatabase
public Database<?> createDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)
Description copied from interface:DatabaseTypeInitializes the Database used by this Database Type.- Specified by:
createDatabasein interfaceDatabaseType- Overrides:
createDatabasein classPostgreSQLDatabaseType- Parameters:
configuration- The MigrateDB configuration.jdbcConnectionFactory- The current connection factory.- Returns:
- The Database.
-
createParser
public BaseParser createParser(Configuration configuration, ResourceProvider resourceProvider, ParsingContext parsingContext)
Description copied from interface:DatabaseTypeInitializes the Parser used by this Database Type.- Specified by:
createParserin interfaceDatabaseType- Overrides:
createParserin classPostgreSQLDatabaseType- Parameters:
configuration- The MigrateDB configuration.- Returns:
- The Parser.
-
-