searchToStream abstract method

Future<Stream<Map<String, dynamic>>> searchToStream(
  1. SearchCriteria criteria,
  2. DbPrincipal principal, {
  3. SearchPolicy? searchPolicy,
  4. RepositoryTransaction? transaction,
})

Searches entities according to criteria, returning all the entities that fit the constraints.

Implementations should filter the search results limiting them to entities belonging to the tenant of the principal.

By default, this method will search all entities in the collection owned by the principal, except when the permission parameter is given. When the permission parameter has a non-empty argument and the user identified by the principal has that permission, then all the entities in the collection belonging to the tenant within the criteria defined by the criteria, regardless of their owner within the tenant.

Implementation

Future<Stream<Map<String, dynamic>>> searchToStream(
  SearchCriteria criteria,
  DbPrincipal principal, {
  SearchPolicy? searchPolicy,
  RepositoryTransaction? transaction,
});