Interface IDataSourceInfo

All Known Implementing Classes:
DataSourceInfoSQLite

public interface IDataSourceInfo
Represents the data needed to connect to a DataSource.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    The type of the DataSource.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The location of the migration files for the DataSource.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Backs up the database.
    default void
    configureFlyway(org.flywaydb.core.api.configuration.FluentConfiguration config)
    Updates the Flyway configuration with configuration specific to the DataSource.
    Gets the DataSource.
    default String
    Gets the location of the migration files for the DataSource.
    Gets the type of the DataSource.
  • Field Details

    • DB_MIGRATION_LOCATION

      static final String DB_MIGRATION_LOCATION
      The location of the migration files for the DataSource.

      This is a format string that takes the type of the DataSource as an argument.

      To get the final location for the implementation, use getMigrationFilesLocation() instead.

      See Also:
  • Method Details

    • getDataSource

      DataSource getDataSource()
      Gets the DataSource.
      Returns:
      The DataSource.
    • getMigrationFilesLocation

      default String getMigrationFilesLocation()
      Gets the location of the migration files for the DataSource.
      Returns:
      The location of the migration files for the DataSource.
    • getType

      Gets the type of the DataSource.
      Returns:
      The type of the DataSource.
    • backupDatabase

      default void backupDatabase()
      Backs up the database.

      This method is optional for implementations.

      On implementations that do not support this method, this method should do nothing.

    • configureFlyway

      default void configureFlyway(org.flywaydb.core.api.configuration.FluentConfiguration config)
      Updates the Flyway configuration with configuration specific to the DataSource.

      By default, this method sets the DataSource and the location of the migration files.

      Parameters:
      config - The Flyway configuration to update.