Package com.fourspaces.couchdb

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


   
    JSONObject funcs = new JSONObject();  
    funcs.put("put", JSONUtils.stringSerializedFunction("function(doc,req){doc.Field1=req.query.field1; return [doc, '{\\\"ok\\\":\\\"true\\\"}'];}"));
    funcs.put("post", JSONUtils.stringSerializedFunction("function(doc,req){doc.Field2=req.form.field2; return [doc, '{\\\"ok\\\":\\\"true\\\"}'];}"));
   
    design.accumulate("updates", funcs);
   
    // System.err.println("UDFUNCS: " + design.toString());
   
    foo.saveDocument(design);
   
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.