Files
turso/core
Pere Diaz Bou 86119b0dba Merge 'core/mvcc/cursor: implement prev and last ' from Pere Diaz Bou
Backward scan of a table wasn't implemented yet in MVCC so this achieves
that. I added simple test for mixed btree and mvcc backward scan but I
should add more intense testing for this.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Implements backward scanning and last() in MVCC lazy cursor and adds
directional rowid iteration in the MVCC store, with new tests for mixed
MVCC+B-Tree backward scans.
>
> - **MVCC Cursor (`core/mvcc/cursor.rs`)**:
>   - Implement `prev()` and `last()` with mixed MVCC/B-Tree
coordination using `IterationDirection`.
>   - Add `PrevState` and extend state machine to handle backward
iteration.
>   - Update `get_new_position_from_mvcc_and_btree(...)` to choose
rowids based on direction.
>   - Integrate B-Tree cursor calls (`last`, `prev`) and adjust
`rewind`/rowid selection; tweak next-rowid when at `End`.
> - **MVCC Store (`core/mvcc/database/mod.rs`)**:
>   - Add `get_prev_row_id_for_table(...)` and generalized
`get_row_id_for_table_in_direction(...)` supporting forward/backward
scans.
>   - Add tracing and minor refactors around next/prev rowid retrieval.
> - **Tests (`core/mvcc/database/tests.rs`)**:
>   - Add test for backward scan combining B-Tree and MVCC and an
ignored test covering delete during backward scan.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
430bd457e6. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Closes #3980
2025-11-20 18:41:41 +01:00
..
2025-10-20 14:47:47 -03:00
2025-11-20 10:42:02 +02:00
2025-11-11 16:11:46 -03:00
2025-11-05 20:53:34 +04:00
2025-11-20 10:42:02 +02:00
2025-11-11 16:11:46 -03:00
2025-09-24 18:06:55 -03:00
2025-06-30 10:01:03 +03:00
2025-11-20 10:42:02 +02:00
2025-10-16 01:22:54 -03:00
2025-01-28 14:55:38 -05:00
2025-11-20 10:42:02 +02:00
2025-09-30 14:52:59 +04:00
2025-10-09 19:00:40 +03:00
2025-11-20 10:42:02 +02:00
2025-09-22 16:37:31 +03:00
2025-11-20 10:42:02 +02:00
2025-06-30 09:54:13 +03:00