termIsNotEmpty method

QueryBuilder<DictionaryHeading, DictionaryHeading, QAfterWhereClause> termIsNotEmpty()

Implementation

QueryBuilder<DictionaryHeading, DictionaryHeading, QAfterWhereClause>
    termIsNotEmpty() {
  return QueryBuilder.apply(this, (query) {
    if (query.whereSort == Sort.asc) {
      return query
          .addWhereClause(IndexWhereClause.lessThan(
            indexName: r'term',
            upper: [''],
          ))
          .addWhereClause(IndexWhereClause.greaterThan(
            indexName: r'term',
            lower: [''],
          ));
    } else {
      return query
          .addWhereClause(IndexWhereClause.greaterThan(
            indexName: r'term',
            lower: [''],
          ))
          .addWhereClause(IndexWhereClause.lessThan(
            indexName: r'term',
            upper: [''],
          ));
    }
  });
}