سؤال

Is there an easy way to query a cluster for all vertices that have no incoming edges?

هل كانت مفيدة؟

المحلول

This is more complete because also covers the case the collection exists but it's empty:

select from the_cluster where in().size() = 0

نصائح أخرى

The following SQL seems to work (as edges are stored as fields in and out on the vertices):

select from the_cluster where in is null

Should it be this?

select from the_cluster where in_edgename is null

I know it's an old question but figured for anyone else who was wondering the same thing.

You can do something like this: for a vertex of a class say Vtex and the Edge of class say Edg

select from Vtex where in('Edg').size() =0

This will return all the vertices of Vtex class which have no incoming edge of type Edg.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top