Skip to content

Commit

Permalink
[#38] Use contains for suggest tag value
Browse files Browse the repository at this point in the history
Closes #38
  • Loading branch information
jmattheis committed May 8, 2019
1 parent 93386c5 commit ff5a280
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timespan/suggestvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func (r *ResolverForTimeSpan) SuggestTagValue(ctx context.Context, key string, q
Select("DISTINCT time_span_tags.string_value").
Joins("JOIN time_spans on time_spans.id = time_span_tags.time_span_id").
Where("user_id = ?", auth.GetUser(ctx).ID).
Where("key = ?", key).Where("string_value LIKE ?", query+"%").
Where("key = ?", key).Where("LOWER(string_value) LIKE LOWER(?)", "%"+query+"%").
Find(&suggestions)
var result []string
for _, value := range suggestions {
Expand Down

0 comments on commit ff5a280

Please sign in to comment.