(self)
return options
Get the options set on this collection.

        Returns a dictionary of options and their values - see
        :meth:`~pymongo.database.Database.create_collection` for more
        information on the possible options. Returns an empty
        dictionary if the collection has not been created yet.
Get the options set on this collection.
Get the options set on this collection .
def options(self):
        """Get the options set on this collection.

        Returns a dictionary of options and their values - see
        :meth:`~pymongo.database.Database.create_collection` for more
        information on the possible options. Returns an empty
        dictionary if the collection has not been created yet.
        """
        with self._socket_for_primary_reads() as (sock_info, slave_ok):
            if sock_info.max_wire_version > 2:
                criteria = {"name": self.__name}
            else:
                criteria = {"name": self.__full_name}
            cursor = self.__database._list_collections(sock_info,
                                                       slave_ok,
                                                       criteria)

        result = None
        for doc in cursor:
            result = doc
            break

        if not result:
            return {}

        options = result.get("options", {})
        if "create" in options:
            del options["create"]

        return options
def options ( self ) : with self . _socket_for_primary_reads ( ) as ( sock_info , slave_ok ) : if sock_info . max_wire_version > 2 : criteria = { "name" : self . __name } else : criteria = { "name" : self . __full_name } cursor = self . __database . _list_collections ( sock_info , slave_ok , criteria ) result = None for doc in cursor : result = doc break if not result : return { } options = result . get ( "options" , { } ) if "create" in options : del options [ "create" ] return options