Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1519

Allow validate_doc_update.js to be aware if the update went through an update function before

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.2
    • None
    • View Server Support
    • None

    Description

      It would be useful for the validate_doc_update function to "know" if the document has been processed by an update function or is sent directly to the DB.

      There are several possible ways to do it:

      • allow the update function to update either the userCtx or the secObj objects, and let that change propagate to the validate_doc_update function
      • add a completely new object that will be passed to both functions. update functions could then modify it.
      • add some flag to validate_doc_update parameters to signal that the document is direct to DB or not. But this would limit the usefulness of the feature.

      Adding special attributes to the document object, in an update function, that the validate function can check later, is not sufficient since that attribute can be sent directly to the DB also, and will be stored in the database.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gdamjan Damjan Georgievski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: