use vibesql_types::SqlValue;
mod composite;
mod expression_index;
mod in_list;
pub(super) mod range;
mod temporal_coercion;
pub(crate) use composite::{CompositePredicateType, PrefixPredicateResult, PrefixWithRangeResult};
#[derive(Debug)]
pub(crate) struct RangePredicate {
pub start: Option<SqlValue>,
pub end: Option<SqlValue>,
pub inclusive_start: bool,
pub inclusive_end: bool,
pub exclude_nulls: bool,
}
#[derive(Debug)]
pub(crate) enum IndexPredicate {
Range(RangePredicate),
In(Vec<SqlValue>),
}
pub(crate) use composite::{
build_residual_where_clause, extract_composite_predicates_with_in,
extract_prefix_equality_predicates, extract_prefix_with_trailing_range,
generate_composite_keys, where_clause_fully_satisfied_by_composite_key,
};
#[cfg(test)]
pub(crate) use composite::extract_composite_equality_predicates;
pub(crate) use expression_index::{
extract_index_predicate_for_indexed_column, where_clause_fully_satisfied_by_indexed_column,
};
pub(crate) use in_list::{extract_index_predicate, where_clause_fully_satisfied_by_index};
pub(crate) use temporal_coercion::{
coerce_equality_key, coerce_index_predicate_for_temporal_keys, EqualityKeyCoercion,
};
#[cfg(test)]
#[path = "tests.rs"]
mod tests;