Skip to content

Commit 1d90344

Browse files
committed
Propogate context in StringType::Compare
1 parent 4569796 commit 1d90344

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sql/types/strings.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,14 +244,11 @@ func (t StringType) Length() int64 {
244244
}
245245

246246
// Compare implements Type interface.
247-
func (t StringType) Compare(s context.Context, a interface{}, b interface{}) (int, error) {
247+
func (t StringType) Compare(ctx context.Context, a interface{}, b interface{}) (int, error) {
248248
if hasNulls, res := CompareNulls(a, b); hasNulls {
249249
return res, nil
250250
}
251251

252-
// TODO: Add context parameter to Compare
253-
ctx := context.Background()
254-
255252
var as string
256253
var bs string
257254
var ok bool

0 commit comments

Comments
 (0)