searchTermNotEqualTo method

QueryBuilder<SearchHistoryItem, SearchHistoryItem, QAfterWhereClause> searchTermNotEqualTo(
  1. String searchTerm
)

Implementation

QueryBuilder<SearchHistoryItem, SearchHistoryItem, QAfterWhereClause>
    searchTermNotEqualTo(String searchTerm) {
  return QueryBuilder.apply(this, (query) {
    if (query.whereSort == Sort.asc) {
      return query
          .addWhereClause(IndexWhereClause.between(
            indexName: r'searchTerm',
            lower: [],
            upper: [searchTerm],
            includeUpper: false,
          ))
          .addWhereClause(IndexWhereClause.between(
            indexName: r'searchTerm',
            lower: [searchTerm],
            includeLower: false,
            upper: [],
          ));
    } else {
      return query
          .addWhereClause(IndexWhereClause.between(
            indexName: r'searchTerm',
            lower: [searchTerm],
            includeLower: false,
            upper: [],
          ))
          .addWhereClause(IndexWhereClause.between(
            indexName: r'searchTerm',
            lower: [],
            upper: [searchTerm],
            includeUpper: false,
          ));
    }
  });
}