Skip to content

Commit 0b6f814

Browse files
committed
add ILIKE method to Cond
1 parent 9fc30d9 commit 0b6f814

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cond.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,15 @@ func (c *Cond) Like(field string, value interface{}) string {
170170
return buf.String()
171171
}
172172

173+
// ILike represents "field ILIKE value".
174+
func (c *Cond) ILike(field string, value interface{}) string {
175+
buf := newStringBuilder()
176+
buf.WriteString(Escape(field))
177+
buf.WriteString(" ILIKE ")
178+
buf.WriteString(c.Args.Add(value))
179+
return buf.String()
180+
}
181+
173182
// NotLike represents "field NOT LIKE value".
174183
func (c *Cond) NotLike(field string, value interface{}) string {
175184
buf := newStringBuilder()

0 commit comments

Comments
 (0)