query method

Future<List<T>> query({
  1. List where = const [],
  2. String orderBy = "",
  3. int offset = 0,
  4. bool count = false,
  5. int limit = 50,
})

Implementation

Future<List<T>> query(
    {List<dynamic> where = const [],
    String orderBy = "",
    int offset = 0,
    bool count = false,
    int limit = 50}) async {
  final tmp = await adapter.query(
      from: model.getTableName(),
      select: model.getColumns(),
      where: where,
      orderBy: orderBy,
      offset: offset,
      count: count,
      limit: limit);
  return tmp.map((e) => model.fromJson(e) as T).toList();
}