Hello ArangoDB Users,

I am new to ArangoDB and we are exploring Graph traversal capabilities for 
our use case.
I was trying to use PRUNE operator to stop the traversal of Graph. PRUNE 
operator tries to use the condition using custom variable defined in the 
AQL;

When I run the AQL, I got the error "AQL: Syntax error, unexpected 
identifier near PRUNE (!IS_NULL(edge)....'

My intention is to stop the traversal if the condition is met. Please let 
me know if this is possible to achieve in ArangoDB AQL. Kindly suggest me 
if there are alternatives to achieve the similar functionality. Thank you

AQL Query is as below:

FOR i IN vertex
    FILTER i._id == "some input"
    FOR vertex,edge, path IN 1..2 OUTBOUND i graph_collection
        LET c = (
                    SORT vertex.OPTION[*].CREATE_DATE DESC
                    RETURN {
                        relDate: (CHAR_LENGTH(vertex.OPTION[*].CREATE_DATE) 
== 0 ? '1900-01-01 00:00:00' : vertex.OPTION[*].CREATE_DATE)
                  }
                )
        LET rel=DATE_FORMAT(c[0].relDate,'%yyyy-%mm-%dd %hh:%ii:%ss')
        LET cin = DATE_FORMAT(edge.INPUT_DATE,'%yyyy-%mm-%dd %hh:%ii:%ss')
        LET cout = DATE_FORMAT(edge.OUTPUT_DATE,'%yyyy-%mm-%dd %hh:%ii:%ss')
        PRUNE (!IS_NULL(edge) AND cin > rel AND cout <= rel)
        RETURN {
                key:vertex.OBJ_NUMBER,
                dt: rel
            }

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/arangodb/fe3f4390-2aad-485d-a461-efb5a40da2c7n%40googlegroups.com.

Reply via email to