<commit_before>/**
 * Simple and brute force query implementation for databases that do not support querying or indexing.
 */

export('BaseQuery');

var EQUAL = function(a, b) a == b;
var GREATER_THAN = function(a, b) a > b;
var GREATER_THAN_OR_EQUAL = function(a, b) a >= b;
var LESS_THAN = function(a, b) a < b;
var LESS_THAN_OR_EQUAL = function(a, b) a <= b;

/**
 * <p>The BaseQuery constructor provides the base for all queries implemented by this module.
 * It requires a function argument to retrieve all instances of the type we want to query.</p><commit_msg>Make equals query work with Date values.<commit_after>/**
 * Simple and brute force query implementation for databases that do not support querying or indexing.
 */

export('BaseQuery');

var EQUAL = function(a, b) a === b || a instanceof Date && b instanceof Date && a.getTime() === b.getTime();
var GREATER_THAN = function(a, b) a > b;
var GREATER_THAN_OR_EQUAL = function(a, b) a >= b;
var LESS_THAN = function(a, b) a < b;
var LESS_THAN_OR_EQUAL = function(a, b) a <= b;

/**
 * <p>The BaseQuery constructor provides the base for all queries implemented by this module.
 * It requires a function argument to retrieve all instances of the type we want to query.</p>
{'fraction_non_alphanumeric': 0.11093117408906883, 'fraction_numerical': 0.0, 'mean_word_length': 4.373913043478261, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2476386', 'n_tokens_mistral': 395, 'n_tokens_neox': 378, 'n_words': 165}