sqlancer.SQLConnection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlancer Show documentation
Show all versions of sqlancer Show documentation
SQLancer finds logic bugs in Database Management Systems through automatic testing
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();
}
}