couchdbektorp

ektorp / CouchDB update / synchronize folder


In jcouchdb there is an util class org.jcouchdb.util.CouchDBUpdater that allows to update documents from your local file system into CouchDB (used for example for copying design documents into CouchDB). Is there anything similar in ektorp?


Solution

  • You have two options:

    1. Embed your design document in your repository class by using @View, @GenerateView, @Filter, @ShowFuction, @ListFuction annotations. The corresponding design doc will automatically be updated at application upstart. See http://ektorp.org/reference_documentation.html#d100e753

    2. Implement a org.ektorp.dataload.DataLoader which allow you to bootstrap your DB with any kind of documents. See http://ektorp.org/reference_documentation.html#d100e1170