Ok! I figured it out!
The presence of \t (tabs) in the sql messed up the parser... maybe you can
do a quick fix, who knows how many hate the same problem :)
On Thursday, January 29, 2015 at 3:25:43 PM UTC+2, john davids wrote:
>
> I tried to look at the code that executes on the server side the post from
> the Studio client. I think it is OServerCommandPostCommand.execute() method.
>
> I copy pasted that code, in my code
>
> final OCommandRequestText cmd = (OCommandRequestText)
> OCommandManager.instance().getRequester("sql");
>
> cmd.setText(text);
> ...
>
> final OCommandExecutor executor =
> OCommandManager.instance().getExecutor(cmd);
> executor.setContext(cmd.getContext());
> executor.setProgressListener(cmd.getProgressListener());
> executor.parse(cmd);
>
> ...
>
> response = db.command(cmd).execute();
>
> I still get the same parsing error on my local client, and no error in
> Studio.
> Do you think it is some kind of String encoding problem on my side?
>
> On Thursday, January 29, 2015 at 1:18:16 PM UTC+2, john davids wrote:
>>
>> Hello,
>>
>> I'm using 2.0.1 and probably doing something wrong, but I execute some
>> queries using Studio and they run, but the same queries using Java API (no
>> prepared arguments, just plain sql) give me an
>> OCommandSQLParsingException.
>>
>> See an example below. The same query is sent as POST from the Studio web
>> app and works.
>>
>> Exception in thread "main"
>> com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on
>> parsing command at position #89: Found unexpected keyword '
>> traverse out('Relation') from #12:4 while ( ( relation = 'type of' or
>> relation is null ) and ( eval('not ($history contains #12:6)') ))
>>
>> Could you give me some hints why this happens, or how can I avoid it?
>>
>> Thank you!
>>
>
--
---
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.