where method

void where(
  1. String fieldUid,
  2. QueryOperation queryOperation
)
inherited

Implementation

void where(String fieldUid, QueryOperation queryOperation) {
  if (fieldUid != null && fieldUid.isNotEmpty) {
    queryOperation.when(equals: (operation) {
      parameter[fieldUid] = operation.value;
    }, notEquals: (operation) {
      parameter[fieldUid] = {'\$ne': operation.value};
    }, includes: (operation) {
      parameter[fieldUid] = {'\$in': operation.value};
    }, excludes: (operation) {
      parameter[fieldUid] = {'\$nin': operation.value};
    }, isLessThan: (operation) {
      parameter[fieldUid] = {'\$lt': operation.value};
    }, isLessThanOrEqual: (operation) {
      parameter[fieldUid] = {'\$lte': operation.value};
    }, isGreaterThan: (operation) {
      parameter[fieldUid] = {'\$gt': operation.value};
    }, isGreaterThanOrEqual: (operation) {
      parameter[fieldUid] = {'\$gte': operation.value};
    }, exists: (operation) {
      parameter[fieldUid] = {'\$exists': operation.value};
    }, matches: (operation) {
      parameter[fieldUid] = {'\$regex': operation.regex};
    });
  }
}