Hi,
For my research, I am developing a declarative graph query language.
I need to obtain the list of nodes which have outgoing edges of a set of edge types known only at runtime; i.e. I need the tails of all edges having a type in one of {sector_edge_type, level_edge_type} (as an example).
From the documentation, the Tails method appears to return exactly what I need.
I am creating the required "Objects" object, to be passed in as a parameter to Tails, as follows:
===================
public static Objects GetDEXEdgeTypes(List<char> elist) //e.g. (elist contains "sector" and "level")
{
Objects edges = _Session.NewObjects();
foreach (char e in elist)
edges.Add(long.Parse(_Graph.FindType(e.ToString()).ToString()));
return edges;
}
===================
The method above works fine, but when I actually invoke Tails**, passing in the Objects object obtained from GetDEXEdgeTypes, it fails with a ": [SPARKSEE: 12] Invalid object identifier." error.
**The code is:
===========================
Objects tailNodes = DEXManager.Graph.Tails(DEXManager.GetDEXEdgeTypes(labels));
==============================
I had previously populated Objects with *integers* rather than *longs*, but the same error occurred. The documentation appears to infer that longs are needed, hence the cast.
I have looked extensively at the documentation, but have not had any success.
Please could you advise where I am going wrong?
Many thanks,
Petra