Skip to content
Browse files

minor: docs

  • Loading branch information...
1 parent 22bb3aa commit ec4efcbf9f7df7dc62985c85114de69beaa191f3 @banker banker committed Aug 1, 2011
Showing with 8 additions and 4 deletions.
  1. +1 −0 HISTORY.md
  2. +1 −1 docs/source/sphinx/source/building.rst
  3. +1 −1 docs/source/sphinx/source/tutorial.rst
  4. +5 −2 src/mongo.h
View
1 HISTORY.md
@@ -105,6 +105,7 @@ Changes:
* Added mongo_set_op_timeout for setting socket timeout. To take advantage of this, you must
compile with --use-platform=LINUX. The compiles with platform/linux/net.h instead of the
top-level net.h.
+* Fixed tailable cursors.
* Fixed a few memory leaks.
## 0.3
View
2 docs/source/sphinx/source/building.rst
@@ -6,7 +6,7 @@ a work in progress.* For example, to build version 0.3, run:
.. code-block:: bash
- git checkout v0.3
+ git checkout v0.4
Then follow the build steps below.
View
2 docs/source/sphinx/source/tutorial.rst
@@ -258,7 +258,7 @@ whose age is 24:
while( mongo_cursor_next( cursor ) == MONGO_OK ) {
bson_iterator iterator[1];
- if ( bson_find( iterator, &cursor->current, "name" )) {
+ if ( bson_find( iterator, mongo_cursor_bson( cursor ), "name" )) {
printf( "name: %s\n", bson_iterator_string( it ) );
}
}
View
7 src/mongo.h
@@ -347,7 +347,9 @@ mongo_cursor *mongo_find( mongo *conn, const char *ns, bson *query,
void mongo_cursor_init( mongo_cursor *cursor, mongo *conn, const char *ns );
/**
- * Set the bson object specifying this cursor's query spec.
+ * Set the bson object specifying this cursor's query spec. If
+ * your query is the empty bson object "{}", then you need not
+ * set this value.
*
* @param cursor
* @param query a bson object representing the query spec. This may
@@ -358,7 +360,8 @@ void mongo_cursor_init( mongo_cursor *cursor, mongo *conn, const char *ns );
void mongo_cursor_set_query( mongo_cursor *cursor, bson *query );
/**
- * Set the fields to return for this cursor.
+ * Set the fields to return for this cursor. If you want to return
+ * all fields, you need not set this value.
*
* @param cursor
* @param fields a bson object representing the fields to return.

0 comments on commit ec4efcb

Please sign in to comment.
Something went wrong with that request. Please try again.