Class SpannerDatabaseType

java.lang.Object
migratedb.v1.core.internal.database.base.BaseDatabaseType
migratedb.v1.core.internal.database.spanner.SpannerDatabaseType
All Implemented Interfaces:
DatabaseType

public class SpannerDatabaseType extends BaseDatabaseType
  • Constructor Details

    • SpannerDatabaseType

      public SpannerDatabaseType()
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface DatabaseType
      Specified by:
      getName in class BaseDatabaseType
      Returns:
      The human-readable name for this database.
    • getNullType

      public int getNullType()
      Specified by:
      getNullType in interface DatabaseType
      Specified by:
      getNullType in class BaseDatabaseType
      Returns:
      The JDBC type used to represent null in prepared statements.
    • getPriority

      public int getPriority()
      Description copied from class: BaseDatabaseType
      When 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:
      getPriority in interface DatabaseType
      Overrides:
      getPriority in class BaseDatabaseType
    • handlesDatabaseProductNameAndVersion

      public boolean handlesDatabaseProductNameAndVersion(String databaseProductName, String databaseProductVersion, Connection connection)
      Description copied from interface: DatabaseType
      Check if this database type handles the connection product name and version. This allows more fine-grained control over which DatabaseType handles which connection. MigrateDB will use the first DatabaseType that returns true for this method.
      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:
      true if this handles the product name and version, false if not.
    • createDatabase

      public Database<?> createDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)
      Description copied from interface: DatabaseType
      Initializes the Database used by this Database Type.
      Specified by:
      createDatabase in interface DatabaseType
      Specified by:
      createDatabase in class BaseDatabaseType
      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: DatabaseType
      Initializes the Parser used by this Database Type.
      Specified by:
      createParser in interface DatabaseType
      Specified by:
      createParser in class BaseDatabaseType
      Parameters:
      configuration - The MigrateDB configuration.
      Returns:
      The Parser.