OpenQuizz
Une application de gestion des contenus pédagogiques
_OpMsg Class Reference
Inheritance diagram for _OpMsg:
Collaboration diagram for _OpMsg:

Public Member Functions

def __init__ (self, flags, payload_document)
 
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
 
 payload_document
 

Static Public Attributes

 UNPACK_FROM
 
 OP_CODE
 
 CHECKSUM_PRESENT
 
 MORE_TO_COME
 
 EXHAUST_ALLOWED
 

Detailed Description

A MongoDB OP_MSG response message.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  flags,
  payload_document 
)

Member Function Documentation

◆ command_response()

def command_response (   self)
Unpack a command response.

◆ more_to_come()

def more_to_come (   self)
Is the moreToCome bit set on this response?

◆ raw_command_response()

def raw_command_response (   self)
Return the bytes of the command response.

◆ raw_response()

def raw_response (   self,
  cursor_id = None 
)

◆ unpack()

def unpack (   cls,
  msg 
)
Construct an _OpMsg from raw bytes.

◆ unpack_response()

def unpack_response (   self,
  cursor_id = None,
  codec_options = _UNICODE_REPLACE_CODEC_OPTIONS,
  user_fields = None,
  legacy_response = False 
)
Unpack a OP_MSG command response.

:Parameters:
  - `cursor_id` (optional): Ignored, for compatibility with _OpReply.
  - `codec_options` (optional): an instance of
    :class:`~bson.codec_options.CodecOptions`

Field Documentation

◆ CHECKSUM_PRESENT

CHECKSUM_PRESENT
static

◆ EXHAUST_ALLOWED

EXHAUST_ALLOWED
static

◆ flags

flags

◆ MORE_TO_COME

MORE_TO_COME
static

◆ OP_CODE

OP_CODE
static

◆ payload_document

payload_document

◆ UNPACK_FROM

UNPACK_FROM
static

The documentation for this class was generated from the following file: