Skip to content

Commit

Permalink
Merge pull request #43 from whoiscarlo/patch-2
Browse files Browse the repository at this point in the history
Fix malformed array literal cause by Overalps func
  • Loading branch information
muratmirgun committed Jan 6, 2024
2 parents 135fa2b + 8b84f3f commit c5401e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion filterbuilder.go
Expand Up @@ -196,7 +196,13 @@ func (f *FilterBuilder) RangeAdjacent(column, value string) *FilterBuilder {
}

func (f *FilterBuilder) Overlaps(column string, value []string) *FilterBuilder {
f.params[column] = "ov." + strings.Join(value, ",")
newValue := []string{}
for _, v := range value {
newValue = append(newValue, fmt.Sprintf("%#v", v))
}

valueString := fmt.Sprintf("{%s}", strings.Join(newValue, ","))
f.params[column] = "ov." + valueString
return f
}

Expand Down

0 comments on commit c5401e9

Please sign in to comment.