Skip to content

Commit 70c244f

Browse files
committed
Make the match() function case insensitive.
The commit makes the String.match() function, that is used in WHERE filter clauses, case insensitive. This will now be consistent with other string comparisons operations.
1 parent 653aea6 commit 70c244f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/tidwall/gjson v1.18.0
1212
github.com/tidwall/hashmap v1.8.1
1313
github.com/tidwall/limiter v0.4.0
14-
github.com/tidwall/match v1.1.1
14+
github.com/tidwall/match v1.2.0
1515
github.com/tidwall/mvt v0.2.1
1616
github.com/tidwall/pretty v1.2.1
1717
github.com/tidwall/redbench v0.1.0

go.sum

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,9 @@ github.com/tidwall/limiter v0.4.0 h1:nj+7mS6aMDRzp15QTVDrgkun0def5/PfB4ogs5NlIVQ
246246
github.com/tidwall/limiter v0.4.0/go.mod h1:n+qBGuSOgAvgcq1xUvo+mXWg8oBLQC8wkkheN9KZou0=
247247
github.com/tidwall/lotsa v1.0.2 h1:dNVBH5MErdaQ/xd9s769R31/n2dXavsQ0Yf4TMEHHw8=
248248
github.com/tidwall/lotsa v1.0.2/go.mod h1:X6NiU+4yHA3fE3Puvpnn1XMDrFZrE9JO2/w+UMuqgR8=
249-
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
250249
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
250+
github.com/tidwall/match v1.2.0 h1:0pt8FlkOwjN2fPt4bIl4BoNxb98gGHN2ObFEDkrfZnM=
251+
github.com/tidwall/match v1.2.0/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
251252
github.com/tidwall/mvt v0.2.1 h1:pVoD4/INMeXk8VF8yfMOzn534W4u/0vhSnqyi+/FfG4=
252253
github.com/tidwall/mvt v0.2.1/go.mod h1:RLOVf5y8yfDR4vyA636MiY0kBJeP/i7RxxpZzygREI8=
253254
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=

internal/server/expr.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ func newExprPool(s *Server) *exprPool {
123123
if info.Args.Len() < 0 {
124124
return expr.Undefined, nil
125125
}
126-
127-
t := match.Match(info.Value.String(),
126+
t := match.MatchNoCase(info.Value.String(),
128127
info.Args.At(0).String())
129128
return expr.Bool(t), nil
130129
}

0 commit comments

Comments
 (0)