Class 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 Detail

      • CouchDbClientWrapper

        public CouchDbClientWrapper​(org.lightcouch.CouchDbClient client)
    • 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, calling CouchDbContext.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