<commit_before>package com.legendzero.lzlib.database;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.function.Predicate;
import java.util.logging.Level;
import java.util.logging.Logger;

public interface SQLPredicate extends Predicate<ResultSet> {

    boolean testSilent(ResultSet resultSet) throws SQLException;

    @Override
    default boolean test(ResultSet resultSet) {
        try {
            return testSilent(resultSet);
        } catch (SQLException e) {
            Logger.getLogger("SQLPredicate").log(Level.WARNING, "Error in SQLPredicate", e);
        }
        return false;
    }
}<commit_msg>Add SQLPredicate#entryExists for checking if any rows are found.<commit_after>package com.legendzero.lzlib.database;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.function.Predicate;
import java.util.logging.Level;
import java.util.logging.Logger;

public interface SQLPredicate extends Predicate<ResultSet> {

    boolean testSilent(ResultSet resultSet) throws SQLException;

    @Override
    default boolean test(ResultSet resultSet) {
        try {
            return testSilent(resultSet);
        } catch (SQLException e) {
            Logger.getLogger("SQLPredicate").log(Level.WARNING, "Error in SQLPredicate", e);
        }
        return false;
    }

    static SQLPredicate entryExists() {
        return ResultSet::next;
    }
}
{'fraction_non_alphanumeric': 0.09290780141843971, 'fraction_numerical': 0.0, 'mean_word_length': 3.4371069182389937, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2274776', 'n_tokens_mistral': 402, 'n_tokens_neox': 393, 'n_words': 93}