This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Sohva 1.0.0 Breaking Changes
Lucas Satabin edited this page May 18, 2014
·
2 revisions
Sohva version 1.0.0 introduced some breaking changes in order to make the API more intuitive. They are listed below.
- Sohva is now based on the spray client, which requires you to have:
- a dependency to Akka (which is marked as provide by both spray and sohva),
- an implicit ActorSystem in scope when creating the
CouchClient
, - an implicit Timeout in scope when creating the
CouchClient
,
- The API does not return optional document when saving/patching anymore. It returns the new document revision if change was saved, or an error if something went wrong,
- On does not have to choose the view types when creating the view, but when querying it. This is e.g. necessary because types between reduced and non reduced views may differ. This means that instead of writing
val view = db.design("my-design").view[Key, Value, Doc]("my-view")
val res = view.query()
as you used to do, you now need to write
val view = db.design("my-design").view("my-view")
val res = view.query[Key, Value, Doc]()
- Change streams are implemented with RxScala which requires to update to their pattern,