NebulaGraph Python Client 5.0.0a1
Loading...
Searching...
No Matches
Node Class Reference
+ Inheritance diagram for Node:
+ Collaboration diagram for Node:

Public Member Functions

 __init__ (self, int graph_id, int node_type_id, int node_id, Dict[str, "ValueWrapper"] properties, "ResultGraphSchemas" graph_schemas)
 
str get_graph (self)
 
str get_type (self)
 
int get_node_type_id (self)
 
List[str] get_labels (self)
 
int get_id (self)
 
List[str] get_column_names (self)
 
List["ValueWrapper"] get_values (self)
 
Dict[str, "ValueWrapper"] get_properties (self)
 
NodePrimitive cast_primitive (self)
 
 __eq__ (self, other)
 
 __hash__ (self)
 
 __str__ (self)
 
- Public Member Functions inherited from BaseDataObject
str get_decode_type (self)
 
"BaseDataObject" set_decode_type (self, str decode_type)
 

Public Attributes

 graph_id
 
 graph_name
 
 node_type_id
 
 node_type_name
 
 labels
 
 node_id
 
 properties
 

Additional Inherited Members

- Protected Attributes inherited from BaseDataObject
 _decode_type
 

Detailed Description

Definition at line 75 of file py_data_types.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
int  graph_id,
int  node_type_id,
int  node_id,
Dict[str, "ValueWrapper"]  properties,
"ResultGraphSchemas"  graph_schemas 
)

Reimplemented from BaseDataObject.

Definition at line 76 of file py_data_types.py.

Member Function Documentation

◆ __eq__()

__eq__ (   self,
  other 
)

Definition at line 209 of file py_data_types.py.

◆ __hash__()

__hash__ (   self)

Definition at line 216 of file py_data_types.py.

◆ __str__()

__str__ (   self)

Definition at line 221 of file py_data_types.py.

◆ cast_primitive()

NodePrimitive cast_primitive (   self)
Convert node to a dictionary format with id, type, labels and properties

Returns
-------
    NodePrimitive: A typed dictionary containing node information in format:
        {
            'id': node_id,
            'type': node_type,
            'labels': list of labels,
            'properties': dict of property name -> primitive value
        }

Reimplemented from CompositeDataObject.

Definition at line 184 of file py_data_types.py.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_column_names()

List[str] get_column_names (   self)
Get property names from the node

Returns
-------
    List[str]: the list of property names

Definition at line 151 of file py_data_types.py.

◆ get_graph()

str get_graph (   self)
Get graph

Returns
-------
    str: graph name

Definition at line 101 of file py_data_types.py.

◆ get_id()

int get_id (   self)
Get vid

Returns
-------
    int: node id

Definition at line 141 of file py_data_types.py.

+ Here is the caller graph for this function:

◆ get_labels()

List[str] get_labels (   self)
Get node label list

Returns
-------
    List[str]: list of labels

Definition at line 131 of file py_data_types.py.

◆ get_node_type_id()

int get_node_type_id (   self)
Get node type id

Returns
-------
    int: node type id

Definition at line 121 of file py_data_types.py.

◆ get_properties()

Dict[str, "ValueWrapper"] get_properties (   self)
Get all properties for node

Returns
-------
    Dict[str, ValueWrapper]: property name -> property value

Definition at line 174 of file py_data_types.py.

+ Here is the caller graph for this function:

◆ get_type()

str get_type (   self)
Get node type name

Returns
-------
    str: node type name

Definition at line 111 of file py_data_types.py.

+ Here is the caller graph for this function:

◆ get_values()

List["ValueWrapper"] get_values (   self)
Get all property values

Returns
-------
    List[ValueWrapper]: the List of property values

Definition at line 161 of file py_data_types.py.

Member Data Documentation

◆ graph_id

graph_id

Definition at line 85 of file py_data_types.py.

◆ graph_name

graph_name

Definition at line 86 of file py_data_types.py.

◆ labels

labels

Definition at line 93 of file py_data_types.py.

◆ node_id

node_id

Definition at line 98 of file py_data_types.py.

◆ node_type_id

node_type_id

Definition at line 87 of file py_data_types.py.

◆ node_type_name

node_type_name

Definition at line 88 of file py_data_types.py.

◆ properties

properties

Definition at line 99 of file py_data_types.py.


The documentation for this class was generated from the following file: