Permalink
Browse files

MongoSample described

  • Loading branch information...
1 parent a41c0da commit 506d6d00b15b54891704b32d7cce971a57b58582 @gerald-lindsly committed Feb 9, 2012
Showing with 12 additions and 0 deletions.
  1. +6 −0 MongoSample.m
  2. +6 −0 README.md
View
6 MongoSample.m
@@ -15,6 +15,12 @@
% MongoSample.m
%
% A sample Matlab script
+%
+% First, we add 3 documents to the collection 'mongoquest.Spells'
+% Each of these documents represents a spell with a name and a level.
+% 2nd, we do a normal query/find loop to display the names of the level 1 spells.
+% 3rd, we update each document to include a flavor field.
+% and lastly, we run another query loop to display both names and flavors of the level 1 spells.
MongoStart;
m = Mongo();
View
6 README.md
@@ -88,3 +88,9 @@ mongo.list(); to list the names of the values stored.
If you find these functions handy and useful, you may want to index 'Matlab.vars' by name:
mongo.indexCreate('Matlab.vars', 'name')
+There is a sample Matlab script which you can run with:
+
+`MongoSample`
+
+This simple example demonstrates the most common operations of inserting, updating and
+also the 'usual' query / find loop.

0 comments on commit 506d6d0

Please sign in to comment.