Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 2.09 KB

v0.6.0.md

File metadata and controls

36 lines (27 loc) · 2.09 KB

This doc aims to summarise the breaking changes between v0.5 & v0.6 so users can update their apps accordingly.

General

  • The Idb prefix has been removed from all type names
  • Type paths got moved around
  • You will no longer be dealing with JsValues - the library performs type conversion behind the scenes
  • The library now integrates with serde & implements Stream where applicable
    • As a side effect, some utility functions such as into_vec got removed, but can have the old effect achieved via Stream's try_collect
  • The library now uses a builder-based API

Transactions

Transactions now roll back by default instead of committing (i.e. you must call commit()). The thinking behind this change was to allow using ?s in your code without the JavaScript end automatically committing your transaction. There is a browser compatibility note, however - see comment on transactions' abort() method.

Advice

Head over to docs.rs and read through the new API design. You'll need to rewrite all your individual API usages to use updated type & fn names, but the actors & the flow of operations remains the same.

API stability moving forward

The library is at a place I want it to be: the API works directly with Rust types and integrates with some of the go-to libraries of the Rust ecosystem, which in turn allows 3rd party crates to easily extend good chunks of indexed_db_futures' functionality.

While breaking changes cannot be ruled out, I don't foresee anything of this scale or destructiveness again. The primary elephant in the room at the moment is #33, but I'm opting to leave it be: the issue's author has already published a crate that targets multi-threaded execution and supporting it would go against one of indexed_db_futures' key goals of an ergonomic API.