contains method

MssqlCondition contains(
  1. String term
)

LIKE '%term%', with term escaped.

What a search box needs. like is an exact match — it escapes the term, so like('%ali%') looks for a literal %ali% — and likeRaw would let a % the user typed become a wildcard. This is the safe middle: the term stays literal, the wildcards are ours.

Implementation

MssqlCondition contains(String term) => MssqlLike(
  this,
  term,
  negated: false,
  escaped: true,
  position: MssqlLikePosition.anywhere,
);