forgebase_sdk 0.0.2
forgebase_sdk: ^0.0.2 copied to clipboard
The Forgebase Dart/Flutter Client SDK
0.0.1 #
Initial release of the ForgeBase Dart/Flutter Client SDK
- Basic database SDK functionality
- Query builder implementation
- Model system support
- Dio-based HTTP client integration
- Utility functions for database operations
0.0.2 #
ForgeBase SDK for Dart - Changes #
This document outlines the changes made to align the Dart SDK with the TypeScript version.
Added Features #
Authentication Support #
- Added
DatabaseSDK.withDioconstructor to support custom Dio instances for authentication - Added
getDio()method to access the Dio instance - Added
setBaseUrl()method to change the API endpoint at runtime
Cache Configuration #
- Added
CacheConfigclass for query caching - Added cache parameter to
getRecordsmethod - Implemented TTL, key, and tags for cache invalidation
Query Validation #
- Added
QueryValidationandValidationRulesclasses - Added validation parameter to
getRecordsmethod - Implemented maxLimit, requiredFields, disallowedFields, and maxComplexity validation
Transform Implementation #
- Enhanced
_applyTransformationsmethod to properly apply transformations - Implemented
_groupResultsand_pivotResultsmethods - Added detailed documentation for transform methods
Variable Arguments Support #
- Updated
selectmethod to accept both list and variable arguments - Updated
groupBymethod to accept both list and variable arguments
Query Explanation #
- Added
ExplainFormatenum for EXPLAIN query results - Added
explainmethod to QueryBuilder for query analysis
Error Handling #
- Improved error handling with more detailed error messages
- Added catch blocks for non-Dio exceptions
Documentation Improvements #
- Added comprehensive examples for all new features
- Updated README with new features and examples
- Added detailed method documentation
Type Safety Improvements #
- Made
deleteRecordmethod generic to match TypeScript version - Fixed type issues in transformation methods
Other Improvements #
- Added
getParams()method to QueryBuilder - Enhanced method documentation with more examples
- Improved code organization and readability