(self, sock_info, command, slave_ok=False,
                 read_preference=None,
                 codec_options=None, check=True, allowable_errors=None,
                 read_concern=DEFAULT_READ_CONCERN,
                 write_concern=None,
                 parse_write_concern_error=False,
                 collation=None)
return sock_info.command(
            self.__database.name,
            command,
            slave_ok,
            read_preference or self.read_preference,
            codec_options or self.codec_options,
            check,
            allowable_errors,
            read_concern=read_concern,
            write_concern=write_concern,
            parse_write_concern_error=parse_write_concern_error,
            collation=collation)
Internal command helper.

        :Parameters:
          - `sock_info` - A SocketInfo instance.
          - `command` - The command itself, as a SON instance.
          - `slave_ok`: whether to set the SlaveOkay wire protocol bit.
          - `codec_options` (optional) - An instance of
            :class:`~bson.codec_options.CodecOptions`.
          - `check`: raise OperationFailure if there are errors
          - `allowable_errors`: errors to ignore if `check` is True
          - `read_concern` (optional) - An instance of
            :class:`~pymongo.read_concern.ReadConcern`.
          - `write_concern`: An instance of
            :class:`~pymongo.write_concern.WriteConcern`. This option is only
            valid for MongoDB 3.4 and above.
          - `parse_write_concern_error` (optional): Whether to parse a
            ``writeConcernError`` field in the command response.
          - `collation` (optional) - An instance of
            :class:`~pymongo.collation.Collation`.

        :Returns:

            # todo: don't return address

          (result document, address of server the command was run on)
Internal command helper.
Internal command helper .
def _command(self, sock_info, command, slave_ok=False,
                 read_preference=None,
                 codec_options=None, check=True, allowable_errors=None,
                 read_concern=DEFAULT_READ_CONCERN,
                 write_concern=None,
                 parse_write_concern_error=False,
                 collation=None):
        """Internal command helper.

        :Parameters:
          - `sock_info` - A SocketInfo instance.
          - `command` - The command itself, as a SON instance.
          - `slave_ok`: whether to set the SlaveOkay wire protocol bit.
          - `codec_options` (optional) - An instance of
            :class:`~bson.codec_options.CodecOptions`.
          - `check`: raise OperationFailure if there are errors
          - `allowable_errors`: errors to ignore if `check` is True
          - `read_concern` (optional) - An instance of
            :class:`~pymongo.read_concern.ReadConcern`.
          - `write_concern`: An instance of
            :class:`~pymongo.write_concern.WriteConcern`. This option is only
            valid for MongoDB 3.4 and above.
          - `parse_write_concern_error` (optional): Whether to parse a
            ``writeConcernError`` field in the command response.
          - `collation` (optional) - An instance of
            :class:`~pymongo.collation.Collation`.

        :Returns:

            # todo: don't return address

          (result document, address of server the command was run on)
        """
        return sock_info.command(
            self.__database.name,
            command,
            slave_ok,
            read_preference or self.read_preference,
            codec_options or self.codec_options,
            check,
            allowable_errors,
            read_concern=read_concern,
            write_concern=write_concern,
            parse_write_concern_error=parse_write_concern_error,
            collation=collation)
def _command ( self , sock_info , command , slave_ok = False , read_preference = None , codec_options = None , check = True , allowable_errors = None , read_concern = DEFAULT_READ_CONCERN , write_concern = None , parse_write_concern_error = False , collation = None ) : return sock_info . command ( self . __database . name , command , slave_ok , read_preference or self . read_preference , codec_options or self . codec_options , check , allowable_errors , read_concern = read_concern , write_concern = write_concern , parse_write_concern_error = parse_write_concern_error , collation = collation )