applyTableOrderAndPagination method

  1. @protected
List<Map<String, dynamic>> applyTableOrderAndPagination(
  1. String table,
  2. Iterable<Map<String, dynamic>> entries, {
  3. int? limit,
  4. int? offset,
  5. bool? orderByID,
  6. OrderDirection? orderDirection,
})
inherited

Orders (by the ID field of table) and paginates the selected entries: the object adapters select all the objects (no query engine), and then apply the select's order and limits here.

Implementation

@protected
List<Map<String, dynamic>> applyTableOrderAndPagination(
  String table,
  Iterable<Map<String, dynamic>> entries, {
  int? limit,
  int? offset,
  bool? orderByID,
  OrderDirection? orderDirection,
}) {
  var idField = getTableIDFieldName(table);

  return applySelectOrderAndPagination(
    entries,
    (e) => e[idField],
    limit: limit,
    offset: offset,
    orderByID: orderByID,
    orderDirection: orderDirection,
  ).toList();
}