$depth < <x> where x is the maximum level of depth you want to reach. $depth is the first context variable that reports the depth level during traversal. select from ( traverse out_HAS from #12:0 while $depth < 2)| @rid | @version | @class | name | in_HAS | out_HAS |
|---|---|---|---|---|---|
| #12:0 | 7 | Case | demo | [1] | [5] |
| #13:0 | 2 | Collection | gmail_with_attachments.pcap | [1] | |
| #13:1 | 2 | Collection | mysql_import_cc.pcap | [1] | |
| #13:2 | 2 | Collection | mysql_import_emails.pcap | [1] | |
| #13:3 | 2 | Collection | telnet_cat_emial_list.pcap | [1] | |
| #13:4 | 2 | Collection | demo_stream | [1] |
select from ( traverse out_HAS from #12:0 while $depth < 2 and $current.name <> 'gmail_with_attachments.pcap')--
---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
| @rid | @version | @class | name | in_HAS | out_HAS |
|---|
| #12:0 | 7 | Case | demo | [1] | [5] |
--
---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/Fvf-4LibdMs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.
--
---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/Fvf-4LibdMs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-database+unsubscribe@googlegroups.com.
I think that Andrey's point is that he is expecting "while" to have semantics like a "while" construct in Java - discontinue execution if the condition is not met.
This result excludes the case where the "while" is not satisfied but continues.
(I'm just trying to help clarify, I don't have any opinion about that expectation) :-)
- Dexter
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.