query method

Future query({
  1. List<QueryPart> queries(
    1. T e
    )?,
  2. ConditionQuery where(
    1. T e
    )?,
  3. ConditionQuery having(
    1. T e
    )?,
  4. int? offset,
  5. int? limit,
  6. List<FieldWithValue> groupBy(
    1. T e
    )?,
  7. List<FieldOrder> orderBy(
    1. T e
    )?,
})

Query some rows with specified fields from this table.

Implementation

Future query(
    {List<QueryPart> Function(T e)? queries,
    ConditionQuery Function(T e)? where,
    ConditionQuery Function(T e)? having,
    int? offset,
    int? limit,
    List<FieldWithValue> Function(T e)? groupBy,
    List<FieldOrder> Function(T e)? orderBy}) async {
  List<QueryPart> Function(T a, DbModel? b)? quers;
  if (queries != null) {
    quers = (a, b) => queries.call(a).map((e) => e).toList();
  }
  return _query(
      queries: quers,
      where: where,
      offset: offset,
      having: having,
      limit: limit,
      groupBy: groupBy,
      orderBy: orderBy);
}