NebulaGraph
init
- host (str): The host address of the NebulaGraph service.
- username (str): The username for authentication.
- password (str): The password for authentication.
- space (str): The graph space to use. If it doesn’t exist, a new one will be created.
- port (int, optional): The port number for the connection. (default: :obj:
9669
) - timeout (int, optional): The connection timeout in milliseconds. (default: :obj:
10000
)
_init_connection_pool
_get_session
get_client
query
- query (str): The Cypher-like query to be executed.
get_relationship_types
add_graph_elements
- graph_elements (List[GraphElement]): A list of graph elements containing nodes and relationships.
ensure_edge_type_exists
- edge_type (str): The name of the edge type to be created.
- time_label (str, optional): A specific timestamp to set as the default value for the time label property. If not provided, no timestamp will be added. (default: :obj:
None
)
ensure_tag_exists
- tag_name (str): The name of the tag to be created.
- time_label (str, optional): A specific timestamp to set as the default value for the time label property. If not provided, no timestamp will be added. (default: :obj:
None
)
add_node
- node_id (str): The ID of the node.
- tag_name (str): The tag name of the node.
- time_label (str, optional): A specific timestamp to set for the node’s time label property. If not provided, no timestamp will be added. (default: :obj:
None
)
_extract_nodes
- graph_elements (List[Any]): A list of graph elements containing nodes.
_extract_relationships
- graph_elements (List[Any]): A list of graph elements containing relationships.
refresh_schema
get_structured_schema
get_schema
get_indexes
add_triplet
- subj (str): The identifier for the subject entity.
- obj (str): The identifier for the object entity.
- rel (str): The relationship between the subject and object.
- time_label (str, optional): A specific timestamp to set for the time label property of the relationship. If not provided, no timestamp will be added. (default: :obj:
None
)
delete_triplet
- subj (str): The identifier for the subject entity.
- obj (str): The identifier for the object entity.
- rel (str): The relationship between the subject and object.
delete_entity
- entity_id (str): The identifier of the entity to be deleted.
_check_edges
- entity_id (str): The identifier of the entity.
True
if the entity has edges, :obj:False
otherwise.
get_node_properties
get_relationship_properties
_validate_time_label
- time_label (str): The time label string to validate. Should be in format ‘YYYY-MM-DDThh:mm:ss’.