Hi Martijn,

it should be easily possible to query all _from and all _to values. I am 
just unsure how exactly you want them returned.
One example would be:

    LET ids = APPEND(
      FOR doc IN e RETURN doc._from, 
      FOR doc IN e RETURN doc._to
    ) 
    RETURN ids

This will return all _from and all _to values in a single array, with 
duplicates.

To make the result array unique, all that is required is to add a call to 
the UNIQUE function:

    LET ids = UNIQUE(APPEND(
      FOR doc IN e RETURN doc._from, 
      FOR doc IN e RETURN doc._to
    ))
    RETURN ids

Hope this helps.

Best regards
Jan

Am Freitag, 16. März 2018 09:36:29 UTC+1 schrieb Martijn Geers:
>
> Hi guys, 
>
> I'm trying to use the ArangoDB Web Interface to query my database. What 
> I'd like to do is create a variable using the LET functionality, which 
> contains a list of all _to and _from elements of an edge collection. 
> It seems impossible to get them in a single neat list, rather I either do 
> something along the lines of 'return {"_to": edge._to, "_from": edge._from} 
> in which case they're still separated entities. 
> Or I do return [edge._to, edge._from] in which case I just get a lot of 2 
> element vectors, rather than a single list of several 10s or 100s of 
> entries. 
> How do I create equivalency for these elements? Hope you guys can help me 
> out. 
>
> Kind regards,
>
> Martijn
>

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" 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.

Reply via email to