Skip to content

Commit 614df0c

Browse files
committed
Added Additional Array Conditions
- LikeIn - ILikeIn - ILikeAny Signed-off-by: David Deal <[email protected]>
1 parent abb9e99 commit 614df0c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.swp
2+
.idea/

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/ido50/sqlz
1+
module github.com/LF-Engineering/sqlz
22

33
go 1.15
44

sqlz.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,26 @@ func GteAll(arr interface{}, value interface{}) ArrayCondition {
372372
return ArrayCondition{value, ">=", "ALL", arr}
373373
}
374374

375+
// LikeIn creates an "Like IN" condition on an array
376+
func LikeIn(arr interface{}, value interface{}) ArrayCondition {
377+
return ArrayCondition{value, "LIKE", "In", arr}
378+
}
379+
380+
// ILikeIn creates an "ILike IN" condition on an array
381+
func ILikeIn(arr interface{}, value interface{}) ArrayCondition {
382+
return ArrayCondition{value, "ILIKE", "In", arr}
383+
}
384+
375385
// LikeAny creates an "Like ANY" condition on an array
376386
func LikeAny(arr interface{}, value interface{}) ArrayCondition {
377387
return ArrayCondition{value, "LIKE", "ANY", arr}
378388
}
379389

390+
// ILikeAny creates an "ILike ANY" condition on an array
391+
func ILikeAny(arr interface{}, value interface{}) ArrayCondition {
392+
return ArrayCondition{value, "ILIKE", "ANY", arr}
393+
}
394+
380395
func NotLikeAll(arr interface{}, value interface{}) ArrayCondition {
381396
return ArrayCondition{value, "NOT LIKE", "ALL", arr}
382397
}

0 commit comments

Comments
 (0)