whereEqualTo function

dynamic whereEqualTo (dynamic value, { bool caseSensitive: true })

Matcher for exactly matching a column value when using Query.where.

See Query.where. Example:

  var query = new Query<User>()
    ..where.id = whereEqualTo(1);

If matching a String value, caseSensitive is will toggle if value is to be case sensitive equal to matched values. Otherwise, this flag is ignored.


dynamic whereEqualTo(dynamic value, {bool caseSensitive: true}) {
  if (value is String) {
    return new StringMatcherExpression(value, StringMatcherOperator.equals,
        caseSensitive: caseSensitive);
  return new ComparisonMatcherExpression(value, MatcherOperator.equalTo);