|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __init__ (self, flags, cursor_id, number_returned, documents) |
| def | raw_response (self, cursor_id=None) |
| def | unpack_response (self, cursor_id=None, codec_options=_UNICODE_REPLACE_CODEC_OPTIONS, user_fields=None, legacy_response=False) |
| def | command_response (self) |
| def | raw_command_response (self) |
| def | more_to_come (self) |
| def | unpack (cls, msg) |
Data Fields | |
| flags | |
| cursor_id | |
| number_returned | |
| documents | |
Static Public Attributes | |
| UNPACK_FROM | |
| OP_CODE | |
A MongoDB OP_REPLY response message.
| def __init__ | ( | self, | |
| flags, | |||
| cursor_id, | |||
| number_returned, | |||
| documents | |||
| ) |
| def command_response | ( | self | ) |
Unpack a command response.
| def more_to_come | ( | self | ) |
Is the moreToCome bit set on this response?
| def raw_command_response | ( | self | ) |
Return the bytes of the command response.
| def raw_response | ( | self, | |
cursor_id = None |
|||
| ) |
Check the response header from the database, without decoding BSON.
Check the response for errors and unpack.
Can raise CursorNotFound, NotMasterError, ExecutionTimeout, or
OperationFailure.
:Parameters:
- `cursor_id` (optional): cursor_id we sent to get this response -
used for raising an informative exception when we get cursor id not
valid at server response.
| def unpack | ( | cls, | |
| msg | |||
| ) |
Construct an _OpReply from raw bytes.
| def unpack_response | ( | self, | |
cursor_id = None, |
|||
codec_options = _UNICODE_REPLACE_CODEC_OPTIONS, |
|||
user_fields = None, |
|||
legacy_response = False |
|||
| ) |
Unpack a response from the database and decode the BSON document(s).
Check the response for errors and unpack, returning a dictionary
containing the response data.
Can raise CursorNotFound, NotMasterError, ExecutionTimeout, or
OperationFailure.
:Parameters:
- `cursor_id` (optional): cursor_id we sent to get this response -
used for raising an informative exception when we get cursor id not
valid at server response
- `codec_options` (optional): an instance of
:class:`~bson.codec_options.CodecOptions`
| cursor_id |
| documents |
| flags |
| number_returned |
|
static |
|
static |