Arm1.ru

Swift CouchDB client 1.4.0

Swift CouchDB client

A new CouchDB Client version has been released:

  • The library migrated from HTTPClient.Response to HTTPClientResponse which is similar to HTTPClient.Response, but used for the Swift Concurrency API. Also it migrated from HTTPClient.Body to HTTPClientRequest.Body. These changes affect get and find methods. Old methods are marked as deprecated, check the docs for the updated methods.
  • Minimum Swift version is 5.8 now.
  • CouchDBRepresentable protocol is now marked as Codable.
  • Added a new RowsResponse data model that accepts a generic CouchDBRepresentable type which makes it easier to get rows from a database. Example:
    class="swift">let decodeResponse = try JSONDecoder().decode(RowsResponse<MyApp>.self, from: data)
  • Small improvements in the documentation and tutorials.

CouchDB Client on GitHub | Documentation with examples and tutorials.

keyboard_return back