Hi Mahmood, in OrientDB v 2.1 and UNWIND operator will be available (it will be officially released in RC2, but you can try it now just building from sources, "develop" branch). The syntax is this
SELECT f1, f2, f3 from Foo UNWIND f2 Regards Luigi 2015-04-27 2:58 GMT+02:00 retrography <[email protected]>: > How can I Unnest (like in PostgreSQL) or Unwind (like in Neo4j) a > collection/array in query results. Please note that what I am searching for > is "not" the Expand keyword, which entirely replaces a dataset. Here is the > use case of the query I want to run: > > For table 't': > > f1 | f2 | f3 > ----|-----------|---- > a | [1,2,3,4] | d > b | [5,6] | e > c | [7] | f > > I want to run: > > SELECT f1, UNNEST(f2) AS f2s, f3 > > And get: > > f1 | f2s | f3 > ----|-----|---- > a | 1 | d > a | 2 | d > a | 3 | d > a | 4 | d > b | 5 | e > b | 6 | e > c | 7 | f > > This is the most basic thing one needs to obtain when dealing with > traversing selects, but I can't seem to make it work on OrientDB. Any idea? > > Mahmood > > -- > > --- > 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. > -- --- 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.
