mirror of
https://github.com/zed-industries/zed.git
synced 2024-10-26 00:19:46 +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 = "
|
let query = "
|
||||||
SELECT users.*
|
SELECT users.*
|
||||||
FROM users
|
FROM users
|
||||||
WHERE github_login like $1
|
WHERE github_login ILIKE $1
|
||||||
ORDER BY github_login <-> $2
|
ORDER BY github_login <-> $2
|
||||||
LIMIT $3
|
LIMIT $3
|
||||||
";
|
";
|
||||||
|
@ -898,7 +898,7 @@ pub mod tests {
|
||||||
let test_db = TestDb::postgres().await;
|
let test_db = TestDb::postgres().await;
|
||||||
let db = test_db.db();
|
let db = test_db.db();
|
||||||
for github_login in [
|
for github_login in [
|
||||||
"california",
|
"California",
|
||||||
"colorado",
|
"colorado",
|
||||||
"oregon",
|
"oregon",
|
||||||
"washington",
|
"washington",
|
||||||
|
@ -911,7 +911,7 @@ pub mod tests {
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
fuzzy_search_user_names(db, "clr").await,
|
fuzzy_search_user_names(db, "clr").await,
|
||||||
&["colorado", "california"]
|
&["colorado", "California"]
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
fuzzy_search_user_names(db, "ro").await,
|
fuzzy_search_user_names(db, "ro").await,
|
||||||
|
|
Loading…
Reference in a new issue