resolve with indexing (#1)

This commit is contained in:
2025-05-18 21:38:12 -04:00
parent 369d445637
commit d5db656ca2

View File

@@ -30,7 +30,7 @@ func dbGetUser(id string) (*User, error) {
func dbGetUserByName(username string) (*User, error) {
// This will be deprecated soon after implementing https://git.dubyatp.xyz/williamp/chatservice_concept/issues/1
query := `SELECT id, name, password FROM users WHERE name = ? ALLOW FILTERING`
query := `SELECT id, name, password FROM users WHERE name = ?`
var user User
err := db.Session.Query(query, username).Scan(&user.ID, &user.Name, &user.Password)
if err == gocql.ErrNotFound {