orderBy method

ProcessedTableManager<$Database, $Table, $Dataclass, $FilterComposer, $OrderingComposer, $ComputedFieldComposer, $CreateCompanionCallback, $UpdateCompanionCallback, $DataclassWithReferences, $ActiveDataclass, $CreatePrefetchHooksCallback> orderBy(
  1. ComposableOrdering o(
    1. $OrderingComposer o
    )
)

Add ordering to the statement

Implementation

ProcessedTableManager<
        $Database,
        $Table,
        $Dataclass,
        $FilterComposer,
        $OrderingComposer,
        $ComputedFieldComposer,
        $CreateCompanionCallback,
        $UpdateCompanionCallback,
        $DataclassWithReferences,
        $ActiveDataclass,
        $CreatePrefetchHooksCallback>
    orderBy(ComposableOrdering Function($OrderingComposer o) o) {
  final composer = $state.createOrderingComposer();

  final orderings = o(composer);
  return ProcessedTableManager($state.copyWith(
      orderingBuilders:
          $state.orderingBuilders.union(orderings.orderingBuilders),
      joinBuilders:
          $state.joinBuilders.union(composer.$joinBuilders.toSet())));
}