Discussion:
[orientdb] how to unwind multiple collection
axon musthaq
2018-11-17 15:25:11 UTC
Permalink
my query returns rows of the form:

node | {node1, node2, node3} | {float1, float2, float3}

i would like to unwind the two collections which always have the same
number of elements, so that i will get rows of the form:

node | node1 | float1
node | node2 | float2
node | node3 | float3

i tried to unwind both collections but that will return all permutations of
the elements, so in this case 9 rows.

is there a simple way to achieve this using orientdb?
--
---
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-database+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Luigi Dell'Aquila
2018-11-19 08:51:14 UTC
Permalink
I'm not sure you can do it, just because there is no deterministic way to
do it.
It is not even guaranteed that the second and third collection have the
same number of items, so in general it is not a consistent operation.
Perhaps you can consider to review your domain?

Thanks

Luigi
Post by axon musthaq
node | {node1, node2, node3} | {float1, float2, float3}
i would like to unwind the two collections which always have the same
node | node1 | float1
node | node2 | float2
node | node3 | float3
i tried to unwind both collections but that will return all permutations
of the elements, so in this case 9 rows.
is there a simple way to achieve this using orientdb?
--
---
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
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 orient-database+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...