Hi guys,
dunno why it's not clear. WHILE condition is exactly like in Java: while
the condition is TRUE the traversing continues. As soon as the condition is
FALSE traverse stops.

Your result seems correct. The first query:

select from ( traverse out_HAS from #12:0 while $depth < 2)

Returned
 @rid @version @class name in_HAS out_HAS
#12:0<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/12:0>7Casedemo[1][5]
#13:0<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:0>2Collectiongmail_with_attachments.pcap[1]
#13:1<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:1>2Collectionmysql_import_cc.pcap[1]
#13:2<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:2>2Collectionmysql_import_emails.pcap[1]
#13:3<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:3>2Collectiontelnet_cat_emial_list.pcap[1]
#13:4<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:4>2Collectiondemo_stream
And this query:
select from ( traverse out_HAS from #12:0 while $depth < 2 and
name<http://current.name/> <>
'gmail_with_attachments.pcap')

Returned:
 @rid @version @class name in_HAS out_HAS
#12:0<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/12:0>7Casedemo[1][5]
#13:1<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:1>2
Collection mysql_import_cc.pcap [1]
#13:2<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:2>2Collectionmysql_import_emails.pcap[1]
#13:3<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:3>
2 Collection telnet_cat_emial_list.pcap [1]
#13:4<http://localhost:2480/studio/index.html#/database/ePersona/browse/edit/13:4>2Collectiondemo_stream
And this is the expected result: like the first query but you've added the
condition name <http://current.name/> <> 'gmail_with_attachments.pcap' so
the record #13:0 is not part of result set and the traversing under that
record is forbidden.

Lvc@

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to