core: Move LimitInfo to select.rs

That's the only place where it's used.
This commit is contained in:
Pekka Enberg
2024-07-25 17:42:08 +03:00
parent 16e0e740df
commit b25f63f360
2 changed files with 7 additions and 7 deletions

View File

@@ -14,12 +14,6 @@ use crate::Result;
use select::{prepare_select, translate_select};
use sqlite3_parser::ast;
struct LimitInfo {
limit_reg: usize,
num: i64,
goto_label: BranchOffset,
}
#[derive(Debug)]
struct SortInfo {
sorter_cursor: usize,

View File

@@ -4,7 +4,7 @@ use crate::translate::expr::{analyze_columns, maybe_apply_affinity, translate_ex
use crate::translate::where_clause::{
process_where, translate_processed_where, translate_where, ProcessedWhereClause,
};
use crate::translate::{normalize_ident, Insn, LimitInfo, SortInfo};
use crate::translate::{normalize_ident, Insn, SortInfo};
use crate::types::{OwnedRecord, OwnedValue};
use crate::vdbe::{builder::ProgramBuilder, BranchOffset, Program};
use crate::Result;
@@ -117,6 +117,12 @@ pub struct LoopInfo {
pub open_cursor: usize,
}
struct LimitInfo {
limit_reg: usize,
num: i64,
goto_label: BranchOffset,
}
pub fn prepare_select<'a>(schema: &Schema, select: &'a ast::Select) -> Result<Select<'a>> {
match &select.body.select {
ast::OneSelect::Select {