All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased - ReleaseDate
- Include a status() on DesignCreated to make it easier to switch from ensure_index() to insert_index()
- Fixes for structs implementing TypedCouchDocument where _id was not read using TypedCouchDocument::get_id()
- Fixed RUSTSEC-2023-0018; updated base64 to 0.21; contributed by tkoeppen.
- Add
delete_index
operation; contributed by kingledion
- Update the arguments to
insert_index
to match thetypes::index::Index struct
, to make it more compatible with theget_indexes
method; contributed by kingledion - DEPRECATED:
ensure_index
- BREAKING change:
CouchError
is now an enum to easily differentiate using a match; contributed by jgrund - Add
membership
andcluster_setup
read operations; contributed by hmacias
- Dev dependencies updated for tokio; contributed by tkoeppen
- Set minimal tokio version to 1.14 to ensure RUSTSEC-2021-0124 is patched.
- Split unit-, doc- and integration-tests; contributed by tkoeppen
- Percent encode the database name to accommodate special characters like '+'.
- Allow non-string keys for views; contributed by marius851000
- Updated tokio-util to 0.7
- Added into_option() to turn a Result into a Result to easily handle non-existing documents (404)
- Fixed is_ok() to accept HTTP status 200 <= n < 300 as successes too
- Reverted to 2018 edition (address issue: #17)
- 2021 edition
- Clippy suggestions fixed
- BUG FIX: client.exists() returns true too often; contributed by wrazik & horacimacias
- allow to specify TLS flavour; contributed by sify21
- BUG FIX: use
serde_json::Value
forseq
when querying_changes
- stream changes; contributed by Frando
- bulk upsert; contributed by Frando
- cleaned-up some left-over dbg! statements
- BREAKING CHANGE: mutually borrow documents on create and update; contributed by horacimacias
- Loosened the dependency requirements
- Depend on std::fmt::Formatter not the serde::export one.
- Upgraded reqwest to 0.11 and tokio to 1.0
- Add support for partitioned databases; contibuted by krishna-kashyap
- Ditched a
unwrap
.
- Renamed
merge
tomerge_ids
to avoid confusion. - Allow
CouchError
to include an optionalid
- Use
unwrap_or_default
when extracting a json field, prevents panic when finding documents without an_id
field in the result.
- Typed view queries
- Allow
_bulk_docs
to take TypedDocuments
- WARNING: big changes ahead!
- Most of the find/get operations now take a typed
TypedCouchDocument
.- To use the generic
Value
, either use a.._raw
function, or type the query with::<Value>
- Value now holds the raw CouchDocument, including
_id
and_rev
fields. - See the examples and the tests for more details
- To use the generic
TypedCouchDocument
traits can be derived usingCouchDocument
Value
implementsTypedCouchDocument
traits
- Allow complex keys on views
- Url encode additional ID's
- Url encoding to allow for complex IDs, for example
1+2
- Get database information
- BUG FIX: find_batched should have sent segment_query, but was sending query
- Use Basic Authentication headers
- bulk_docs returns a Vec of CouchResults
- Updated examples
- Included builder paradigm for FindQuery and QueryParams
- Use
&str
instead ofString
in a few places to make the API easier to use - Included test for
bulk_docs
- Use
&str
instead ofDocumentId
in a few places to make the API easier to use - Include an example for
query_many_all_docs
- Introduce gitflow
- Updated rustfmt configuration
- Test for query params
- Let
get_bulk_params
takeOption<QueryParams>
- Use
Into<serde_json::Value>
trait forcreate_view
to not break compatibility withCouchUpdate
- Use the typed
CouchViews
structure to create views
- Included the
upsert
operation
- Implement multiple queries in a single request
- Updated the documentation and examples
- Automated GitHub build action
- the
find()
operations takes a FindQuery
- Views now use QueryParams instead of an untyped map.
- Views can now return the optional "doc" item.
- BREAKING CHANGE:
execute_view
has been removed. Usequery
instead.
- Sort takes an array of key/value pairs, like: [{"first_name":"desc"}]
- Make total_rows in ViewCollection optional.
- Make id in ViewItem optional.
- Return value in ViewItem as a Value, not String
- Use reqwest's
error_for_status()
on responses, where we are not actively checking the result. - Return an Error when one occurs during batch reading.
- Removed the
'static
lifetime on some of thestr
parameters; contribution from kallisti5 - Included
execute_update()
operation; contribution from horacimacias
- Check response success for create_view()
- Allow to query a view with a different design name
- BREAKING CHANGE: get_all_params now takes a typed QueryParams as input.
- get_all_params uses POST, instead of GET, for greater flexibility.
json_extr!
does not panic when called on a non-existent field. Like in find for _id, when the find result does not include an _id.
- Implemented Display for FindQuery
- Allow FindQuery to be converted to Value
- Added
find_batched
to allow asynchronous customized searches
- Added
Client::make_db
- Added
docker-compose.yml
- Added
.rustfmt.toml
- Updated to the Rust 2018 edition standards
- Compiles against the latest reqwest and serde libraries
- Optimized memory consumption by moving
iter()
calls tointo_iter()
where needed - Changed
SofaError
to derivefailure
- Changed
Client::check_status
signature to remove potentially panickingunwrap()
calls - Changed
Client::create_path
signature to remove potentially panickingunwrap()
calls - Changed
Client::db
signature to remove potentially panickingunwrap()
calls - Changed
Client::delete
signature to remove potentially panickingunwrap()
calls - Changed
Client::destroy_db
signature to remove potentially panickingunwrap()
calls - Changed
Client::get
signature to remove potentially panickingunwrap()
calls - Changed
Client::gzip
signature to remove potentially panickingunwrap()
calls - Changed
Client::head
signature to remove potentially panickingunwrap()
calls - Changed
Client::list_dbs
signature to remove potentially panickingunwrap()
calls - Changed
Client::new
signature to remove potentially panickingunwrap()
calls - Changed
Client::post
signature to remove potentially panickingunwrap()
calls - Changed
Client::pub
signature to remove potentially panickingunwrap()
calls - Changed
Client::req
signature to remove potentially panickingunwrap()
calls - Changed
Client::timeout
signature to remove potentially panickingunwrap()
calls - Changed
Database::create
signature to remove potentially panickingunwrap()
calls - Changed
Database::ensure_index
signature to remove potentially panickingunwrap()
calls - Changed
Database::find
signature to remove potentially panickingunwrap()
calls - Changed
Database::get
signature to remove potentially panickingunwrap()
calls - Changed
Database::insert_index
signature to remove potentially panickingunwrap()
calls - Changed
Database::read_indexes
signature to remove potentially panickingunwrap()
calls - Changed
Database::save
signature to remove potentially panickingunwrap()
calls
- Removed env files that were necessary for single-threaded test run. Added section in README to reflect that.
- Removed the
failure
dependency