Hi,

Do:

        t=new Table();v = g.v(2);v.outE.inV.as('node')[0..5].table(t) >> -1; t;

Read the first trouble shooting for the reason: 
https://github.com/tinkerpop/gremlin/wiki/Troubleshooting

        v.outE.inV.as('node')[0..5].table(t) returns an iterator.
        v.outE.inV.as('node')[0..5].table(t) >> -1 "while(hasNext())"s the 
iterator.

The Gremlin console will automagically iterate an iterator/iterable. In "code 
mode", you need to iterate it yourself. >> -1 does the trick.

Enjoy,
Marko.

http://markorodriguez.com

On Jul 15, 2011, at 8:05 PM, Boris Kizelshteyn wrote:

> this works:
> 
>   - gremlin> t=new Table();v = g.v(2);v.outE.inV.as('node')[0..5].table(t);
>   - ==> v[95]
>   - ==> v[94]
>   - ==> v[93]
>   - ==> v[92]
>   - ==> v[91]
>   - ==> v[90]
>   - gremlin> t
>   - ==> [node:v[95]]
>   - ==> [node:v[94]]
>   - ==> [node:v[93]]
>   - ==> [node:v[92]]
>   - ==> [node:v[91]]
>   - ==> [node:v[90]]
> 
> While this gives no results:
> 
> t=new Table();v = g.v(2);v.outE.inV.as('node')[0..5].table(t); t;
> 
> Why?
> 
> Many thanks!
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to