mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Remove unused imports and consolidate ordering comparison
This commit is contained in:
parent
e020ba3dfe
commit
2c3fd509fe
2 changed files with 4 additions and 6 deletions
|
@ -2017,6 +2017,8 @@ impl BTreeCursor {
|
|||
{
|
||||
BTreeCell::IndexInteriorCell(IndexInteriorCell { payload, .. })
|
||||
| BTreeCell::IndexLeafCell(IndexLeafCell { payload, .. }) => {
|
||||
// TODO: implement efficient comparison of records
|
||||
// e.g. https://github.com/sqlite/sqlite/blob/master/src/vdbeaux.c#L4719
|
||||
read_record(
|
||||
payload,
|
||||
self.get_immutable_record_or_create().as_mut().unwrap(),
|
||||
|
@ -2027,10 +2029,7 @@ impl BTreeCursor {
|
|||
self.get_immutable_record().as_ref().unwrap().get_values(),
|
||||
);
|
||||
match order {
|
||||
Ordering::Less => {
|
||||
break;
|
||||
}
|
||||
Ordering::Equal => {
|
||||
Ordering::Less | Ordering::Equal => {
|
||||
break;
|
||||
}
|
||||
Ordering::Greater => {}
|
||||
|
@ -2044,7 +2043,7 @@ impl BTreeCursor {
|
|||
}
|
||||
|
||||
pub fn seek_end(&mut self) -> Result<CursorResult<()>> {
|
||||
assert!(self.mv_cursor.is_none());
|
||||
assert!(self.mv_cursor.is_none()); // unsure about this -_-
|
||||
self.move_to_root();
|
||||
loop {
|
||||
let mem_page = self.stack.top();
|
||||
|
|
|
@ -7,7 +7,6 @@ use crate::translate::ProgramBuilderOpts;
|
|||
use crate::translate::QueryMode;
|
||||
use crate::util::PRIMARY_KEY_AUTOMATIC_INDEX_NAME_PREFIX;
|
||||
use crate::vdbe::builder::CursorType;
|
||||
use crate::vdbe::insn::RegisterOrLiteral;
|
||||
use crate::vdbe::insn::{CmpInsFlags, Insn};
|
||||
use crate::LimboError;
|
||||
use crate::{bail_parse_error, Result};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue