uniqueKeyNotEqualTo method

QueryBuilder<SearchHistoryItem, SearchHistoryItem, QAfterWhereClause> uniqueKeyNotEqualTo(
  1. String uniqueKey
)

Implementation

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