core/mvcc: op.eq_only

This commit is contained in:
Pere Diaz Bou
2025-08-04 15:27:59 +02:00
parent 662da34e7d
commit f3079347e7

View File

@@ -177,12 +177,8 @@ impl<Clock: LogicalClock> MvccLazyCursor<Clock> {
};
let rowid = self.db.seek_rowid(bound, lower_bound);
if let Some(rowid) = rowid {
let eq_only = matches!(
op,
SeekOp::GE { eq_only: true } | SeekOp::LE { eq_only: true }
);
self.current_pos = CursorPosition::Loaded(rowid);
if eq_only {
if op.eq_only() {
if rowid.row_id == row_id {
Ok(IOResult::Done(SeekResult::Found))
} else {
@@ -192,7 +188,7 @@ impl<Clock: LogicalClock> MvccLazyCursor<Clock> {
Ok(IOResult::Done(SeekResult::Found))
}
} else {
let forwards = matches!(op, SeekOp::GE { eq_only: false } | SeekOp::GT);
let forwards = matches!(op, SeekOp::GE { eq_only: _ } | SeekOp::GT);
if forwards {
self.last();
} else {