Skip to content

Commit

Permalink
MongoSample described
Browse files Browse the repository at this point in the history
  • Loading branch information
gerald-lindsly committed Feb 9, 2012
1 parent a41c0da commit 506d6d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions MongoSample.m
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.