You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "hubodz (via GitHub)" <gi...@apache.org> on 2024/04/28 12:07:28 UTC

[I] Invoking update function when changing document in Fauxton [couchdb]

hubodz opened a new issue, #5041:
URL: https://github.com/apache/couchdb/issues/5041

   Hello,
   I would like to add a simple functionality using update function in design document. I would like it to be invoked when a document is changed/created in Fauxton.
   Normally, one has to call the update function explicitly, but this (I believe) not possible with Fauxton.
   
   Is there any way to achieve behaviour described above? Maybe it's possible to set an update function as default, so it doesn't require explicit call?
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Invoking update function when changing document in Fauxton [couchdb]

Posted by "hubodz (via GitHub)" <gi...@apache.org>.
hubodz commented on issue #5041:
URL: https://github.com/apache/couchdb/issues/5041#issuecomment-2081572502

   Thank you!
   Do you think the idea I described could be proposed as enhancement to Couch, or there are reasons to not go that way?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Invoking update function when changing document in Fauxton [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5041:
URL: https://github.com/apache/couchdb/issues/5041#issuecomment-2081988264

   The idea has come up before but it is has always been rejected, for similar reasons to your other ticket.
   
   What you can do is use a validate_doc_update function to ensure only valid updates are made (you can compare the new incoming update to the current document to ensure any state transition constraints) and provide an update handler to your clients to make it easier to create a valid update.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Invoking update function when changing document in Fauxton [couchdb]

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #5041:
URL: https://github.com/apache/couchdb/issues/5041#issuecomment-2081492387

   It is not possible. Clients must call through to the appropriate _update handler url explicitly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org