Skip to content

Commit 9605fd9

Browse files
chenco47ido50
authored andcommitted
Add ILIKE ANY
This commit adds the ability to use ILIKE ANY to find case-insensitive values. Example: q.Where( sqlz.LikeAny(mySlice,sqlz.Indirect("myColumn")), )
1 parent ca35964 commit 9605fd9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sqlz.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ func LikeAny(arr interface{}, value interface{}) ArrayCondition {
377377
return ArrayCondition{value, "LIKE", "ANY", arr}
378378
}
379379

380+
// ILikeAny creates an "ILikeAny ANY" condition on an array
381+
func ILikeAny(arr interface{}, value interface{}) ArrayCondition {
382+
return ArrayCondition{value, "ILIKE", "ANY", arr}
383+
}
384+
380385
func NotLikeAll(arr interface{}, value interface{}) ArrayCondition {
381386
return ArrayCondition{value, "NOT LIKE", "ALL", arr}
382387
}

0 commit comments

Comments
 (0)