containsRows<T extends BaseModel> method
Returns true if the table/container in database
contains any data with same type provided by supplier
The default implementation is to call findAllModelsOfTypes and then check if any rows were returned.
A concrete implementation with a more efficient way of doing this should override this function.
Implementation
FutureOr<bool> containsRows<T extends BaseModel>(
String database,
T Function() supplier,
) async =>
(await findAllModelsOfType(database, supplier)).isNotEmpty;