Node class abstract
Abstract base class for nodes in the graph database.
A node represents a vertex in the graph structure. All nodes must have a unique identifier (id) and be able to serialize themselves to JSON. Implement this class to create custom node types for your graph database.
Example:
class PersonNode extends Node {
final String name;
final int age;
PersonNode({
required String id,
required this.name,
required this.age,
}) : super(id: id);
@override
Map<String, dynamic> toJson() {
return {
'id': id,
'name': name,
'age': age,
};
}
}
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this node to a JSON representation.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited