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

com.github.dbunit.rules.leak.PostgreLeakHunter Maven / Gradle / Ivy

There is a newer version: 0.15.1
Show newest version
package com.github.dbunit.rules.leak;

import java.sql.Connection;

/**
 * Created by pestano on 07/09/16.
 */
class PostgreLeakHunter extends AbstractLeakHunter {

    private final String sql = "SELECT COUNT(*) FROM pg_stat_activity WHERE state ILIKE '%idle%'";

    Connection connection;

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

    @Override
    protected String leakCountSql() {
        return sql;
    }

    @Override
    protected Connection getConnection() {
        return connection;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy