0
votes

These are few queries which I executed and the results. The fourth one throws error.

LET doc = DOCUMENT("sample/xyz")
RETURN doc.t==null

result: True (as key xyz doesn't exist)


RETURN append(null,[1,2,2],true)

result : [1,2] (unique values appended to empty list)


LET doc = DOCUMENT("sample/xyz")
return append(doc.t,[1,2,2])

result : [1,2,2] ([1,2,2] appended to empty list)


LET doc = DOCUMENT("sample/xyz")
RETURN append(doc.t,[1,2,2],True)

throws error whereas doc.t should evaluate to null and result should be [1,2].

The error that I got is here :

Query: Expecting type Array or Object (while executing) (exception location: /var/lib/jenkins/workspace/ArangoDB_Release/arangod/RestHandler/RestCursorHandler.cpp:131)
1

1 Answers

0
votes

Sorry for getting back to you that late. This used to be an issue with ArangoDB 3.0; It doesn't happen with ArangoDB 3.1 / 3.2

I've added a test for this too, so it won't change in the future again.

In general, please file issues via github issues, not as a stackoverflow question.