diff --git a/core/types.rs b/core/types.rs
index 93162a01e..2b3bd2e38 100644
--- a/core/types.rs
+++ b/core/types.rs
@@ -619,20 +619,15 @@ impl Record {
}
pub enum Cursor {
- Table(BTreeCursor),
- Index(BTreeCursor),
+ BTree(BTreeCursor),
Pseudo(PseudoCursor),
Sorter(Sorter),
Virtual(VTabOpaqueCursor),
}
impl Cursor {
- pub fn new_table(cursor: BTreeCursor) -> Self {
- Self::Table(cursor)
- }
-
- pub fn new_index(cursor: BTreeCursor) -> Self {
- Self::Index(cursor)
+ pub fn new_btree(cursor: BTreeCursor) -> Self {
+ Self::BTree(cursor)
}
pub fn new_pseudo(cursor: PseudoCursor) -> Self {
@@ -643,17 +638,10 @@ impl Cursor {
Self::Sorter(cursor)
}
- pub fn as_table_mut(&mut self) -> &mut BTreeCursor {
+ pub fn as_btree_mut(&mut self) -> &mut BTreeCursor {
match self {
- Self::Table(cursor) => cursor,
- _ => panic!("Cursor is not a table"),
- }
- }
-
- pub fn as_index_mut(&mut self) -> &mut BTreeCursor {
- match self {
- Self::Index(cursor) => cursor,
- _ => panic!("Cursor is not an index"),
+ Self::BTree(cursor) => cursor,
+ _ => panic!("Cursor is not a btree"),
}
}
diff --git a/core/vdbe/mod.rs b/core/vdbe/mod.rs
index 709129381..f2c34c6e9 100644
--- a/core/vdbe/mod.rs
+++ b/core/vdbe/mod.rs
@@ -67,7 +67,7 @@ use rand::{thread_rng, Rng};
use regex::{Regex, RegexBuilder};
use sorter::Sorter;
use std::borrow::BorrowMut;
-use std::cell::{Cell, RefCell, RefMut};
+use std::cell::{Cell, RefCell};
use std::collections::HashMap;
use std::ffi::c_void;
use std::num::NonZero;
@@ -177,71 +177,6 @@ impl RegexCache {
}
}
-fn get_cursor_as_table_mut<'long, 'short>(
- cursors: &'short mut RefMut<'long, Vec