Examples of addUpdateHandler()


Examples of com.fourspaces.couchdb.Document.addUpdateHandler()

    // Retrieve the test design document
    Document designDoc = foo.getDocument("_design/junit");
    assertNotNull(designDoc);
   
    // Add the new update handler
    designDoc.addUpdateHandler("test", "function(doc,req){doc.Field1='HANDLERTEST'; return [doc, '{\\\"ok\\\":\\\"true\\\"}'];}");
    foo.saveDocument(designDoc);
   
    // Request a new copy of the design document (NOTE: not calling refresh() as it doesn't overwrite
    // unsaved data
    Document designDocNew = foo.getDocument("_design/junit");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.