I merged #220 last night to hopefully allow a potential user to stop refactoring their application to tokio specifically to use BonsaiDb. While all unit tests pass and I feel comfortable that the API won't change before release, there's still a lot of cleanup to do:
[x] Implement Drop for Subscriber + write test
[x] Ensure each 'async' type that acquires a Tokio runtime handle also has a helper function to convert with a provided handle.
[x] Rewrite Client's Sync implementation to use the blocking send API, rather than using Tokio. This would enable a non-Tokio-based networking implementation to be provided someday.
[x] Duplicate the unit test suite, but change for sync.
[x] Client should create a tokio runtime if none is available or provided, not panic.
[x] Add a high-level API to execute a transaction. For example, tx.commit(&db). The motivation is purely due to apply_transaction being moved to LowLevelConnection.
[x] Review the CLI -- make sure blocking versions are available for local.
[x] Consider: Move session() to a new trait, add check_permission/allowed_to to that trait, and make the trait a requirement for Connection/StorageConnection. This would require importing a new trait to use the functions, but it would make it less work to check permissions since it could handle the option internally.
[x] keystorage-s3 shouldn't panic if a runtime isn't available, but should create a runtime instead like Client. Ensure a helper to provide a runtime is available.
[x] Change all local examples to blocking. Duplicate one of the examples and document it to highlight the changes between Blocking/Async
[x] Update user guide to primarily be blocking. Create a page/section showing the differences between the APIs.
[x] Add a macro for deriving Api
[x] Review documentation, consider how to document Blocking/Async especially at the type summary level.
I merged #220 last night to hopefully allow a potential user to stop refactoring their application to tokio specifically to use BonsaiDb. While all unit tests pass and I feel comfortable that the API won't change before release, there's still a lot of cleanup to do:
tx.commit(&db)
. The motivation is purely due toapply_transaction
being moved toLowLevelConnection
.session()
to a new trait, addcheck_permission
/allowed_to
to that trait, and make the trait a requirement for Connection/StorageConnection. This would require importing a new trait to use the functions, but it would make it less work to check permissions since it could handle the option internally.Api