Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FOR n in 0..100000
- INSERT {_key: TO_STRING(n), val: n, modulo: n%2} INTO vertex
- FILTER n > 0
- INSERT {_from: CONCAT("vertex/", FLOOR((n-1)/2)), _to: NEW._id} INTO edge
- WITH vertex
- FOR v,e,p IN 0..5 OUTBOUND "vertex/0" edge
- RETURN TO_STRING(p.vertices[*].val)
- [
- "[0]",
- "[0,1]",
- "[0,1,3]",
- "[0,1,3,7]",
- "[0,1,3,7,15]",
- "[0,1,3,7,15,31]",
- "[0,1,3,7,15,32]",
- "[0,1,3,7,16]",
- "[0,1,3,7,16,33]",
- "[0,1,3,7,16,34]",
- "[0,1,3,8]",
- "[0,1,3,8,17]",
- "[0,1,3,8,17,35]",
- "[0,1,3,8,17,36]",
- "[0,1,3,8,18]",
- "[0,1,3,8,18,37]",
- "[0,1,3,8,18,38]",
- "[0,1,4]",
- ...
- WITH vertex
- FOR v,e,p IN 0..5 OUTBOUND "vertex/0" edge
- PRUNE v.hide == 1 AND v.stop == true
- RETURN TO_STRING(p.vertices[*].val)
- [
- "[0]",
- "[0,1]",
- "[0,1,3]",
- "[0,1,3,7]", <-- stop: true, hide: 1
- "[0,1,3,8]",
- "[0,1,3,8,17]", <-- stop: true, hide: 1
- "[0,1,3,8,18]",
- "[0,1,3,8,18,37]",
- "[0,1,3,8,18,38]",
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement