MCPcopy Create free account
hub / github.com/PerroEngine/Perro / compare_ord

Function compare_ord

perro_source/core/perro_csv/src/lib.rs:875–884  ·  view source on GitHub ↗
(ord: std::cmp::Ordering, op: CsvCompare)

Source from the content-addressed store, hash-verified

873 }
874
875 fn predicate_matches(&self, row_idx: usize, predicate: &CsvPredicate) -> bool {
876 match predicate {
877 CsvPredicate::Text {
878 col,
879 op,
880 value,
881 hash,
882 } => {
883 let Some(cell) = self.table.row(row_idx).and_then(|row| row.cells.get(*col)) else {
884 return false;
885 };
886 if matches!(op, CsvCompare::Eq | CsvCompare::Ne) {
887 return compare_bool(cell.hash == *hash && cell.text == value.as_str(), *op);

Callers 1

predicate_matchesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected