RECENT POSTS
- Kivik v4.0 is out!
- Kivik v4.0.0-rc1 released
- New kivik CLI tool
- Kivik v3.2.0 released with cluster membership support
- Kivik v3.1.0 released with partitioned queries
- Upcoming Kivik changes for CouchDB 3.x
- Kivik v3.0.0 released
- Kivik v2.0.0 released
- (Probably) final 2.0.0 pre-release, and v3 announcement
- The Future of Kivik
- All posts ...
Kivik 2.0.0-pre1 Released
The long-awaited Kivik 2.0.0 is nearing release
Jun 9, 2019 • Jonathan Hall
I’m happy to announce that Kivik v2.0.0-pre1 has now been tagged! This version number applies to the following public packages:
- kivik, the main Kivik library
- couchdb, the CouchDB driver
- pouchdb, the PouchDB driver
- kivikmock, the new Kivik mocking driver
This new version includes a few major enhancements, as well as a much larger number of minor changes. Some of these changes break backward compatibility with the v1 series, so some care must be taken when upgrading.
An overview of the biggest changes to each package is below.
- Various API changes, to improve usability. When upgrading from v1, you will notice compilation errors where function signatures have changes, but the necessary changes should be pretty self-explanatory.
- Improved error reporting. Go 1.13 will have some new standard error features. Prior to the Go 1.13 release, these features are available with the golang.org/x/xerrors package. Kivik v2.0.0 takes advantage of these enhancements. Some error values are still subject to change prior to the final release of Kivik v2.0.0.
- A new driver, kivikmock has been added. Inspired by go-sqlmock, this driver allows mocking all database requests, for use in automated tests.
- When querying views (via
Query()
,AllDocs()
, or similar), key-related fields are now JSON-encoded by Kivik. This simplifies the use of this endpoint, but is a breaking change, as previously, raw JSON objects were required. You may still pass a raw JSON object by passing a key of typejson.RawMessage
. - Began switching to strictly using
http.Status*
codes, rather than kivik-specific ones. - The
Changes()
method was modified to support all supported modes (excepteventsource
). Previously, onlycontinuous
mode was supported. - The
Attachment
type was completely rewritten. BulkGet()
support was added, to call the/db/_bulk_get
endpoint.Ping()
support was added, which queries the new/_up
endpoint, when available, to report that the database is ready or not.DBsStats()
support was added, to query the new/_dbs_info
endpoint.- The
User-Agent
string is now set for outbound requests Purge()
support was added, to query the/db/_purge
endpoint.DesignDocs()
andLocalDocs()
support was added, to call the new/db/_design_docs
and/db/_local_docs
endpoints respectively.- When calling
Get()
, if attachments are returned, they are now returned with a new, experimentalAttachmentsIterator
, to allow for more efficient retrieval of attachments from CouchDB, usingmultipart/related
data rather than Base64-encoded binary attachments.
The final version of Kivik 2.0.0 should be released in aproximately 30 days.
- Older
- Newer