All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.database.core.DB2iDatabase Maven / Gradle / Ivy

There is a newer version: 4.30.0
Show newest version
package liquibase.database.core;

import java.sql.Connection;

import liquibase.database.DatabaseConnection;
import liquibase.database.structure.type.DataType;
import liquibase.database.structure.type.FloatType;
import liquibase.exception.DatabaseException;

public class DB2iDatabase extends DB2Database {

    @Override
    public int getPriority() {
        return super.getPriority()+5;
    }

    @Override
    public boolean isCorrectDatabaseImplementation(DatabaseConnection conn) throws DatabaseException {
        return conn.getDatabaseProductName().startsWith("DB2 UDB for AS/400");
    }

    @Override
    public String getDefaultDriver(String url) {
        if (url.startsWith("jdbc:as400")) {
            return "com.ibm.as400.access.AS400JDBCDriver";
        }
        return null;
    }

    @Override
    public String getTypeName() {
        return "db2i";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy