mysql - ArangoDB custom sort order -
i sort field in specific order, lets 2,4,1,5,3.
in mysql use order field(id,2,4,1,5,3).
is there equivalent arangodb?
i think should possible use position aql function, can return position of element inside array
for in [ 1, 2, 3, 4, 5 ] /* iterate on */ sort position([ 2, 4, 1, 5, 3 ], i, true) /* order returned */ return this return:
[ 2, 4, 1, 5, 3 ] update: original answer included contains aql function, however, should position!
Comments
Post a Comment