find method

Future<List<MethodInfo>> find(
  1. Session session, {
  2. WhereExpressionBuilder<MethodInfoTable>? where,
  3. int? limit,
  4. int? offset,
  5. OrderByBuilder<MethodInfoTable>? orderBy,
  6. bool orderDescending = false,
  7. OrderByListBuilder<MethodInfoTable>? orderByList,
  8. Transaction? transaction,
})

Returns a list of MethodInfos matching the given query parameters.

Use where to specify which items to include in the return value. If none is specified, all items will be returned.

To specify the order of the items use orderBy or orderByList when sorting by multiple columns.

The maximum number of items can be set by limit. If no limit is set, all items matching the query will be returned.

offset defines how many items to skip, after which limit (or all) items are read from the database.

var persons = await Persons.db.find(
  session,
  where: (t) => t.lastName.equals('Jones'),
  orderBy: (t) => t.firstName,
  limit: 100,
);

Implementation

Future<List<MethodInfo>> find(
  _i1.Session session, {
  _i1.WhereExpressionBuilder<MethodInfoTable>? where,
  int? limit,
  int? offset,
  _i1.OrderByBuilder<MethodInfoTable>? orderBy,
  bool orderDescending = false,
  _i1.OrderByListBuilder<MethodInfoTable>? orderByList,
  _i1.Transaction? transaction,
}) async {
  return session.db.find<MethodInfo>(
    where: where?.call(MethodInfo.t),
    orderBy: orderBy?.call(MethodInfo.t),
    orderByList: orderByList?.call(MethodInfo.t),
    orderDescending: orderDescending,
    limit: limit,
    offset: offset,
    transaction: transaction,
  );
}