Class CouchDbClientWrapper
- java.lang.Object
-
- org.apache.camel.component.couchdb.CouchDbClientWrapper
-
public class CouchDbClientWrapper extends Object
Necessary to allow mockito to mock this client. Once LightCouch library adds an interface for the client, this class can be removed.
-
-
Constructor Summary
Constructors Constructor Description CouchDbClientWrapper(org.lightcouch.CouchDbClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.lightcouch.Changes
changes()
org.lightcouch.CouchDbContext
context()
Object
get(String id)
String
getLatestUpdateSequence()
In CouchDB 2.3.x, the purge_seq field type was changed from number to string.org.lightcouch.Response
remove(Object doc)
org.lightcouch.Response
save(Object doc)
org.lightcouch.Response
update(Object doc)
-
-
-
Method Detail
-
update
public org.lightcouch.Response update(Object doc)
-
save
public org.lightcouch.Response save(Object doc)
-
remove
public org.lightcouch.Response remove(Object doc)
-
changes
public org.lightcouch.Changes changes()
-
context
public org.lightcouch.CouchDbContext context()
-
getLatestUpdateSequence
public String getLatestUpdateSequence()
In CouchDB 2.3.x, the purge_seq field type was changed from number to string. As such, callingCouchDbContext.info()
was throwing an exception. This method workarounds the issue by getting the update_seq field while ignoring the purge_seq field.- Returns:
- The latest update sequence
-
-