mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
core: fix agg function uppercase parsing
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
This commit is contained in:
parent
106fe5f259
commit
9242e5c671
4 changed files with 13 additions and 9 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue