Class SnowflakeDatabase
- java.lang.Object
-
- migratedb.v1.core.internal.database.base.BaseDatabase
-
- migratedb.v1.core.internal.database.snowflake.SnowflakeDatabase
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Database
public class SnowflakeDatabase 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 SnowflakeDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancatalogIsSchema()protected SnowflakeSessiondoGetSession(Connection connection)Retrieves a MigrateDB session for this JDBC connection.voidensureSupported()Ensure MigrateDB supports this version of this database.StringgetBooleanFalse()StringgetBooleanTrue()StringgetInsertStatement(Table table)StringgetRawCreateScript(Table table, boolean baseline)StringgetSelectStatement(Table table)booleansupportsChangingCurrentSchema()booleansupportsDdlTransactions()-
Methods inherited from class migratedb.v1.core.internal.database.base.BaseDatabase
close, computeVersionDisplayName, determineVersion, doGetCatalog, doGetCurrentUser, doQuote, ensureDatabaseIsRecentEnough, getAllSchemas, getBaselineStatement, getCatalog, getCloseQuote, getCreateScript, getCurrentUser, getDatabaseType, getDefaultDelimiter, getEscapedQuote, getInstalledBy, getJdbcMetaData, getMainSession, getMigrationSession, getOpenQuote, getVersion, quote, recommendMigrateDbUpgradeIfNecessary, recommendMigrateDbUpgradeIfNecessaryForMajorVersion, supportsEmptyMigrationDescription, supportsMultiStatementTransactions, unQuote, usesSingleSession
-
-
-
-
Constructor Detail
-
SnowflakeDatabase
public SnowflakeDatabase(Configuration configuration, JdbcConnectionFactory jdbcConnectionFactory)
Creates a new instance.
-
-
Method Detail
-
doGetSession
protected SnowflakeSession 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.
-
getSelectStatement
public String getSelectStatement(Table table)
- Specified by:
getSelectStatementin interfaceDatabase- Overrides:
getSelectStatementin classBaseDatabase
-
getInsertStatement
public String getInsertStatement(Table table)
- Specified by:
getInsertStatementin interfaceDatabase- Overrides:
getInsertStatementin classBaseDatabase
-
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.
-
catalogIsSchema
public boolean catalogIsSchema()
- Returns:
trueif this database uses a catalog to represent a schema, orfalseif a schema is simply a schema.
-
-