Changelog History
Page 1
-
v0.6.0 Changes
July 17, 2017π This release is a total rewrite owing to a change in project goals. The library now less ambitiously provides a set of passive types and does not provide an HTTP client.
π Here's what the library supports so far:
- There's an
Attachment
type for intelligently working with document attachments. - There's a suite of path-related types (in the
path
submodule) for specifying the locations of CouchDB resources in a type-safe way. - There are a few other types for deserializing specific CouchDB JSON
objects. For example, the
Nok
type can capture information from a CouchDB error response.
Also, all project dependencies are now up-to-date.
- There's an
-
v0.5.2 Changes
May 26, 2017π This release fixes compiler warnings that are soon to become hard π errors. See issue [#57][issue_57] for more information.
-
v0.5.1 Changes
February 12, 2016π This release extends the crate's coverage of the CouchDB API, deprecates π a few poorly named things, and improves documentation.
π Deprecated
- The method
Client::post_to_database
is deprecated. UseClient::post_database
instead. - π The type
PostToDatabase
is deprecated. UsePostDatabase
instead.
π New
- The
GetChanges
action type is new and allows applications to get database changes via the/db/_changes
resource. - The
GetRoot
action type is new and allows applications to get the CouchDB root resource (/
), which includes the server's version information. - π There's now support for getting documents at a specific revision via
the
?rev
query parameterβi.e.,GET /db/doc?rev=<revision>
. - π This release adds limited support for getting embedded attachments via
the
GetDocument
action. - The
Document
type now contains adeleted
field for signifying whether the document has been deleted. - π The
action
module's documentation now contains a feature table showing, in detail, the crate's coverage of the CouchDB API.
- The method
-
v0.5.0 Changes
January 17, 2016π This release makes a few API changes to continue the library's progress towards optimal type-safety and convenience.
π₯ Breaking changes
- π¨ The
Document
type has been refactored to make it easier to use.- The
Document
type is no longer a generic type, nor is thecontent
field publicly accessible. Applications now access document content via a newinto_content
method, which does the JSON-decoding. See issue [#28][issue_28] for more information. - The
revision
field has been renamed torev
, which more closely matches the CouchDB name. - The
Document
type implementsserde::Deserialize
instead of a customfrom_reader
deserialization method. This should not affect applications. - The
Document
type no longer implements these traits:Eq
,Hash
,Ord
, andPartialOrd
.
- The
- Throughout the project, the term βcommandβ has been replaced with
βactionβ. The only API change is that the
command
module is now named theaction
module. This should not affect applications. See issue [#32][issue_32] for more information. - The
PostToDatabase
action now returns(DocumentId, Revision)
, not(Revision, DocumentId)
. - The following types now have at least one private field and can no
longer be directly constructed by applications:
Database
,Design
,ErrorResponse
,ViewFunction
,ViewResult
, andViewRow
.
- The
DeleteDocument
action now returns the revision of the deleted document. Previously the action returned nothing. - π The
Server
type has been moved/renamed totesting::FakeServer
.
π New
- π New
ViewFunctionBuilder
type for constructing aViewFunction
instance. - New
Revision::update_number
method for getting the update number part of a revision.
β Additional notes
- π The project is now dual-licensed under Apache-2.0 and MIT. See issue [#31][issue_31] for more information.
- Actions are now tested as unit tests and integration tests. Previously, actions were tested only as integration tests. Unit-testing now provides good test coverage without having the CouchDB server installed on the local machine.
- π The project now has support for Travis CI.
- π¨ The
-
v0.4.0 Changes
January 03, 2016π This release introduces several breaking changes to improve type-safety and ease-of-use, as well as to fix inconsistencies between the crate's API and the CouchDB API.
π₯ Breaking changes
- The path types of v0.3.x (e.g.,
DocumentPath
, etc.) are now split into path, id, and name types (e.g.,DocumentPath
,DocumentId
, andDocumentName
, etc.). Client commands use path types as input; id and name types are used everywhere else to match what the CouchDB API uses.- Paths now must begin with a slash (e.g.,
/db/docid
vs thedb/docid
format of v0.3.x). - Path types now implement
std::str::FromStr
instead ofFrom<String>
. This means string-to-path conversions now may fail.
- Paths now must begin with a slash (e.g.,
- The
Revision
type now fully understands CouchDB revisions.- The
Revision
type now implementsstd::str::FromStr
instead ofFrom<&str>
andFrom<String>
. This means string-to-revision conversion now may fail. - The
Revision
type no longer implementsAsRef<str>
. - Revisions now compare as numbers, not strings, to match what the CouchDB server does.
- The
- π¨ The
Error
enum has been refactored to be simpler.- Many error variants documented in v0.3.x are now hidden or removed. The remaining variants are either CouchDB response errors or are for path-parsing.
- All CouchDB response error values are now wrapped in an
Option
to reflect how the CouchDB server returns no detailed error information for HEAD requests. - All non-hidden error variant values are now tuples, not structs.
- The
InvalidRequest
error variant has been renamed toBadRequest
. The new name matches HTTP status code 400 of the same name.
π Fixes
- When getting a document, the client now ignores any
_attachments
field in the CouchDB response. Previously, the client included the attachment info in the document content. - The client no longer tries to decode the server's response as JSON when the client receives an "unauthorized" error as a result of executing a client command to HEAD a document.
β Additional notes
- β Test coverage has expanded, and test cases have been broken out into smaller cases. Consequently, there are now more than 200 additional test cases than in the v0.3.1 release.
- The source code has been reorganized to be more hierarchical. CouchDB types, path types, and client commands now reside within distinct submodules.
- The path types of v0.3.x (e.g.,
-
v0.3.1 Changes
December 21, 2015π This release expands the crate's coverage of the CouchDB API.
π New
- There's a new client command to POST to a database.
- The
Revision
type now implementsserde::Serialize
andserde::Deserialize
.
-
v0.3.0 Changes
December 12, 2015π This release overhauls the crate's API to provide stronger type-safety and to be more Rust-idiomatic.
π₯ Breaking changes
- There are new types for specifying databases, documents, and views.
- All raw-string path parameters have been replaced with new path
types:
DatabasePath
,DocumentPath
, andViewPath
. The signatures of all client commands have changed, as well as theDocument
andViewRow
types. - There's a new
DocumentId
type that combines a document name with its type (i.e., normal document vs design document vs local document).
- All raw-string path parameters have been replaced with new path
types:
- All client commands specific to design documents (e.g.,
get_design_document
) have been removed. Design documents are now accessible via generic document commands (e.g.,get_document
). - The
ViewResult
struct now wraps itstotal_rows
andoffset
fields in anOption
. - The underlying type for
ViewFunctionMap
is nowHashMap
, notBTreeMap
. - The
Command
trait is now private. - Crate dependencies now specify explicit version ranges instead of
*
.
π Fixes
- All JSON-decoding errors are now reported as the
Decode
error variant. Previously, some decoding errors were reported as a hidden variant. - The
Revision
type now compares as case-insensitive, matching CouchDB semantics. - π A bug has been fixed that caused CPU spin on Windows in the
Server
type.
π New
- The
Database
type now includes all fields returned by the CouchDB server as a result of a client command to GET a database. - There's a new
DesignBuilder
type to make it easier to constructDesign
instances. - π― The
Clone
,Hash
,Eq
,PartialEq
,Ord
, andPartialOrd
traits have been implemented for all types where appropriate.
- There are new types for specifying databases, documents, and views.
-
v0.2.0 Changes
October 17, 2015π₯ Breaking changes
- Client command-construction methods (e.g.,
put_document
,get_database
, etc.) now bind the lifetime of the returned command to the lifetimes of all&str
parameters. - The client command to GET a design document now strips
"_design/"
from the resulting document id.
β Additional notes
- β The integration test has been split into separate test cases, one for each CouchDB command.
- π Some support has been added for running tests on Windows. See issue #8.
- Client command-construction methods (e.g.,
-
v0.1.0 Changes
September 21, 2015π₯ Breaking changes
- The
Revision
type now implements theAsRef<str>
trait instead of implementing theas_str
method. - Client commands that have a revision parameter now borrow the
Revision
argument instead of taking ownership. This resolves issue #1. - Disallow construction of a
Revision
from an arbitrary string. - The
ServerErrorResponse
type has been renamed toErrorResponse
, which is now used consistently for reporting CouchDB server errors. - The
DesignDocument
type has been renamed toDesign
. - There's a new
IntoUrl
trait that aliaseshyper::IntoUrl
.
π Fixes
- The
views
field of theDesign
struct is now public.
π New
- There's a new
ViewFunctionMap
collection type.
- The
-
v0.0.1 Changes
September 07, 2015π This release adds and improves API doc comments.