get method

Future<List<Map<String, dynamic>>> get()

Fetch all rows with eager loading

Implementation

Future<List<Map<String, dynamic>>> get() async {
  try {
    final sql = _buildSelectQuery();
    final results = await _executeSelect(sql);

    // If no relations to eager load, return as is
    if (_withRelations.isEmpty || _modelContext.isEmpty) {
      return results;
    }

    // Load relations if requested
    return await _eagerLoadRelations(results);
  } catch (e) {
    Log.debug("", error: e);
    rethrow;
  }
}