Presentation is loading. Please wait.

Presentation is loading. Please wait.

MongoDB - Rockmongo - Overview - Query - Import, export - Execute/Command line.

Similar presentations


Presentation on theme: "MongoDB - Rockmongo - Overview - Query - Import, export - Execute/Command line."— Presentation transcript:

1 MongoDB - Rockmongo - Overview - Query - Import, export - Execute/Command line

2 Rockmongo - Overview PHP (~ phpMyAdmin) http://code.google.com/p/rock- php/wiki/rock_mongo http://code.google.com/p/rock- php/wiki/rock_mongo Basic

3 Rockmongo – Query Query ◦ Multiple (AND, OR) conditions ◦ Not equal conditions Contextual menu Limit: fields, records

4 AND OR REGEX { "organization.$id": ObjectId(“xxx"), "slug": {$regex: "o"} } { "slug": {$regex: "o"} } { $or : [ {"slug": "sos"}, {"slug": "st-goran"} ] } { "slug": {$in: ["sos","st-goran"]} }

5 Rockmongo Query & Update Query & Delete

6 Rockmongo - Execute //Cursor function () { var titles = ''; var blogs = db.Blog.find({slug:{$regex: ‘blog'}}); blogs.forEach( function(x) { titles += x.title}); return titles; } function () { var titles = ''; var blogs = db.Blog.find({slug:{$regex: 'blog'}}); blogs.forEach( function(x) { x.dustin = 12; titles += x.title; db.Blog.save(x); }); return titles; } function () { var titles = ''; var blogs = db.Blog.find({slug:{$regex: 'blog'}}); blogs.forEach( function(x) { x.dustin = getUniqedId(); titles += x.title; db.Blog.save(x); }); return titles; } function getUniqedId() { return new Date().getTime(); }


Download ppt "MongoDB - Rockmongo - Overview - Query - Import, export - Execute/Command line."

Similar presentations


Ads by Google