Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using RETURN with UPDATE REMOVE #4251

Closed
Ziink opened this issue May 30, 2015 · 3 comments
Closed

Error when using RETURN with UPDATE REMOVE #4251

Ziink opened this issue May 30, 2015 · 3 comments
Assignees
Labels

Comments

@Ziink
Copy link

Ziink commented May 30, 2015

update #17:16 remove note

works as expected. But

update #17:16 remove note return after

throws

com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #25: Found unexpected keyword 'RETURN' while it was expected '[=, WHERE]'. Use UPDATE |cluster:> [SET|ADD|PUT|REMOVE|INCREMENT|CONTENT {}|MERGE {}] [[,] = |]* [LOCK <NONE|RECORD>] [UPSERT] [RETURN <COUNT|BEFORE|AFTER>] [WHERE ] Command: UPDATE #17:16 REMOVE note RETURN AFTER ---------------------------------^

orientdb-community-2.1-rc3

@Ziink Ziink changed the title Error when using RETURN with UPDDATE REMOVE Error when using RETURN with UPDATE REMOVE May 30, 2015
@Nirlah
Copy link

Nirlah commented Sep 11, 2015

Yes, happens to me to [2.1.0].

I think the parser is strictly expecting = someValue before the return although it is not required by the syntax definition.

Another issues with remove is you cannot use it before other actions, only after:

UPDATE #8:0 SET year = 2007 REMOVE amount

WILL work.

UPDATE #8:0 REMOVE amount SET year = 2007

WON'T work.

@lvca please add to a hotfix milestone so this issue won't be lost.

@Eric24
Copy link

Eric24 commented Jun 1, 2016

I wonder is this is related? The following UPDATE with a PUT also throws a similar exception, but works if I replace the PUT with a SET on a non-map property:

UPDATE #14:1 PUT Options = '22', {"Action":"Test22a","Enabled":false, "@type":"d", "@class":"VOptions"} WHERE NOT (Options CONTAINSKEY '22') RETURN AFTER @this.Options['22']

@luigidellaquila
Copy link
Member

This is fixed in v 3.0 with the new SQL executor

Closing, thanks

Luigi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants