Expand description
§Database Storage Implementation with Toasty
Persistent storage backend using Toasty ORM for database operations.
§⚠️ EXPERIMENTAL - NOT PRODUCTION READY
Current Status: This implementation uses in-memory storage as a fallback.
Why: Toasty ORM (v0.1.1) is in early incubation stage:
- Not production-ready (as stated by Tokio team)
- API is unstable and may change
- Limited documentation
- Schema definition requires procedural macros (
#[toasty::model]) - Proper integration requires:
- Adding
toastydependency with derive feature - Defining models with
#[derive(Model)]and#[toasty::model] - Setting up database connections with proper error handling
- Implementing migrations
- Adding
Recommendation: For production use, consider:
- Use
InMemoryStoragefor development/testing - Use mature ORMs like
sqlxordieselfor production - Wait for Toasty to reach stable release (v1.0+)
Future: Once Toasty matures, this implementation will be updated with:
- Proper model definitions using
#[toasty::model] - Full CRUD operations
- Database migrations
- Multi-database support (PostgreSQL, MySQL, SQLite, DynamoDB)
§Current Implementation
Currently uses InMemoryStorage as a fallback to provide a working interface.
All data is stored in memory and will be lost on restart.
Structs§
- Database
Storage Non- database