v0.3.0
This release aggregates a coordinated set of breaking and additive API changes that landed across four PRs during the v0.3.0 bundle window. See MIGRATING-0.3.md for complete migration recipes covering every change.
⚠ BREAKING CHANGES
- Flat
Errorenum. The publichyperdb_api::Erroris now a flat canonical structure per the Microsoft Pragmatic Rust Guidelines — noBox<dyn StdError>cause channel, nokind()method, noOthercatch-all variant.Error::newandError::with_causeare deleted in favor of domain-specific snake_case constructors (Error::connection,Error::server,Error::conversion, etc.). TheErrorKindre-export fromhyperdb_apiis removed. (#70, #71) - Transaction API consolidation.
Connection::begin_transaction/commit/rollback(and the async equivalents) are deprecated and#[doc(hidden)]. Use the RAII guard atConnection::transaction()/AsyncConnection::transaction()instead. (#69, #73) FromRowmodernization.FromRow::from_row(&Row)becomesFromRow::from_row(RowAccessor<'_>). The blanket 1/2/3/4-tupleFromRowimpls are deleted — define a struct with#[derive(FromRow)]instead. NewRowAccessorcarries a per-query cached column-name → index lookup; newRow::get_by_namefor one-off named access. (#61, #62, #74)- Structured SQLSTATE on
Cancelled/Closed/Connection.Error::CancelledandError::Closedchange from tuple to struct variants carryingsqlstate: Option<String>.Error::Connectiongains the same field.Error::sqlstate()now returnsSome(...)for these variants when the server provided a code (previously Server-only). NewError::InvalidOperationvariant separates caller-API misuse from library invariant violations. (#76)
Features
#[derive(FromRow)]proc-macro with#[hyperdb(rename = "...")]and#[hyperdb(index = N)]attributes, lives in the new re-exportedhyperdb-api-derivecrate (#74)RowAccessoraccessors:get/get_opt(name-based) andposition/position_opt(index-based) (#74)- Ergonomic snake_case constructors workspace-wide for every error variant —
&str,String,format!(...)accepted without.to_string()ceremony (#71) - Typed
io::Errorsources preserved onHyperProcesslifecycle errors (#76) - stabilize v0.3.0 public API bundle (#77) (ac39b2c)
Deferred
- Internal
client::Errorflatten — deferred to v0.3.x as #75 (internal type, zero external consumers; scope grew on second look).
What's Changed
- fix(ci): install mold in release.yml verify job by @StefanSteiner in #58
- chore(api): flatten Error enum and add ergonomic constructors workspace-wide (#70) by @StefanSteiner in #71
- chore(api): deprecate raw transaction trio; migrate MCP async paths to RAII (#69) by @StefanSteiner in #73
- chore(api): modernize FromRow with #[derive] + RowAccessor (#61, #62) by @StefanSteiner in #74
- chore(api): v0.3.0 follow-ups (A: typed I/O sources, B: InvalidOperation, C: structured SQLSTATE) by @StefanSteiner in #76
- feat: stabilize v0.3.0 public API bundle by @StefanSteiner in #77
- chore: enable bump-minor-pre-major for pre-1.0 releases by @StefanSteiner in #79
- chore: release main by @StefanSteiner in #80
Full Changelog: v0.2.3...v0.3.0