(self, options, collation)
Sends a create command with the given options.
Sends a create command with the given options.
Sends a create command with the given options .
def __create(self, options, collation):
        """Sends a create command with the given options.
        """
        cmd = SON([("create", self.__name)])
        if options:
            if "size" in options:
                options["size"] = float(options["size"])
            cmd.update(options)
        with self._socket_for_writes() as sock_info:
            self._command(
                sock_info, cmd, read_preference=ReadPreference.PRIMARY,
                write_concern=self.write_concern,
                parse_write_concern_error=True,
                collation=collation)
def __create ( self , options , collation ) : cmd = SON ( [ ( "create" , self . __name ) ] ) if options : if "size" in options : options [ "size" ] = float ( options [ "size" ] ) cmd . update ( options ) with self . _socket_for_writes ( ) as sock_info : self . _command ( sock_info , cmd , read_preference = ReadPreference . PRIMARY , write_concern = self . write_concern , parse_write_concern_error = True , collation = collation )