Merge pull request #1987 from famedly/krille/remove-deprecated-hive-database

refactor: Remove deprecated Hive Database
This commit is contained in:
Krille-chan 2024-12-31 09:05:44 +01:00 committed by GitHub
commit 4c7bdb71cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 1664 deletions

View File

@ -25,7 +25,6 @@ export 'fake_matrix_api.dart' show FakeMatrixApi;
export 'src/client.dart';
export 'src/database/database_api.dart';
export 'src/database/hive_database.dart';
export 'src/database/matrix_sdk_database.dart';
export 'src/database/hive_collections_database.dart';
export 'src/database/sqflite_encryption_helper.dart';

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,6 @@ String createLargeString(String character, int desiredSize) {
void main() {
final databaseBuilders = {
'Matrix SDK Database': getMatrixSdkDatabase,
'Hive Database': getHiveDatabase,
'Hive Collections Database': getHiveCollectionsDatabase,
};
@ -660,9 +659,7 @@ void main() {
),
);
// ignore: deprecated_member_use_from_same_package
if (database is! HiveCollectionsDatabase &&
// ignore: deprecated_member_use_from_same_package
database is! FamedlySdkHiveDatabase) {
if (database is! HiveCollectionsDatabase) {
final profile2 =
await database.getUserProfile('@alice:example.com');
expect(profile2?.displayname, 'Alice M');

View File

@ -61,18 +61,3 @@ Future<MatrixSdkDatabase> getMatrixSdkDatabase(
await db.open();
return db;
}
// ignore: deprecated_member_use_from_same_package
Future<FamedlySdkHiveDatabase> getHiveDatabase(Client? c) async {
if (!hiveInitialized) {
final testHivePath = await LocalFileSystem()
.systemTempDirectory
.createTemp('dart-sdk-tests-database');
Hive.init(testHivePath.path);
hiveInitialized = true;
}
// ignore: deprecated_member_use_from_same_package
final db = FamedlySdkHiveDatabase('unit_test.${c?.hashCode}');
await db.open();
return db;
}