Hello Everyone. I have noticed that the console behavior when using JS has 
changed in OrientDB version 2.2.9 to where I can no longer execute 
Javascript commands. Consider the following example:

orientdb {db=mydb}> js var r = db.query('select date()', []);print(r);end

When I press return at the end of that statement I receive the following 
error:

[Started multi-line command. Type just 'end' to finish and execute]

Error: 
com.orientechnologies.orient.core.command.script.OCommandScriptException: 
ScriptManager: error <eval>:1:38 Expected ; but found print
var r = db.query('select date()', []) print(r);
                                      ^ in <eval> at line number 1 at 
column number 38.
Function unknown:

   1: >>> var r = db.query('select date()', []) print(r);

        DB name="mydb"

I also tested this with a more simpler version of the JS as follows:

js var i = 1;print(i);end

The result was the same. I have the script interpreter feature enabled. 
Here is the relevant section from the orientdb-server-config.xml file:

<handler 
class="com.orientechnologies.orient.server.handler.OServerSideScriptInterpreter">
    <parameters>
        <parameter value="true" name="enabled"/>
        <parameter value="SQL,Javascript" name="allowedLanguages"/>
    </parameters>
</handler>

Is this a bug or did I miss something?

Amir.

-- 

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