fix(search): case insensitive hostname filtering (#1883)

This commit is contained in:
Ellie Huxtable 2024-03-15 08:50:43 +00:00 committed by GitHub
parent b04fc471de
commit 82a7c8d321
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -420,7 +420,9 @@ impl Database for Sqlite {
match filter {
FilterMode::Global => &mut sql,
FilterMode::Host => sql.and_where_eq("hostname", quote(&context.hostname)),
FilterMode::Host => {
sql.and_where_eq("lower(hostname)", quote(context.hostname.to_lowercase()))
}
FilterMode::Session => sql.and_where_eq("session", quote(&context.session)),
FilterMode::Directory => sql.and_where_eq("cwd", quote(&context.cwd)),
FilterMode::Workspace => sql.and_where_like_left("cwd", git_root),