Query constructor

Query({
  1. QueryAction? action,
  2. Map<String, dynamic>? providerArgs,
  3. List<WhereCondition>? where,
})

Implementation

Query({
  this.action,
  Map<String, dynamic>? providerArgs,
  this.where,
}) : providerArgs = providerArgs ?? {} {
  /// Number of results first returned from query; `0` returns all. Must be greater than -1
  if (this.providerArgs['limit'] != null) {
    assert(this.providerArgs['limit'] > -1);
  }

  /// Offset results returned from query. Must be greater than -1 and must be used with limit
  if (this.providerArgs['offset'] != null) {
    assert(this.providerArgs['offset'] > -1);
    assert(this.providerArgs['limit'] != null);
  }
}