Is it possible to do something like this?
FOR result IN (
/* actual query goes here */
)
COLLECT a = result.object INTO g LIMIT 100
RETURN {"a": a, "g": g}
with your example query, that would be:
FOR result IN (
FOR p IN TRAVERSAL(vertices, edges, "vertices/123456", "outbound", {
"paths": true,
"strategy": "depthFirst"
})
FILTER p.path.edges[0].`$label` == "follows" &&
LENGTH(p.path.edges) == 2
LET object = FIRST((FOR object in NEIGHBORS(vertices, edges,
p.vertex._id, "outbound", [{'$label': 'object'}]) RETURN object.vertex))
LET target = FIRST((FOR target in NEIGHBORS(vertices, edges,
p.vertex._id, "outbound", [{'$label': 'target'}]) RETURN target.vertex))
LET actor = FIRST((FOR actor in NEIGHBORS(vertices, edges,
p.vertex._id, "outbound", [{'$label': 'actor'}]) RETURN actor.vertex))
RETURN {"activity": p.vertex, "object": object, "target": target,
"actor": actor}
)
COLLECT a = result.object into g
LIMIT 100
RETURN {"a": a, "g": g}
> --
> 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
arangodb+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
eMail:
j.ste...@triagens.de
Telefon:
+49-221-2722999-37
Fax:
+49-221-2722999-88
triagens GmbH
Br�sseler Stra�e 89-93
50672 K�ln
Sitz der Gesellschaft: K�ln
Registergericht K�ln; HRB 53597
Gesch�ftsf�hrung:
Dr. Frank Celler
Martin Sch�nert
Claudius Weinberger
Diese e-Mail enth�lt vertrauliche und/oder rechtlich gesch�tzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
e-Mail irrt�mlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese e-Mail. Wir haben alle
verkehrs�blichen Ma�nahmen unternommen, um das Risiko der Verbreitung
virenbefallener Software oder e-Mails zu minimieren, dennoch raten wir
Ihnen, Ihre eigenen Virenkontrollen auf alle Anh�nge an dieser e-Mail
durchzuf�hren. Wir schlie�en au�er f�r den Fall von Vorsatz oder grober
Fahrl�ssigkeit die Haftung f�r jeglichen Verlust oder Sch�den durch
virenbefallene Software oder e-Mails aus.
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. We
have taken precautions to minimize the risk of transmitting software
viruses but nevertheless advise you to carry out your own virus checks
on any attachment of this message. We accept no liability for loss or
damage caused by software.