I discovered that I can run multiple Gremlin addVertex/addEdge statements
in Gremlin console, which is shipped with the OrientDb Enterprise 2.1.0.

On Mon, Sep 14, 2015 at 4:17 PM, Jan Plaček <[email protected]> wrote:

> 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 a topic in the
> Google Groups "OrientDB" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/orient-database/VhXzpwYOp00/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
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.

Reply via email to