protected ResultSet execute(String stmt, Integer fetchSize, Object... args)
            throws SQLException {
        // Release any previously-open statement.
        release();

        LOG.info("{}: Executing SQL statement: {}",Thread.currentThread().getName(), stmt);

        PreparedStatement statement = this.getConnection().prepareStatement(stmt, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);

        if (fetchSize != null) {
            LOG.debug("{}: Using fetchSize for next query: {}",Thread.currentThread().getName() , fetchSize);
            statement.setFetchSize(fetchSize);
        }
        this.lastStatement = statement;
        if (null != args) {
            for (int i = 0; i < args.length; i++) {
                statement.setObject(i + 1, args[i]);
            }
        }

        StringBuilder sb = new StringBuilder();
        for (Object o : args) {
            sb.append(o.toString())
                    .append(", ");
        }
        LOG.info("{}: With args: {}",Thread.currentThread().getName() , sb);

        return statement.executeQuery();
    }
Executes an arbitrary SQL statement.

@param stmt      The SQL statement to execute
@param fetchSize Overrides default or parameterized fetch size
@return A ResultSet encapsulating the results or null on error
src/main/java/org/replicadb/manager/SqlManager.java