dynamod db index changes added to the schema

This commit is contained in:
Manoj
2022-10-05 15:32:32 +05:30
parent dba8944565
commit cc4eaa2847
16 changed files with 60 additions and 45 deletions

View File

@@ -131,7 +131,7 @@ func (p *provider) GetUserByEmail(ctx context.Context, email string) (models.Use
var user models.User
collection := p.db.Table(models.Collections.User)
err := collection.Scan().Filter("'email' = ?", email).AllWithContext(ctx, &users)
err := collection.Scan().Index("email").Filter("'email' = ?", email).AllWithContext(ctx, &users)
if err != nil {
return user, nil