core: fix agg function uppercase parsing

Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
This commit is contained in:
Pere Diaz Bou 2024-07-01 15:47:57 +02:00
parent 106fe5f259
commit 9242e5c671
4 changed files with 13 additions and 9 deletions

View file

@ -8,6 +8,8 @@ use sqlite3_parser::{
};
use std::collections::HashMap;
use crate::util::normalize_ident;
pub struct Schema {
pub tables: HashMap<String, Table>,
}
@ -140,14 +142,6 @@ fn create_table(tbl_name: QualifiedName, body: CreateTableBody, root_page: usize
})
}
fn normalize_ident(ident: &str) -> String {
if ident.starts_with('"') && ident.ends_with('"') {
ident[1..ident.len() - 1].to_string().to_lowercase()
} else {
ident.to_lowercase()
}
}
pub struct Column {
pub name: String,
pub ty: Type,