Commit Graph

107 Commits

Author SHA1 Message Date
Bernie Hackett
348bd628aa PYTHON-690 - Various fixes to indexing docstrings. 2014-05-01 09:59:09 -07:00
Bernie Hackett
3ebb4b2eb2 Fix Collection.remove docs. 2014-03-19 13:19:07 -07:00
Bernie Hackett
26139557eb parallel_collection_scan -> parallel_scan PYTHON-633
Spec change. Also added better documentation with a
very basic example.
2014-02-13 09:16:53 -08:00
Bernie Hackett
940d73f672 Add parallel_collection_scan helper PYTHON-633
This commit adds a helper for the new parallelCollectionScan
command introduced in MongoDB 2.5.5. The helper returns
"num_cursors" instances of CommandCursor that can be iterated
by one or more threads concurrently to scan the entire collection.

This commit also removes the remaining command cursor
hacks from cursor.Cursor.
2014-02-11 13:04:53 -08:00
Bernie Hackett
cdacc2f4b9 Fix aggregate cursor read preference issues PYTHON-636
The cursor returned by aggregate now knows what server
it was created on, allowing it to return getMore results
when the read preference is not PRIMARY.

This also introduces a simplified cursor class for use
with commands that return a cursor id and perhaps an initial
set of results. None of the methods of cursor.Cursor (other
than batch_size) make sense in this case.
2014-02-10 18:55:50 -08:00
Bernie Hackett
1f6cd4fd7a Bulk API docs and examples PYTHON-630 2014-02-01 19:21:42 -08:00
Bernie Hackett
01f6361929 Fluent API for bulk write operations PYTHON-630 2014-01-21 11:47:09 -08:00
Bernie Hackett
f38e77a78f Fix max_pool_size class signature docs PYTHON-629 2014-01-17 14:38:18 -08:00
Kyle Erf
237754dbef PYTHON-310: Added find() method to gridfs
Allows iteration through arbitrary queries against the files collection using
a new GridOutCursor class.
2014-01-06 14:57:00 -08:00
A. Jesse Jiryu Davis
3757086e02 Raise ConfigurationError if a server's min wire version is > 2, PYTHON-587. 2013-12-14 12:57:09 -05:00
behackett
ce7ce38ffd Basic support for min and maxWireVersion PYTHON-587 2013-11-25 13:44:34 -08:00
A. Jesse Jiryu Davis
e4cf504559 Option to not compile BSON regexes. PYTHON-500
Add a 'compile_re' parameter to Collection.find, Collection.find_one, and
json_util.loads. If it's False, regular expressions are encoded as a new class,
Regex, instead of passed to re.compile(). This allows PyMongo to handle regular
expressions that don't compile in Python but are valid in other contexts like
MongoDB queries.
2013-10-20 17:18:32 -04:00
hawka
193628f9e4 updating docs 2013-08-30 15:51:50 -04:00
behackett
f804c8e16e Release notes and other doc fixes for 2.6. 2013-08-18 09:24:06 -07:00
behackett
4d42258697 Support exhaust cursor flag PYTHON-265 2013-08-05 11:29:11 -07:00
A. Jesse Jiryu Davis
75d0b85645 Add MongoClient.get_default_database(). PYTHON-461 2013-06-27 10:28:01 -07:00
Ross Lawley
cf9dca6970 Documentation clarifications PYTHON-486 / PYTHON-487 2013-03-13 15:11:16 +00:00
behackett
d2a286693e Add HASHED and GEOSPHERE index constants PYTHON-468 2013-02-22 12:43:48 -08:00
behackett
8de9051228 Remove MongoAuthenticationMechanism PYTHON-465
The spec changed - MongoAuthenticationMechanism is
no longer required.
2013-02-12 14:30:11 -08:00
A. Jesse Jiryu Davis
d2b23a535c Update docs for Connection->MongoClient change PYTHON-452 2013-02-10 10:53:35 -05:00
Bernie Hackett
554d1d9131 Add rst for the auth module. 2013-02-09 14:59:06 -08:00
behackett
676aef7a7c Remove TEXT constant PYTHON-456
The "text search" feature is experimental in
MongoDB 2.4 and the index type may change.
2013-01-22 17:08:50 -08:00
behackett
7603b9db79 Support "text" as an index specifier PYTHON-456
This also fixes a few documentation issues around
index types.
2013-01-04 10:44:16 -08:00
Bernie Hackett
034dba7f96 Minor doc fixes for Mongo(ReplicaSet)Client. 2012-11-16 17:25:36 -08:00
behackett
afe49a4002 MongoClient/MongoReplicaSetClient PYTHON-423
This change adds two new top level classes, MongoClient
and MongoReplicaSetClient. They work almost exactly the
same as Connection and ReplicaSetConnection with a few
differences:

1. These connection objects awknowledge write operations by default.
2. The network_timeout parameter is gone, use socketTimeoutMS instead.
3. auto_start_request defaults to False.

