-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress with migration to ObjectBox
- Loading branch information
1 parent
cad382e
commit ef3d56f
Showing
19 changed files
with
873 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export 'export_std.dart'; | ||
export 'impl_tools/errors.dart'; | ||
export 'impl_tools/no_sync.dart'; | ||
export 'interfaces/models.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export 'errors.dart'; | ||
export 'impls/objectbox/backend.dart'; | ||
export 'interfaces/backend.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
import 'dart:typed_data'; | ||
|
||
import '../interfaces/backend.dart'; | ||
import 'errors.dart'; | ||
|
||
/// A shortcut to declare that an [FMTCBackend] does not support any synchronous | ||
/// versions of methods | ||
mixin FMTCBackendNoSync implements FMTCBackend { | ||
/// This synchronous method is unsupported by this implementation - use | ||
/// [initialise] instead | ||
@override | ||
Never initialiseSync({ | ||
String? rootDirectory, | ||
int? maxDatabaseSize, | ||
Map<String, Object> implSpecificArgs = const {}, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncInitialise = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [destroy] instead | ||
@override | ||
Never destroySync({ | ||
bool deleteRoot = false, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncDestroy = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [createStore] instead | ||
@override | ||
Never createStoreSync({ | ||
required String storeName, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncCreateStore = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [resetStore] instead | ||
@override | ||
Never resetStoreSync({ | ||
required String storeName, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncResetStore = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [renameStore] instead | ||
@override | ||
Never renameStoreSync({ | ||
required String currentStoreName, | ||
required String newStoreName, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncRenameStore = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [deleteStore] instead | ||
@override | ||
Never deleteStoreSync({ | ||
required String storeName, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncDeleteStore = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [getStoreSize] instead | ||
@override | ||
Never getStoreSizeSync({ | ||
required String storeName, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncGetStoreSize = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [getStoreLength] instead | ||
@override | ||
Never getStoreLengthSync({ | ||
required String storeName, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncGetStoreLength = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [readTile] instead | ||
@override | ||
Never readTileSync({ | ||
required String url, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncReadTile = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [writeTile] instead | ||
@override | ||
Never writeTileSync({ | ||
required String storeName, | ||
required String url, | ||
required Uint8List? bytes, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncWriteTile = false; | ||
|
||
/// This synchronous method is unsupported by this implementation - use | ||
/// [deleteTile] instead | ||
@override | ||
Never deleteTileSync({ | ||
required String storeName, | ||
required String url, | ||
}) => | ||
throw SyncOperationUnsupported(); | ||
|
||
@override | ||
final supportsSyncDeleteTile = false; | ||
} |
Oops, something went wrong.