How to Retrieve All Revisions (_rev) for maintain the version history of a Document in Wappler.io with CouchDB Integration?

Hi Wappler.io Community,

I’m currently working on a project using Wappler.io with CouchDB, and I’ve encountered a scenario where I need to retrieve all revisions (_rev) of a document when it’s updated in the “documents_collection.” I know that in CouchDB, this information can be obtained using revs_info to get a list of all _revs associated with a document.

Here’s a brief overview of what I’ve done so far:

  1. I’ve established a connection between Wappler.io and CouchDB.
  2. I’ve created collections through Wappler.io in CouchDB.
  3. I’m storing files/documents in the “documents_collection.”
  4. The issue arises when I update a record in the “documents_collection” - the _rev changes, and the old _rev is no longer available.

My question is: How can I retrieve all revisions (_rev) of a document directly in Wappler.io? Is there a specific Wappler.io Server Connect API or action that allows me to access the revs_info or similar functionality in CouchDB?

I would greatly appreciate any insights or guidance from the community, @ben, if you have any expertise in this area, your input would be invaluable.

Thank you all for your time and assistance!