EdgeStatement.create constructor
EdgeStatement.create({})
Create an edge statement joining from and to, with an optional mapping of attributes by
name to value.
You may need to specify opType if you are in an undirected graph.
Implementation
factory EdgeStatement.create({
required String from,
required String to,
EdgeOp opType = EdgeOp.directed,
Map<String, String>? attributes,
}) {
AttrList? attrList;
if (attributes != null) {
attrList = AttrList([AList(attributes)]);
}
return EdgeStatement(
NodeId(from),
EdgeRhs(
opType,
NodeId(to),
),
attrList,
);
}