resolveOrderByID static method

bool resolveOrderByID(
  1. bool? orderByID,
  2. int? offset, [
  3. int? limit
])

Resolves if a select operation should order by the table ID column.

Returns orderByID when defined. Otherwise returns true if an offset or a limit is defined: without an order, which rows a LIMIT (or a page) returns is undefined (it may change between calls, e.g. with the query plan), and pages may overlap or skip rows.

Implementation

static bool resolveOrderByID(bool? orderByID, int? offset, [int? limit]) =>
    orderByID ?? (offset != null || limit != null);