def has_doc(self, doc_id: str, graph_type: str='instance') -> bool:
    'Check if a certain document exist in a database\n\n        Parameters\n        ----------\n        doc_id: str\n            Id of document to be checked.\n        graph_type : str\n            Graph type, either "instance" or "schema".\n\n        returns\n        -------\n        Bool\n            if the document exist\n        '
    self._validate_graph_type(graph_type)
    self._check_connection()
    all_existing_obj = self.get_all_documents(graph_type=graph_type)
    all_existing_id = list(map((lambda x: x.get('@id')), all_existing_obj))
    return (doc_id in all_existing_id)
Check if a certain document exist in a database

Parameters
----------
doc_id: str
    Id of document to be checked.
graph_type : str
    Graph type, either "instance" or "schema".

returns
-------
Bool
    if the document exist
def has_doc(self, doc_id: str, graph_type: str='instance') -> bool:
    'Check if a certain document exist in a database\n\n        Parameters\n        ----------\n        doc_id: str\n            Id of document to be checked.\n        graph_type : str\n            Graph type, either "instance" or "schema".\n\n        returns\n        -------\n        Bool\n            if the document exist\n        '
    self._validate_graph_type(graph_type)
    self._check_connection()
    all_existing_obj = self.get_all_documents(graph_type=graph_type)
    all_existing_id = list(map((lambda x: x.get('@id')), all_existing_obj))
    return (doc_id in all_existing_id)