LCOV - code coverage report
Current view: top level - src/db - storage_database.dart Coverage Total Hit
Test: filtered_lcov.info Lines: 27.3 % 11 3
Test Date: 2026-04-08 10:01:09 Functions: - 0 0

            Line data    Source code
       1              : import 'package:drift/drift.dart';
       2              : import 'package:drift_flutter/drift_flutter.dart';
       3              : import 'package:the_storage/src/db/database_path.dart';
       4              : import 'package:the_storage/src/db/storage_table.dart';
       5              : 
       6              : part 'storage_database.g.dart';
       7              : 
       8              : /// Drift database for the storage package.
       9              : @DriftDatabase(tables: [StorageEntries])
      10              : class StorageDatabase extends _$StorageDatabase {
      11              :   /// Creates a database with the default name.
      12            3 :   StorageDatabase([QueryExecutor? executor])
      13            3 :     : super(executor ?? _openConnection('storage.db'));
      14              : 
      15              :   /// Creates a database with a custom name.
      16            0 :   StorageDatabase.withName(String name, [QueryExecutor? executor])
      17            0 :     : super(executor ?? _openConnection(name));
      18              : 
      19            3 :   @override
      20              :   int get schemaVersion => 1;
      21              : 
      22            0 :   static QueryExecutor _openConnection(String name) {
      23            0 :     return driftDatabase(
      24              :       name: name,
      25            0 :       native: nativeDatabaseOptions(name),
      26            0 :       web: DriftWebOptions(
      27            0 :         sqlite3Wasm: Uri.parse('sqlite3.wasm'),
      28            0 :         driftWorker: Uri.parse('drift_worker.js'),
      29              :       ),
      30              :     );
      31              :   }
      32              : }
        

Generated by: LCOV version 2.4-0