Default acknowledged write operation will be the biggest change for
most users. Using MongoClient and MongoReplicaSetClient you no longer
have to pass safe=True to a write method (save, update, insert, remove)
to request an acknowledgement from the server.

Connection and ReplicaSetConnection are now deprecated but retain their
previous behavior. This should not be a backward breaking change.
2012-11-16 13:39:18 -08:00
A. Jesse Jiryu Davis
eeb1ff8fde Implement alive() for Connection and RSC PYTHON-275 2012-11-10 22:32:44 -06:00
behackett
8dd2670182 New write concern API PYTHON-427
This change deprecates get|set|unset_lasterror_options,
replacing them with a write_concern attribute that can be
accessed directly. See the write_concern docstring for
an example of its use.
2012-11-06 14:44:46 -08:00
behackett
594a95740d Fix a few doc issues. 2012-11-05 14:57:32 -08:00
Bernie Hackett
37c1509e02 Validate keys during update replace ops PYTHON-410 2012-10-16 18:49:25 -07:00
A. Jesse Jiryu Davis
1da312ea43 Fix up read-preferences documentation 2012-10-05 18:28:15 -07:00
behackett
dfaadd53e8 Doc updates for PyMongo 2.3 2012-08-16 15:52:14 -07:00
A. Jesse Jiryu Davis
f275b2291a Implement read preferences for distributing reads among replica set members PYTHON-367
Replace the 'mongo' dict with a Member object everywhere in ReplicaSetConnection.
A handful of commands obey read preferences; most are always sent to primary.
Track a 5-sample moving average of each replica set member's ping time.
Connection detects whether it's connected to primary, secondary, or mongos.
2012-07-25 00:05:06 -04:00
Bernie Hackett
60188ad23e Add check_keys to save PYTHON-382 2012-07-22 15:42:29 -07:00
Ross Lawley
a5432ea0f3 Add helper for aggregate command PYTHON-366
Added collection helper method.
Created an aggregation example covering:
 * aggregate
 * map reduce
 * group
2012-07-12 09:43:55 +01:00
behackett
2b5289021f Deprecate cursor manager support PYTHON-323 2012-04-17 22:05:05 -04:00
Ross Lawley
097f13b58e PYTHON-317 Fixed typo in docs 2012-02-10 09:49:15 +00:00
behackett
1bbe1bd121 Minor doc fix. 2012-02-08 16:12:56 -08:00
Ross Lawley
8623d2f260 Updating docs - restoring removed methods. 2012-02-08 16:02:54 -08:00
Ross Lawley
3309c5f785 Deprecated connection.from_uri and connection.paired
Removed methods from docs
2012-02-08 15:58:09 -08:00
Ross Lawley
4a3c594080 Removed depreciated bson aliases
Updated the docs also.  Changed some sphinx syntax that was throwing
warnings.

Refs PYTHON-304
2012-01-17 15:41:30 +00:00
Bernie Hackett
e50844b273 Documentation fixes for read_preference. 2011-12-23 16:17:05 -08:00
behackett
a3a6bf3905 Initial crack at changelog for 2.1. 2011-12-06 11:15:30 -08:00
behackett
d06713c77f Deprecate slave_okay in favor of read_preference.
Read preference now defaults to PRIMARY. This same
change is coming to all the 10gen drivers.
2011-11-01 18:55:20 -07:00
behackett
c145ed051d Improvements to ReplicaSetConnection PYTHON-196
- Support connecting to a replica set with no primary.
- Set read_preference at any driver level including per-query.
- Read preference SECONDARY only uses the primary as a last resort.
- SECONDARY_ONLY will never use the primary.
- During failover reader connections are not interrupted.
- refesh() method to refresh the host list and pools.
2011-10-28 17:01:00 -07:00
Bernie Hackett
375f75adff Initial commit of ReplicaSetConnection PYTHON-196
This is alpha level code and should not be used in
production. Issues that still need attention:

- Auto-authenticate existing sockets in all pools.
- A host of failover issues.
- A lot of error handling.
- Unit tests...
- More documentation and examples.
- Possibly a background thread to maintain the set.
2011-10-02 19:56:00 -07:00
behackett
f421555247 Add documentation and a test for Connection.close 2011-09-29 11:13:27 -07:00
behackett
258f81870e Store UUIDs as BSON binary subtype 4 PYTHON-267
The default binary subtype for UUIDs has changed
to 4. You can use bson.binary.UUIDLegacy to query
on UUIDs previously stored as subtype 3. See the
UUIDLegacy docstring for more details.
2011-09-14 13:12:36 -07:00
behackett
255775239a Add continue_on_error insert option PYTHON-266. 2011-09-09 15:24:02 -07:00
behackett
bff465ab08 Docs for pymongo.uri_parser. 2011-08-05 14:34:10 -07:00
behackett
3603d05ce1 Switch default Binary subtype from 2 to 0. 2011-08-01 15:33:24 -07:00