I am coming close to detecting the second case only:
select $path from (traverse out("access") from #12:17) where $depth = 2 and
@rid = #13:8
This gives me (#12:17).out[0](#15:0).out[0](#13:8) which is correct
but,
select traversedEdge(0) from (traverse oute("access"), out("access") from
#12:17)
where $depth = 2 and @rid = #13:8
This returns no results, and I can't tell why. (I also don't know if I need
the oute() in there, some traversedEdge() testing I did required it)
On Monday, June 8, 2015 at 4:47:52 PM UTC-6, TheBeefiest wrote:
>
> Hello, I have a data structure such as:
> (vertex) [edge]
>
> (user) -> [access] -> (target)
> and
> (user) -> [access] -> (group) -> [access] -> (target)
>
> I want to retreive the [access].@rid closest to the user (farthest left in
> the diagram) knowing the (user).@rid and (target).@rid
>
>
> I thought I could create this query by trial and error and looking at the
> results, so I start with
> select from access where in = #13:8 and out = #12:17
> This finds the first case only
>
> So If i query
> select expand(in.out(access)) from access where out = #12:17
> I can see that the result is the (target) I am trying to link to at #13:8
>
> So my instinct is to try
> select from access where out = #12:17 and in.out(access).@rid = #13:8
>
>
> What is the fundamental thing I am misunderstanding? Can you not do in.out
> in a where clause? I feel like the manual has not really taught me how to
> write such a query with traverse or LET or otherwise.
>
> Is there any other resources which walks through creating complex queries?
>
> Thanks for your time.
>
>
>
>
>
>
--
---
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/d/optout.