| 
									
										
										
										
											2013-04-25 16:26:36 -04:00
										 |  |  | ! Copyright (C) 2009 Sascha Matzke. | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | ! See http://factorcode.org/license.txt for BSD license. | 
					
						
							|  |  |  | USING: assocs help.markup help.syntax kernel quotations ;
 | 
					
						
							|  |  |  | IN: mongodb.driver | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HELP: <mdb-collection> | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  |   { "name" "name of the collection" } | 
					
						
							|  |  |  |   { "collection" "mdb-collection instance" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $examples { $unchecked-example "USING: mongodb.driver ;" "\"mycollection\" <mdb-collection> t >>capped 1000000 >>max" "" } } | 
					
						
							|  |  |  | { $description "Creates a new mdb-collection instance. Use this to create capped/limited collections." } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | HELP: <mdb> | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  |   { "db" "name of the database to use" } | 
					
						
							|  |  |  |   { "host" "host name or IP address" } | 
					
						
							|  |  |  |   { "port" "port number" } | 
					
						
							|  |  |  |   { "mdb" "mdb-db instance" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | { $description "Create a new mdb-db instance and automatically resolves master/slave information in a paired MongoDB setup." } | 
					
						
							|  |  |  | { $examples | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { $unchecked-example "USING: mongodb.driver ;" "\"db\" \"127.0.0.1\" 27017 <mdb>" "" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | HELP: <query> | 
					
						
							|  |  |  | { $values | 
					
						
							|  |  |  |   { "collection" "collection to query" } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "assoc" "query assoc" } | 
					
						
							|  |  |  |   { "mdb-query-msg" "mdb-query-msg instance" } | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | } | 
					
						
							|  |  |  | { $description "Creates a new mdb-query-msg instance. " | 
					
						
							|  |  |  |   "This word must be called from within a with-db scope." | 
					
						
							|  |  |  |   "For more see: " | 
					
						
							|  |  |  |   { $link with-db } } | 
					
						
							|  |  |  | { $examples | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { $unchecked-example "USING: mongodb.driver ;" "\"mycollection\" H{ } <query>" "" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: <update> | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  |   { "collection" "collection to update" } | 
					
						
							|  |  |  |   { "selector" "selector assoc (selects which object(s) to update" } | 
					
						
							|  |  |  |   { "object" "updated object or update instruction" } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "mdb-update-msg" "mdb-update-msg instance" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Creates an update message for the object(s) identified by the given selector." | 
					
						
							|  |  |  |   "MongoDB supports full object updates as well as partial update modifiers such as $set, $inc or $push" | 
					
						
							|  |  |  |   "For more information see: " { $url "http://www.mongodb.org/display/DOCS/Updates" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | HELP: >upsert | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "mdb-update-msg" "a mdb-update-msg" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Marks a mdb-update-msg as upsert operation" | 
					
						
							|  |  |  |   "(inserts object identified by the update selector if it doesn't exist in the collection)" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: PARTIAL? | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $values   | 
					
						
							|  |  |  |   { "value" "partial?" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "key which refers to a partially loaded object" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: asc | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "key" "sort key" } | 
					
						
							|  |  |  |   { "spec" "sort spec" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "indicates that the values of the specified key should be sorted in ascending order" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: count | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "mdb-query-msg" "query" } | 
					
						
							|  |  |  |   { "result" "number of objects in the collection that match the query" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "count objects in a collection" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: create-collection | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-07-10 08:52:20 -04:00
										 |  |  |   { "name/collection" "collection name" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Creates a new collection with the given name." } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: delete | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2010-07-31 18:34:43 -04:00
										 |  |  |   { "mdb-delete-msg" "a delete msg" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "removes objects from the collection (with lasterror check)" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: delete-unsafe | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2010-07-31 18:34:43 -04:00
										 |  |  |   { "mdb-delete-msg" "a delete msg" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "removes objects from the collection (without error check)" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: desc | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "key" "sort key" } | 
					
						
							|  |  |  |   { "spec" "sort spec" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "indicates that the values of the specified key should be sorted in descending order" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: drop-collection | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "name" "a collection" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "removes the collection and all objects in it from the database" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: drop-index | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "collection" "a collection" } | 
					
						
							|  |  |  |   { "name" "an index name" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "drops the specified index from the collection" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: ensure-collection | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "name" "a collection; e.g. mycollection " } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "ensures that the collection exists in the database" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: ensure-index | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "index-spec" "an index specification" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Ensures the existence of the given index. " | 
					
						
							|  |  |  |   "For more information on MongoDB indexes see: " { $url "http://www.mongodb.org/display/DOCS/Indexes" } } | 
					
						
							|  |  |  | { $examples | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { $unchecked-example "USING: mongodb.driver ;" | 
					
						
							|  |  |  |     "\"db\" \"127.0.0.1\" 27017 <mdb>" | 
					
						
							|  |  |  |     "[ \"mycollection\" nameIdx [ \"name\" asc ] keyspec <index-spec> ensure-index ] with-db" "" } | 
					
						
							|  |  |  |   { $unchecked-example  "USING: mongodb.driver ;" | 
					
						
							| 
									
										
										
										
											2009-07-05 07:28:41 -04:00
										 |  |  |     "\"db\" \"127.0.0.1\" 27017 <mdb>" "[ \"mycollection\" nameIdx [ \"name\" asc ] keyspec <index-spec> t >>unique? ensure-index ] with-db" "" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | HELP: explain. | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "mdb-query-msg" "a query message" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Prints the execution plan for the given query" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: find | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "selector" "a mdb-query or mdb-cursor" } | 
					
						
							|  |  |  |   { "mdb-cursor/f" "a cursor (if there are more results) or f" } | 
					
						
							|  |  |  |   { "seq" "a sequences of objects" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "executes the given query" } | 
					
						
							|  |  |  | { $examples | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { $unchecked-example "USING: mongodb.driver ;" | 
					
						
							|  |  |  |     "\"db\" \"127.0.0.1\" 27017 <mdb>" | 
					
						
							|  |  |  |     "[ \"mycollection\" H{ { \"name\" \"Alfred\" } } <query> find ] with-db" "" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: find-one | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb-query-msg" "a query" } | 
					
						
							|  |  |  |   { "result/f" "a single object or f" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Executes the query and returns one object at most" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: hint | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb-query-msg" "a query" } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "index-hint" "a hint to an index" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Annotates the query with a hint to an index. " | 
					
						
							|  |  |  |   "For detailed information see: " { $url "http://www.mongodb.org/display/DOCS/Optimizing+Mongo+Performance#OptimizingMongoPerformance-Hint" } } | 
					
						
							|  |  |  | { $examples | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { $unchecked-example "USING: mongodb.driver ;" | 
					
						
							|  |  |  |     "\"db\" \"127.0.0.1\" 27017 <mdb>" | 
					
						
							|  |  |  |     "[ \"mycollection\" H{ { \"name\" \"Alfred\" } { \"age\" 70 } } <query> H{ { \"name\" 1 } } hint find ] with-db" "" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: lasterror | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  |    | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "error" "error message or f" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Checks if the last operation resulted in an error on the MongoDB side" | 
					
						
							|  |  |  |   "For more information see: " { $url "http://www.mongodb.org/display/DOCS/Mongo+Commands#MongoCommands-LastErrorCommands" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: limit | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb-query-msg" "a query" } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "limit#" "number of objects that should be returned at most" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Limits the number of returned objects to limit#" } | 
					
						
							|  |  |  | { $examples | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { $unchecked-example "USING: mongodb.driver ;" | 
					
						
							|  |  |  |     "\"db\" \"127.0.0.1\" 27017 <mdb>" | 
					
						
							|  |  |  |     "[ \"mycollection\" H{ } <query> 10 limit find ] with-db" "" } } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: load-collection-list | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  |    | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "collection-list" "list of collections in the current database" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Returns a list of all collections that exist in the current database" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: load-index-list | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  |    | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "index-list" "list of indexes" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Returns a list of all indexes that exist in the current database" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: mdb-collection | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $var-description "MongoDB collection" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: mdb-cursor | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $var-description "MongoDB cursor" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: mdb-error | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "msg" "error message" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "error class" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | HELP: r/ | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "token" "a regexp string" } | 
					
						
							|  |  |  |   { "mdbregexp" "a mdbregexp tuple instance" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "creates a new mdbregexp instance" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: save | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  |   { "collection" "a collection" } | 
					
						
							|  |  |  |   { "assoc" "object" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 08:04:25 -04:00
										 |  |  | { $description "Saves the object to the given collection." | 
					
						
							|  |  |  |   " If the object contains a field name \"_id\" this command automatically performs an update (with upsert) instead of a plain save" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: save-unsafe | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "collection" "a collection" } | 
					
						
							|  |  |  |   { "assoc" "object" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "Save the object to the given collection without automatic error check" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: skip | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb-query-msg" "a query message" } | 
					
						
							|  |  |  |   { "skip#" "number of objects to skip" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "annotates a query message with a number of objects to skip when returning the results" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: sort | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb-query-msg" "a query message" } | 
					
						
							|  |  |  |   { "sort-quot" "a quotation with sort specifiers" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "annotates the query message for sort specifiers" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: update | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb-update-msg" "a mdb-update message" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "performs an update" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: update-unsafe | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb-update-msg" "a mdb-update message" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "performs an update without automatic error check" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | HELP: validate. | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "collection" "collection to validate" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "validates the collection" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | HELP: with-db | 
					
						
							|  |  |  | { $values | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  |   { "mdb" "mdb instance" } | 
					
						
							|  |  |  |   { "quot" "quotation to execute with the given mdb instance as context" } | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2009-05-01 12:31:19 -04:00
										 |  |  | { $description "executes a quotation with the given mdb instance in its context" } ;
 | 
					
						
							| 
									
										
										
										
											2009-03-06 16:56:02 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-03-25 13:22:28 -04:00
										 |  |  | 
 |