Package mungbean.query

Examples of mungbean.query.Update


            final DBCollection<Map<String, Object>> collection = context.openCollection("foo2");
            for (int a = 0; a < 10; a++) {
                collection.save(newDoc(new ObjectId(), a));
            }

            collection.update(new Query().field("foo").greaterThan(3), new Update().field("foo").increment(5));
            specify(collection.query(new Query().field("foo").is(9)).size(), does.equal(2));
        }
View Full Code Here


        }

        public void structuralUpdatesCanBeDone() {
            final DBCollection<Map<String, Object>> collection = context.openCollection("foo2");
            collection.save(newDoc(new ObjectId(), 1));
            collection.update(new Query().field("foo").is(1), new Update().field("list").set(list("1", "2", "3")));
            specify(collection.query(new Query().field("list").is(list("1", "2", "3"))).size(), does.equal(1));
        }
View Full Code Here

            final DBCollection<Map<String, Object>> collection = context.openCollection("foo2");
            for (int a = 0; a < 10; a++) {
                collection.save(newDoc(new ObjectId(), a));
            }

            collection.update(new Query().field("foo").greaterThan(3), new Update().increment(map("foo", 5)));
            specify(collection.query(new Query().field("foo").is(9)).size(), does.equal(2));
        }
View Full Code Here

TOP

Related Classes of mungbean.query.Update

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.