You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ScalikeJDBC SQLSyntax Extension: eq/ne/like with ignore case, and more.
case insensitivity
SQLSyntax
SQL
sqls.eqIgnoreCase(column.title, "abc")
LOWER(title) = LOWER('abc')
sqls.neIgnoreCase(column.title, "abc")
LOWER(title) <> LOWER('abc')
sqls.likeIgnoreCase(column.title, "%abc%")
LOWER(title) LIKE LOWER('%abc%')
sqls.notLikeIgnoreCase(column.title, "%abc%")
LOWER(title) NOT LIKE LOWER('%abc%')
shortcut methods using the LIKE predicate
SQLSyntax
SQL
sqls.contains(column.title, "abc")
`title LIKE '%'
sqls.startsWith(column.title, "abc")
`title LIKE 'abc'
sqls.endsWith(column.title, "abc")
`title LIKE '%'
Examples
importcom.github.roundrop.scalikejdbcext.sqlsyntax._// eq with ignore caseTag.where(sqls.eqIgnoreCase(column.name, name))...
// ne with ignore caseTag.where(sqls.neIgnoreCase(column.name, name))...
// like with ignore caseArticle.countBy(sqls.likeIgnoreCase(column.title, "%abc%").or.likeIgnoreCase(column.body, "%xyz%"))...