Class FirebirdDatabase
- java.lang.Object
-
- migratedb.v1.core.internal.database.base.BaseDatabase
-
- migratedb.v1.core.internal.database.firebird.FirebirdDatabase
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Database
public class FirebirdDatabase extends BaseDatabase
-
-
Field Summary
-
Fields inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
configuration, databaseType, jdbcConnectionFactory, jdbcTemplate, rawMainJdbcConnection
-
-
Constructor Summary
Constructors Constructor Description FirebirdDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)Creates a new FirebirdDatabase instance with this JdbcTemplate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancatalogIsSchema()protected StringdoGetCurrentUser()protected FirebirdSessiondoGetSession(Connection connection)Retrieves a MigrateDB session for this JDBC connection.StringdoQuote(String identifier)Quotes this identifier for use in SQL queries.voidensureSupported()Ensure MigrateDB supports this version of this database.StringgetBooleanFalse()StringgetBooleanTrue()StringgetEscapedQuote()StringgetRawCreateScript(Table table, boolean baseline)booleansupportsChangingCurrentSchema()booleansupportsDdlTransactions()booleanusesSingleSession()-
Methods inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
close, computeVersionDisplayName, determineVersion, doGetCatalog, ensureDatabaseIsRecentEnough, getAllSchemas, getBaselineStatement, getCatalog, getCloseQuote, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getInsertStatement, getInstalledBy, getJdbcMetaData, getMainSession, getMigrationSession, getOpenQuote, getSelectStatement, getVersion, quote, recommendMigrateDbUpgradeIfNecessary, recommendMigrateDbUpgradeIfNecessaryForMajorVersion, supportsEmptyMigrationDescription, supportsMultiStatementTransactions, unQuote
-
-
-
-
Constructor Detail
-
FirebirdDatabase
public FirebirdDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)
Creates a new FirebirdDatabase instance with this JdbcTemplate.- Parameters:
configuration- The MigrateDB configuration.
-
-
Method Detail
-
doGetSession
protected FirebirdSession doGetSession(Connection connection)
Description copied from class:BaseDatabaseRetrieves a MigrateDB session for this JDBC connection.- Specified by:
doGetSessionin classBaseDatabase
-
ensureSupported
public void ensureSupported()
Description copied from interface:DatabaseEnsure MigrateDB supports this version of this database.
-
supportsDdlTransactions
public boolean supportsDdlTransactions()
-
supportsChangingCurrentSchema
public boolean supportsChangingCurrentSchema()
-
getBooleanTrue
public String getBooleanTrue()
- Returns:
- The representation of the value
truein a boolean column.
-
getBooleanFalse
public String getBooleanFalse()
- Returns:
- The representation of the value
falsein a boolean column.
-
doQuote
public String doQuote(String identifier)
Description copied from class:BaseDatabaseQuotes this identifier for use in SQL queries.- Overrides:
doQuotein classBaseDatabase
-
getEscapedQuote
public String getEscapedQuote()
- Overrides:
getEscapedQuotein classBaseDatabase
-
catalogIsSchema
public boolean catalogIsSchema()
- Returns:
trueif this database uses a catalog to represent a schema, orfalseif a schema is simply a schema.
-
doGetCurrentUser
protected String doGetCurrentUser() throws SQLException
- Overrides:
doGetCurrentUserin classBaseDatabase- Throws:
SQLException
-
usesSingleSession
public boolean usesSingleSession()
- Specified by:
usesSingleSessionin interfaceDatabase- Overrides:
usesSingleSessionin classBaseDatabase- Returns:
- Whether a single session is used for both schema history table management and applying migrations.
-
-