i'm wondering if it's possible use sub-selection exclusion query in orient db (v2.0). or if it's necessary export separate queries , process in java/php/etc.
for instance, have following graph hogwarts.
vertices people, houses, classes
edges is_at (subclasses is_student, is_faculty), was_at (alumni), is_taking, is_teaching, belongs_to
how find alumni aren't faculty? possible single query or using let somehow?
how find faculty teaching course on, say, time travel, have no students belong house gryffindor?
thanks, lindsay
the .size() operator should work: http://orientdb.com/docs/2.0/orientdb.wiki/sql-methods.html#size
select people out('is_faculty').size() = 0
use out('...') or in('...') based on graph.
how find faculty teaching course on, say, time travel, have no students belong house gryffindor?
i don't have information on graph , classes, like:
select classes classname='time travel' , in('is_teaching')[id=yourid] , in('is_taking').out('belongs_to')[name='gryffindor'].size() = 0
again, use in() or out() accordingly graph.
Comments
Post a Comment