doSelectByIDs<R> method
FutureOr<List<R> >
doSelectByIDs<R>(
- TransactionOperation op,
- String entityName,
- String table,
- List<
Object> ids, { - int? limit,
- int? offset,
- bool? orderByID,
- OrderDirection? orderDirection,
- PreFinishDBOperation<
List< ? preFinish,Map< , List<String, dynamic> >R> >
override
Ordering and pagination:
limit: the maximum number of returned entities. Also the page size ofpage.offset: the return offset, for pagination.page: the 1-based page to return, an ergonomic alternative tooffset: it resolves to(page - 1) * limit. Requires a positivelimit, and can't be combined withoffset. See resolveSelectOffset.orderByID: iftruethe result is ordered by the table ID column, automatically resolved from the table scheme (TableScheme.idFieldName) or from EntityHandler.idFieldName. Defaults totruewhenoffsetis defined, since a paginated select needs a stable order to be correct. Passfalseto opt out.orderDirection: the OrderDirection of the ordering, OrderDirection.ascending by default. Ignored while the ordering is not active (seeorderByID).
Note that a query over a to-many relationship generates a JOIN without
a DISTINCT, so it can return the same entity more than once. Paginating
such a query is best-effort.
Implementation
@override
FutureOr<List<R>> doSelectByIDs<R>(
TransactionOperation op,
String entityName,
String table,
List<Object> ids, {
int? limit,
int? offset,
bool? orderByID,
OrderDirection? orderDirection,
PreFinishDBOperation<List<Map<String, dynamic>>, List<R>>? preFinish,
}) => executeTransactionOperation<List<R>>(
op,
(conn) => _doSelectByIDsImpl<R>(
table,
ids,
entityName,
limit: limit,
offset: offset,
orderByID: orderByID,
orderDirection: orderDirection,
).resolveMapped((res) => _finishOperation(op, res, preFinish)),
);