mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
Make user fuzzy search case-insensitive
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
93688cbe22
commit
b00338195e
1 changed files with 3 additions and 3 deletions
|
@ -125,7 +125,7 @@ impl Db for PostgresDb {
|
|||
let query = "
|
||||
SELECT users.*
|
||||
FROM users
|
||||
WHERE github_login like $1
|
||||
WHERE github_login ILIKE $1
|
||||
ORDER BY github_login <-> $2
|
||||
LIMIT $3
|
||||
";
|
||||
|
@ -898,7 +898,7 @@ pub mod tests {
|
|||
let test_db = TestDb::postgres().await;
|
||||
let db = test_db.db();
|
||||
for github_login in [
|
||||
"california",
|
||||
"California",
|
||||
"colorado",
|
||||
"oregon",
|
||||
"washington",
|
||||
|
@ -911,7 +911,7 @@ pub mod tests {
|
|||
|
||||
assert_eq!(
|
||||
fuzzy_search_user_names(db, "clr").await,
|
||||
&["colorado", "california"]
|
||||
&["colorado", "California"]
|
||||
);
|
||||
assert_eq!(
|
||||
fuzzy_search_user_names(db, "ro").await,
|
||||
|
|
Loading…
Reference in a new issue