doExistIDsSQL<I extends Object> method

  1. @override
FutureOr<List<I>> doExistIDsSQL<I extends Object>(
  1. String entityName,
  2. String table,
  3. SQL sql,
  4. Transaction transaction,
  5. DBSQLMemoryAdapterContext connection,
)
override

Implementation

@override
FutureOr<List<I>> doExistIDsSQL<I extends Object>(
  String entityName,
  String table,
  SQL sql,
  Transaction transaction,
  DBSQLMemoryAdapterContext connection,
) {
  var map = _getTableMap(table, false);
  if (map == null) return [];

  var condition = sql.condition;
  if (condition is! ConditionIdIN) {
    return [];
  }

  var ids = condition.idsValues;

  var existIDs = map.keys.whereIn(ids).whereType<I>().toList();

  return existIDs;
}