From f3a655824497652faab68bb3f2f925c9960a3aba Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Thu, 19 Nov 2009 15:13:04 +0000 Subject: [PATCH] added Cursor::immortal, removed util git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@291003 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongocursor/immortal.xml | 84 +++++++++++++++++++++ reference/mongo/mongodbref/create.xml | 20 ++++- reference/mongo/mongoutil.xml | 67 ---------------- reference/mongo/mongoutil/toindexstring.xml | 58 -------------- reference/mongo/versions.xml | 1 + 5 files changed, 102 insertions(+), 128 deletions(-) create mode 100644 reference/mongo/mongocursor/immortal.xml delete mode 100644 reference/mongo/mongoutil.xml delete mode 100644 reference/mongo/mongoutil/toindexstring.xml diff --git a/reference/mongo/mongocursor/immortal.xml b/reference/mongo/mongocursor/immortal.xml new file mode 100644 index 0000000000..ce29351ab0 --- /dev/null +++ b/reference/mongo/mongocursor/immortal.xml @@ -0,0 +1,84 @@ + + + + + + MongoCursor::immortal + Sets whether this cursor will timeout + + + + &reftitle.description; + + public MongoCursorMongoCursor::immortal + booleanliveForevertrue + + + After remaining idle for some amount of time, cursor, by default, "die." + This is generally the behavior one wants. The database cleans up a cursor + once all of its results have been sent to the client, but if the client + doesn't request all of the results, the cursor will languish there, taking up + resources. Thus, after a few minutes, the cursor "times out" and the + database assumes the client has gotten everything it needs and cleans up its + the cursor's resources. + + + If, for some reason, you need a cursor to hang around for a long time, you + can prevent the database from cleaning it up by using this method. However, + if you make a cursor immortal, you need to iterate through all of its results + (or at least until Cursor::dead returns &true;) or the + cursor will hang around the database forever, taking up resources. + + + + + &reftitle.parameters; + + + + + liveForever + + + + If the cursor should be immortal. + + + + + + + + + &reftitle.returnvalues; + + Returns this cursor. + + + + + &reftitle.errors; + + Throws MongoCursorException if this cursor has started iterating. + + + + diff --git a/reference/mongo/mongodbref/create.xml b/reference/mongo/mongodbref/create.xml index 4d2a7bf919..10409acafc 100644 --- a/reference/mongo/mongodbref/create.xml +++ b/reference/mongo/mongodbref/create.xml @@ -11,9 +11,13 @@ &reftitle.description; public static arrayMongoDBRef::create - stringns + stringcollection mixedid + stringdatabase + + If no database is given, the current database is used. + @@ -22,11 +26,11 @@ - ns + collection - Database and collection name. + Collection name. @@ -40,6 +44,16 @@ + + + database + + + + Database name. + + + diff --git a/reference/mongo/mongoutil.xml b/reference/mongo/mongoutil.xml deleted file mode 100644 index ca2af45199..0000000000 --- a/reference/mongo/mongoutil.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - The MongoUtil class - MongoUtil - - - - -
- &reftitle.intro; - - Some handy functions used by the other classes. - -
- - -
- &reftitle.classsynopsis; - - - - MongoUtil - - - - - MongoUtil - - - - - Methods - - - - -
- -
- - &reference.mongo.entities.mongoutil; - -
- - diff --git a/reference/mongo/mongoutil/toindexstring.xml b/reference/mongo/mongoutil/toindexstring.xml deleted file mode 100644 index cc1a8f482f..0000000000 --- a/reference/mongo/mongoutil/toindexstring.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - MongoUtil::toIndexString - Converts a field or array of fields into an underscore-separated string - - - &reftitle.description; - - public static stringMongoUtil::toIndexString - string|arraykeys - - - - &reftitle.parameters; - - - - - keys - - - - Field(s) to convert. - - - - - - - - &reftitle.returnvalues; - - Returns the index name. - - - - diff --git a/reference/mongo/versions.xml b/reference/mongo/versions.xml index 52ea8d8e09..11dd760f91 100644 --- a/reference/mongo/versions.xml +++ b/reference/mongo/versions.xml @@ -81,6 +81,7 @@ +