|
OpenQuizz
Une application de gestion des contenus pédagogiques
|
Functions | |
| def | command (sock_info, dbname, spec, slave_ok, is_mongos, read_preference, codec_options, session, client, check=True, allowable_errors=None, address=None, check_keys=False, listeners=None, max_bson_size=None, read_concern=None, parse_write_concern_error=False, collation=None, compression_ctx=None, use_op_msg=False, unacknowledged=False, user_fields=None, exhaust_allowed=False) |
| def | receive_message (sock_info, request_id, max_message_size=MAX_MESSAGE_SIZE) |
| def | wait_for_read (sock_info, deadline) |
| def pymongo.network.command | ( | sock_info, | |
| dbname, | |||
| spec, | |||
| slave_ok, | |||
| is_mongos, | |||
| read_preference, | |||
| codec_options, | |||
| session, | |||
| client, | |||
check = True, |
|||
allowable_errors = None, |
|||
address = None, |
|||
check_keys = False, |
|||
listeners = None, |
|||
max_bson_size = None, |
|||
read_concern = None, |
|||
parse_write_concern_error = False, |
|||
collation = None, |
|||
compression_ctx = None, |
|||
use_op_msg = False, |
|||
unacknowledged = False, |
|||
user_fields = None, |
|||
exhaust_allowed = False |
|||
| ) |
Execute a command over the socket, or raise socket.error.
:Parameters:
- `sock`: a raw socket instance
- `dbname`: name of the database on which to run the command
- `spec`: a command document as an ordered dict type, eg SON.
- `slave_ok`: whether to set the SlaveOkay wire protocol bit
- `is_mongos`: are we connected to a mongos?
- `read_preference`: a read preference
- `codec_options`: a CodecOptions instance
- `session`: optional ClientSession instance.
- `client`: optional MongoClient instance for updating $clusterTime.
- `check`: raise OperationFailure if there are errors
- `allowable_errors`: errors to ignore if `check` is True
- `address`: the (host, port) of `sock`
- `check_keys`: if True, check `spec` for invalid keys
- `listeners`: An instance of :class:`~pymongo.monitoring.EventListeners`
- `max_bson_size`: The maximum encoded bson size for this server
- `read_concern`: The read concern for this command.
- `parse_write_concern_error`: Whether to parse the ``writeConcernError``
field in the command response.
- `collation`: The collation for this command.
- `compression_ctx`: optional compression Context.
- `use_op_msg`: True if we should use OP_MSG.
- `unacknowledged`: True if this is an unacknowledged command.
- `user_fields` (optional): Response fields that should be decoded
using the TypeDecoders from codec_options, passed to
bson._decode_all_selective.
- `exhaust_allowed`: True if we should enable OP_MSG exhaustAllowed.
| def pymongo.network.receive_message | ( | sock_info, | |
| request_id, | |||
max_message_size = MAX_MESSAGE_SIZE |
|||
| ) |
Receive a raw BSON message or raise socket.error.
| def pymongo.network.wait_for_read | ( | sock_info, | |
| deadline | |||
| ) |
Block until at least one byte is read, or a timeout, or a cancel.