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

org.umlg.sqlg.HsqldbPlugin Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package org.umlg.sqlg;

import org.umlg.sqlg.sql.dialect.HsqldbDialect;
import org.umlg.sqlg.sql.dialect.SqlDialect;

import java.sql.DatabaseMetaData;
import java.sql.SQLException;

/**
 * @author Lukas Krejci
 * @since 1.2.0
 */
public class HsqldbPlugin implements SqlgPlugin {

    @Override
    public String getDriverFor(String connectionUrl) {
        return connectionUrl.startsWith("jdbc:hsqldb") ? "org.hsqldb.jdbc.JDBCDriver" : null;
    }

    @Override
    public boolean canWorkWith(DatabaseMetaData metaData) throws SQLException {
        return metaData.getDatabaseProductName().equals("HSQL Database Engine");
    }

    @Override
    public SqlDialect instantiateDialect() {
        return new HsqldbDialect();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy