select refactor: order by and basic agg kinda work

This commit is contained in:
jussisaurio
2024-11-23 12:33:41 +02:00
parent d0466e1cae
commit 3f9e60633f
10 changed files with 3032 additions and 2699 deletions

View File

@@ -638,6 +638,7 @@ impl ToTokens for Expr {
}
Self::Id(id) => id.to_tokens(s),
Self::Column { .. } => Ok(()),
Self::AggRef { .. } => Ok(()),
Self::InList { lhs, not, rhs } => {
lhs.to_tokens(s)?;
if *not {

View File

@@ -338,6 +338,11 @@ pub enum Expr {
/// is the column a primary key
is_primary_key: bool,
},
/// AggRef is a reference to a computed aggregate
AggRef {
/// index of the aggregate in the aggregates vector parsed from the query
index: usize,
},
/// `IN`
InList {
/// expression