import 'package:smoke_cess_app/interface/db_record.dart'; import 'package:smoke_cess_app/mock/db_mock.dart'; class QueryService { final DatabaseMock _database; QueryService(this._database); void addRecord(DatabaseRecord record) => _database.saveRecord(record); List getWorkoutRecords() => _database.getWorkoutRecords(); List getMoodRecords() => _database.getMoodRecords(); List getSleepRecords() => _database.getSleepRecords(); String recordsToCSV(List records) { String csv = ""; for (DatabaseRecord record in records) { csv += '${record.toCSV()}\n'; } return csv; } }