com.github.mengweijin.flyway.database.gbase8s.Gbase8sConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of db-migration Show documentation
Show all versions of db-migration Show documentation
Flyway、Liquibase 扩展支持达梦(DM)数据库、南大通用(GBase 8s)数据库。
package com.github.mengweijin.flyway.database.gbase8s;
import org.flywaydb.core.internal.database.base.Connection;
import org.flywaydb.core.internal.database.base.Schema;
import java.sql.SQLException;
/**
* Gbase8s connection.
* @author mengweijin
*/
public class Gbase8sConnection extends Connection {
Gbase8sConnection(Gbase8sDatabase database, java.sql.Connection connection) {
super(database, connection);
}
@Override
protected String getCurrentSchemaNameOrSearchPath() throws SQLException {
return getJdbcConnection().getMetaData().getUserName();
}
@Override
public Schema getSchema(String name) {
return new Gbase8sSchema(jdbcTemplate, database, name);
}
@Override
public void changeCurrentSchemaTo(Schema schema) {
// Informix doesn't support schemas
}
}