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
LOWER(title) NOT LIKE LOWER('%#%0D#%0A%') ESCAPE '#'
Examples
importcom.github.roundrop.scalikejdbcext.sqlsyntax._// eq with ignore casevalname="alice"valalice:Option[Member] = withSQL {
select.from(Memberasm).where(sqls.ieq(m.name, name))
}.map(rs =>Member(rs)).single.apply()
// --> select m.id as i_on_m, ... from members m where LOWER(m.name) = LOWER('alice');// like with ignore casevals="b"valq= scalikejdbc.LikeConditionEscapeUtil.contains(s) // "b" => "%b%"valb:Seq[Member] = withSQL {
select.from(Memberasm).where(sqls.ilike(m.name, q))
}.map(rs =>Member(rs)).list.apply()
// --> select m.id as i_on_m, ... from members m where LOWER(m.name) like LOWER('%b%');// use escape clausevalescapeChar="#"valutil= scalikejdbc.LikeConditionEscapeUtil(escapeChar)
vals="_100%"valq= util.endsWith(s) // "_100%" => "%#_100#%"valx:Seq[Member] = withSQL {
select.from(Memberasm).where(sqls.like(m.name, q).escape(escapeChar))
}.map(rs =>Member(rs)).list.apply()
// --> select m.id as i_on_m, ... from members m where m.name like '%#_100#%' ESCAPE '#';