selectIDsBy<I extends Object> method

  1. @override
FutureOr<Iterable<I>> selectIDsBy<I extends Object>(
  1. EntityMatcher matcher, {
  2. Object? parameters,
  3. List? positionalParameters,
  4. Map<String, Object?>? namedParameters,
  5. Transaction? transaction,
  6. int? limit,
})
override

Implementation

@override
FutureOr<Iterable<I>> selectIDsBy<I extends Object>(
  EntityMatcher matcher, {
  Object? parameters,
  List? positionalParameters,
  Map<String, Object?>? namedParameters,
  Transaction? transaction,
  int? limit,
}) {
  if (matcher is ConditionID) {
    var id = matcher.resolveIDValue(
      parameters: parameters ?? namedParameters,
    );
    return existsID(
      id,
      transaction: transaction,
    ).resolveMapped((exists) => exists ? [id] : []);
  }

  if (matcher is ConditionIdIN) {
    var ids = matcher.idsValues.whereType<I>().toList();
    return existIDs(ids, transaction: transaction);
  }

  throw UnsupportedError(
    "Relationship select not supported for: (${matcher.runtimeTypeNameUnsafe}) $matcher @ $tableName ($this)",
  );
}