0.44.0
Breaking Changes📦 drizzle-ormView on GitHub →
⚠ 1 breaking✨ 4 features🔧 7 symbols
Summary
This release introduces a robust error-handling wrapper called DrizzleQueryError and a new extensible caching module with a native Upstash integration.
⚠️ Breaking Changes
- Errors from database drivers are now wrapped in DrizzleQueryError. This may break existing error handling logic that relies on catching raw driver-specific error types.
Migration Steps
- Update error handling blocks to account for the new DrizzleQueryError wrapper if you inspect error properties.
- To enable caching, initialize the drizzle client with the 'cache' option using upstashCache or a custom implementation.
- If using custom caching, implement the strategy(), get(), put(), and onMutate() methods as defined in the new Cache API.
✨ New Features
- Introduced DrizzleQueryError for enhanced error reporting, including SQL strings, parameters, and improved stack traces.
- Added a native Drizzle cache module with support for explicit (opt-in) or global (all queries) caching strategies.
- Launched native Upstash Redis integration for query caching via drizzle-orm/cache/upstash.
- Exposed Cache base class and APIs (get, put, onMutate) to allow developers to implement custom caching providers (e.g., Keyv).
🔧 Affected Symbols
DrizzleQueryErrorupstashCachedrizzle-orm/cache/upstashCacheCacheConfigonMutate.$withCache()