Query constructor

const Query({
  1. QueryAction? action,
  2. List<ProviderQuery<Provider<Model>>> forProviders = const [],
  3. int? limit,
  4. List<LimitBy> limitBy = const [],
  5. int? offset,
  6. @Deprecated('Use limit, offset, limitBy, orderBy, or forProviders instead.') Map<String, dynamic> providerArgs = const {},
  7. List<OrderBy> orderBy = const [],
  8. List<WhereCondition>? where,
})

An interface to request data from a Provider or ModelRepository.

Implementation

const Query({
  this.action,
  this.forProviders = const [],
  this.limit,
  this.limitBy = const [],
  this.offset,
  @Deprecated('Use limit, offset, limitBy, orderBy, or forProviders instead.')
  this.providerArgs = const {},
  this.orderBy = const [],
  this.where,
})  : assert(limit == null || limit > -1, 'limit must be greater than 0'),
      assert(offset == null || offset > -1, 'offset must be greater than 0');