data_shaft 2.0.0
data_shaft: ^2.0.0 copied to clipboard
High-level data layer for Clean Architecture with standardized Drivers, typed DataSources, and Repository mixins for caching, deduplication, and safe error handling.
2.0.0 #
⚠️ BREAKING CHANGES #
List<int>→Set<int>for status codes:inadmissibleStatusCodeandadmissibleStatusCodeinDatasourceRemoteand observer interfaces now returnSet<int>instead ofList<int>.- Impact: Existing observer implementations that use
List<int>as parameter types must update toSet<int>. - Reasoning:
Set<int>better represents unique status codes and eliminates unnecessaryList.from()allocations.
- Impact: Existing observer implementations that use
- Observer naming & timing: Repository observer methods deprecated
name→repositoryName,callableName→datasourceName;beforeCallnow receivesstartTime,afterCallreceivesendTimeandelapsed. @mustCallSuperremoved: Removed from all abstract interface methods (no effect on pure interfaces).
Added #
useHigherObserverflag inDatasourceObserverInstancesandRepositoryObserverInstancesto enable fallback chains.Set.unmodifiable()wrapping around status codes passed to observer methods (prevents mutation).reset()method on both observer registries for test isolation.
1.1.3 #
Added #
- Datasource Remote covariant in transform and checkInformation for improve modifications
1.1.0 #
⚠️ BREAKING CHANGES #
- Observer Hierarchy Refactor:
HttpDatasourceObservernow implementsSimpleDatasourceObserverinstead ofSimpleObserver.- Impact: It is no longer necessary to implement two observers if you want the same information in common methods such as onCreate and onDispose.
- Reasoning: This change enables
DatasourceObserverInstancesto use the HTTP observer as a fallback for basic lifecycle events, reducing boilerplate configuration for users.
Fix #
- Correct use of observer in
DatasourceRemote. The default debugPrint for datasource creation will no longer appear.
1.0.0 #
- Initial version.
Added #
- Datasource abstract
- Datasource callable abstract
- Datasource local abstract
- Datasource streamable abstract
- Datasource remote abstract
- Request response
- Request params
- Request mixin
- Datasource Delete Remote
- Datasource Get Remote
- Datasource Patch Remote
- Datasource Post Remote
- Datasource Put Remote
- Drivers
- Issues
- Datasource exception
- Repository errors
- Observer
- Observer singleton instance
- Repository observer
- Datasource observer
- Repository
- Repository
- Repository with datasource
- Safe repository
- Memory cache
- Deduplication
- Deduplication safe cache
- Memory repository helper
- Deduplication repository helper
- Safe caller repository helper
Chore #
- Test
- Documentation