getAll<T> method

Future<List<T>?> getAll<T>(
  1. Object tableEntityInstance
)

Returns every object of type T currently stored, or null when the table is empty.

Throws DatabaseException if the entity table does not exist.

Implementation

Future<List<T>?> getAll<T>(Object tableEntityInstance) async {
  final List<Map<String, Object?>> rows = await _selectWhere(
    '*',
    quoteIdentifier(_tableFor<T>()),
    null,
    null,
  );
  if (rows.isEmpty) return null;
  return _entities<T>(tableEntityInstance, rows);
}