historyKeyNotEqualTo method

QueryBuilder<SearchHistoryItem, SearchHistoryItem, QAfterWhereClause> historyKeyNotEqualTo(
  1. String historyKey
)

Implementation

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