mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 07:24:19 +01:00
I was planning on starting work on index insertion, but realized we need to know whether our cursor refers to a table or an index etc., so it resulted in this refactoring work. - `cursor_ref` now contains what _type_ of cursor it is (table, index, pseudo, sorter) - `program.cursors` is now `program.btree_table_cursors`, `program.btree_index_cursors` etc and they are unboxed because dynamic dispatch is no longer necessary - Cursor trait removed -- 95% of the shit was btree specific anyway, so I just moved them to `BTreeCursor`. In certain instructions in the VDBE we expect a btree cursor and in others we expect a pseudo/sorter etc, lets make that explicit. - I also removed `BTreeCursor::get_new_rowid()` specific tests that required macros to generate a mock implementation of the `Cursor` trait -- main reason is I couldn't figure out how to reimplement this without the trait, and the second reason is that I don't think we really need those tests, AND the proc macro is constantly failing in my editor as well and screwing up `rust-analyzer` Closes #655