Hi Simon,

You can take a look at the execute() method of

https://github.com/orientechnologies/orientdb/blob/develop/graphdb/src/main/java/com/orientechnologies/orient/graph/sql/OCommandExecutorSQLMoveVertex.java

Thanks

Luigi


2016-04-20 17:53 GMT+02:00 'Simon White' via OrientDB <
[email protected]>:

> Oh sorry - I *did* miss that!! :)
>
> But look at the URI I posted... it says 2.1, surely this page should not
> appear in 2.1 if it is a 2.2 feature.
>
>
> Anyway... any chance you could help me write the commands to manually
> update the edges?
>
> from
> A ----> friend  ----> B
>
> to
> A ----> friend  ----> C
>
> something like....
> 1. Update B remove in friend
> 2. Update friend set out C
> 3. Update C set in friend
>
>
>
>
> On Wednesday, April 20, 2016 at 4:44:09 PM UTC+1, Luigi Dell'Aquila wrote:
>>
>> Hi Simon,
>>
>> I think you missed line 7 in the docs ;-)
>>
>> "This command was introduced in version 2.2."
>>
>> Thanks
>>
>> Luigi
>>
>>
>> 2016-04-20 17:42 GMT+02:00 'Simon White' via OrientDB <
>> [email protected]>:
>>
>>>
>>> So this documentation is completely wrong?!
>>>
>>> http://orientdb.com/docs/2.1/SQL-Update-Edge.html
>>>
>>>
>>>
>>>
>>>
>>> On Wednesday, April 20, 2016 at 4:33:24 PM UTC+1, Ivan Mainetti wrote:
>>>>
>>>> Yes you're right, that feature will be in 2.2
>>>>
>>>>
>>>>
>>>> Il giorno mercoledì 20 aprile 2016 17:23:07 UTC+2, Simon White ha
>>>> scritto:
>>>>>
>>>>> As far as I can tell this *does not maintain graph consistency* i.e.
>>>>> automatically remove the out edge on the old vertex and set it on the new 
>>>>> -
>>>>> it simply updates the edge so I would have to manage the edges myself. The
>>>>> documentation suggests that update edge would do this for me?
>>>>>
>>>>> On Wednesday, April 20, 2016 at 4:16:43 PM UTC+1, Ivan Mainetti wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> use this:
>>>>>>
>>>>>> UPDATE 50:12 SET out=14:10
>>>>>>
>>>>>>
>>>>>>
>>>>>> Il giorno mercoledì 20 aprile 2016 17:09:05 UTC+2, Simon White ha
>>>>>> scritto:
>>>>>>>
>>>>>>> I am probably being stupid but I am trying to run the sql UPDATE
>>>>>>> EDGE command (from the docs
>>>>>>> http://orientdb.com/docs/2.1/SQL-Update-Edge.html)
>>>>>>>
>>>>>>> But I can't get it to run....
>>>>>>>
>>>>>>> UPDATE EDGE Friend SET out = (SELECT FROM #14:10) WHERE @rid = '#50:12'
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> com.orientechnologies.orient.core.sql.OCommandSQLParsingException:
>>>>>>> Error on parsing command at position #0: Error parsing query: UPDATE 
>>>>>>> EDGE Friend
>>>>>>> set out = #14:10 Encountered " <EDGE> "EDGE "" at line 1, column 8. Was
>>>>>>> expecting one of: <TO> ... <VALUES> ... <SET> ... <ADD> ... <PUT> ...
>>>>>>> <MERGE> ... <CONTENT> ... <REMOVE> ... <ORDER> ... <GROUP> ... <OFFSET> 
>>>>>>> ...
>>>>>>> <RECORD> ... <LUCENE> ... <NEAR> ... <WITHIN> ... <EXCEPTION> ... <FIND>
>>>>>>> ... <REFERENCES> ... <THIS> ... <RECORD_ATTRIBUTE> ... <INTEGER_LITERAL>
>>>>>>> ... "(" ... "[" ... "?" ... ":" ... "-" ... "*" ... <IN> ... <KEY> ...
>>>>>>> <CLUSTER> ... <IDENTIFIER> ... <QUOTED_IDENTIFIER> ... 
>>>>>>> <INDEX_IDENTIFIER>
>>>>>>> ... <INDEXVALUES_IDENTIFIER> ... <INDEXVALUESASC_IDENTIFIER> ...
>>>>>>> <INDEXVALUESDESC_IDENTIFIER> ... <CLUSTER_IDENTIFIER> ...
>>>>>>> <CLUSTER_NUMBER_IDENTIFIER> ... <METADATA_IDENTIFIER> ... "#" ...
>>>>>>>
>>>>>>> I need to update the OUT value of an edge whilst maintaining the
>>>>>>> graph consistency with vertices and *without recreating the edge*
>>>>>>>
>>>>>> --
>>>
>>> ---
>>> 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.
>>>
>>
>> --
>
> ---
> 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.
>

-- 

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