@@ -396,11 +396,11 @@ def query_extended(self, q: str, params = None, flatten = False, fields_to_exclu
396396 neo4j_properties = dict (item .items ()) # EXAMPLE: {'gender': 'M', 'age': 99}
397397
398398 if isinstance (item , neo4j .graph .Node ):
399- neo4j_properties ["internal_id" ] = item .id # Example: 227
399+ neo4j_properties ["internal_id" ] = item .id # Example: 227
400400 neo4j_properties ["neo4j_labels" ] = list (item .labels ) # Example: ['person', 'client']
401401
402402 elif isinstance (item , neo4j .graph .Relationship ):
403- neo4j_properties ["internal_id" ] = item .id # Example: 227
403+ neo4j_properties ["internal_id" ] = item .id # Example: 227
404404 neo4j_properties ["neo4j_start_node" ] = item .start_node # A neo4j.graph.Node object with "id", "labels" and "properties"
405405 neo4j_properties ["neo4j_end_node" ] = item .end_node # A neo4j.graph.Node object with "id", "labels" and "properties"
406406 # Example: <Node id=118 labels=frozenset({'car'}) properties={'color': 'white'}>
@@ -560,11 +560,12 @@ def get_record_by_primary_key(self, labels: str, primary_key_name: str, primary_
560560 def exists_by_key (self , labels : str , key_name : str , key_value ) -> bool :
561561 """
562562 Return True if a node with the given labels and key_name/key_value exists, or False otherwise
563-
563+ TODO: test for multiple labels
564564 :param labels:
565565 :param key_name:
566566 :param key_value:
567- :return:
567+ :return: True if a node with the given labels and key_name/key_value exists,
568+ or False otherwise
568569 """
569570 record = self .get_record_by_primary_key (labels , key_name , key_value )
570571
@@ -575,12 +576,12 @@ def exists_by_key(self, labels: str, key_name: str, key_value) -> bool:
575576
576577
577578
578- def exists_by_internal_id (self , internal_id ) -> bool : # TODO: test
579+ def exists_by_internal_id (self , internal_id ) -> bool :
579580 """
580581 Return True if a node with the given internal Neo4j exists, or False otherwise
581582
582- :param internal_id:
583- :return: True if a node with the given internal Neo4j exists, or False otherwise
583+ :param internal_id: An integer with a node's internal database ID
584+ :return: True if a node with the given internal Neo4j exists, or False otherwise
584585 """
585586 q = f'''
586587 MATCH (n)
0 commit comments