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

sqlancer.SQLConnection Maven / Gradle / Ivy

Go to download

SQLancer finds logic bugs in Database Management Systems through automatic testing

There is a newer version: 2.0.0
Show newest version
package sqlancer;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.sql.Statement;

public class SQLConnection implements SQLancerDBConnection {

    private final Connection connection;

    public SQLConnection(Connection connection) {
        this.connection = connection;
    }

    @Override
    public String getDatabaseVersion() throws SQLException {
        DatabaseMetaData meta = connection.getMetaData();
        return meta.getDatabaseProductVersion();
    }

    @Override
    public void close() throws SQLException {
        connection.close();
    }

    public Statement prepareStatement(String arg) throws SQLException {
        return connection.prepareStatement(arg);
    }

    public Statement createStatement() throws SQLException {
        return connection.createStatement();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy