I think you actually want to run a script which uses Gremlin API, afaik
it's not possible with Studio.
The Studio does not work as (groovy) script interpreter, it only takes the
input and tries to convert that input into a Pipe and than execute that
Pipe on a graph.
However the pipes are very powerful - you can execute basically any kind of
script logic in the pipe's side effect, so for example you can do this:
g.addVector("class:Test").sideEffect{g.addVector("class:Test")}
It will add two verticies of type Test, however it's not very readable.
You should do some reading about what Gremlin actually is and how it works.
The important is a concept of Pipe.
The Gremlin query itself is just a representation of a Pipe written in
sripting language (Groovy).
That representation might look totally alien to you, but it's because of
some fancy features the Groovy languages offers, like optional parenthesis,
closures, metaprogramming and so on.
Dne pondělí 14. září 2015 17:23:23 UTC+2 Valery T napsal(a):
>
> I would like to run them from a console or Studio, not from Java code.
>
> On Monday, September 14, 2015 at 11:09:25 AM UTC-4, Jan Plaček wrote:
>>
>> It' about creating a pipe or compiling a query/statement into a pipe and
>> passing graph instance to that pipe.
>> You can also run scripts containing queries via interpreter.
>> Detailed info here:
>>
>> https://github.com/tinkerpop/gremlin/wiki/Using-Gremlin-through-Java
>>
>> Dne pondělí 14. září 2015 16:53:36 UTC+2 Valery T napsal(a):
>>>
>>> I have multiple Gremlin addVertex/addEdge statements.
>>> How can I run them in OrientDb?
>>>
>>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.