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

io.edurt.datacap.plugin.natived.h2.H2Connection Maven / Gradle / Ivy

There is a newer version: 2024.3.11
Show newest version
package io.edurt.datacap.plugin.natived.h2;

import io.edurt.datacap.spi.connection.JdbcConfigure;
import io.edurt.datacap.spi.connection.JdbcConnection;
import io.edurt.datacap.spi.model.Response;

public class H2Connection
        extends JdbcConnection
{
    public H2Connection(JdbcConfigure jdbcConfigure, Response response)
    {
        super(jdbcConfigure, response);
    }

    @Override
    protected String formatJdbcUrl()
    {
        JdbcConfigure jdbcConfigure = (JdbcConfigure) this.getConfigure();
        StringBuffer buffer = new StringBuffer();
        buffer.append("jdbc:");
        buffer.append(jdbcConfigure.getJdbcType());
        if (jdbcConfigure.getDatabase().isPresent()) {
            buffer.append(":");
            buffer.append(jdbcConfigure.getDatabase().get());
        }
        return buffer.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy