Hi Alexander, You found 2 bugs, one in documentation and the other in code:
(1) documentation The "RETURN" keyword must go before WHERE, so try this: update TaskStatus set status = 'Running' RETURN AFTER @rid where status = 'Pending' limit 1 (2) code There is a bug where if the return value wasn't a document, it was wrapped as documents by adding version and rid . This has been fixed in 1.7.8-SNAPSHOT (Issue https://github.com/orientechnologies/orientdb/issues/2639) where only "value" is returned with the returning value, in this case @rid. Please get last snapshot. Lvc@ Lvc@ On 30 July 2014 14:49, alexander anguiano <[email protected]> wrote: > I'm using orientdb 1.7.7 > > I have this update statement. > > update TaskStatus set status = 'Running' where status = 'Pending' limit 1 > RETURN AFTER @rid > > I'm expecting the update to return a collection of rids > > it is failing because it doesn't like the return after keyword > > com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error > on parsing command at position #56: Invalid keyword 'RETURN' Command: > select from TaskStatus WHERE status = 'Pending' limit 1 RETURN AFTER @rid > ----------------------------------------------------------------^ > > Thanks > > -- > > --- > 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.
