Package com.mongodb

Examples of com.mongodb.GroupCommand


     * @see <a
     *      href="http://www.mongodb.org/display/DOCS/Aggregation">http://www.mongodb.org/display/DOCS/Aggregation</a>
     */
    public DBObject group(DBObject key, DBObject cond, DBObject initial,
            String reduce, String finalize) throws MongoException {
        GroupCommand cmd = new GroupCommand(dbCollection, key, cond, initial,
                reduce, finalize);
        return group(cmd);
    }
View Full Code Here


        DBObject keys = ((DocBuilderField) getBoundUnit(Item.grpKeys)).getDBObject();
        DBObject initial = ((DocBuilderField) getBoundUnit(Item.grpInitialValue)).getDBObject();
        DBObject query = ((DocBuilderField) getBoundUnit(Item.grpQuery)).getDBObject();
        String reduce = getStringFieldValue(Item.grpReduce);
        String finalize = getStringFieldValue(Item.grpFinalize);
        final GroupCommand cmd = new GroupCommand(col, keys, query, initial, reduce, finalize);
//        new DocView(null, "Group", col.getDB(), cmd.toDBObject()).addToTabbedDiv();

        new DbJobCmd(col.getDB(), cmd.toDBObject(), null, button).addJob();
    }
View Full Code Here

      DBCollection coll = db.getCollection(collName);
      DBObject dbq = moe.formatObject(q);

      String reduce = "function(obj,prev){prev.csum+=obj." + fieldName + ";}";

      GroupCommand gcmd = new GroupCommandcoll,
                          Mongos.dbo(),
                          dbq,
                          Mongos.dbo("csum", 0),
                          reduce,
                          null);
View Full Code Here

TOP

Related Classes of com.mongodb.GroupCommand

Copyright © 2018 www.massapicom. 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.