t×tecexpressby TeKOcloud
DEv0.7.1
API & types / FLUTTER

TxLoadOptions.

Store query contract: filtering, searching, sorting, grouping, paging, projection and cancellation.

Vue: omitted options are undefined; DataSource supplies count and paging defaults. Dart defaults appear in the constructor. skip/take apply to rows and top-level groups. Local processing returns counts even without a count request. Vue select is a field list; Dart select is a T→T callback. Forward signal/cancellation to custom async operations.

TxLoadOptions

ParameterTypeDefaultMeaning
sortList<TxSort<T>>const []Sort descriptors in priority order.
filterTxFilter<T>?nullFilter expression.
searchExprList<TxGetter<T>>const []Search fields or getters.
searchValueString''Search text; local search ignores case.
groupList<TxSort<T>>const []Group descriptors or group name.
skipint0Number of results to skip.
takeint?nullMaximum number of results to return.
selectT Function(T)?nullProjection before final mapping.
requireTotalCountbooltrueRequests the total count before paging.
requireGroupCountboolfalseRequests the number of top-level groups.
cancellationTxCancellation?nullCooperative cancellation token.
dart
import 'package:tecexpress/tecexpress.dart';

Future<void> example() async {
  final options = TxLoadOptions<int>(sort: [TxSort((v) => v)], take: 1);
  print(txQuery([2, 1], options).data);
}