matches method

bool matches(
  1. FdcRecord record
)

Returns whether record satisfies this prepared search expression.

Implementation

bool matches(FdcRecord record) {
  final structuredTimeTerm = _structuredTimeSingleTerm;
  return structuredTimeTerm == null
      ? switch (mode) {
          FdcSearchMode.phrase => _matchesPhrase(record),
          FdcSearchMode.allWords => _matchesAllWords(record),
          FdcSearchMode.anyWord => _matchesAnyWord(record),
          FdcSearchMode.exactPhrase => _matchesExactPhrase(record),
          FdcSearchMode.startsWith => _matchesStartsWith(record),
        }
      : _matchesStructuredTimeOnly(record, structuredTimeTerm);
}