Search in sources :

Example 21 with OCommandRequest

use of com.orientechnologies.orient.core.command.OCommandRequest in project orientdb by orientechnologies.

the class OScriptTask method execute.

public Object execute(ODistributedRequestId requestId, final OServer iServer, ODistributedServerManager iManager, final ODatabaseDocumentInternal database) throws Exception {
    ODistributedServerLog.debug(this, iManager.getLocalNodeName(), getNodeSource(), DIRECTION.IN, "execute command=%s db=%s", text.toString(), database.getName());
    final OCommandRequest cmd = database.command(new OCommandScript(text));
    final Object res;
    if (params != null)
        // EXECUTE WITH PARAMETERS
        res = cmd.execute(params);
    else
        res = cmd.execute();
    return res;
}
Also used : OCommandScript(com.orientechnologies.orient.core.command.script.OCommandScript) OCommandRequest(com.orientechnologies.orient.core.command.OCommandRequest)

Aggregations

OCommandRequest (com.orientechnologies.orient.core.command.OCommandRequest)21 ODocument (com.orientechnologies.orient.core.record.impl.ODocument)12 OIdentifiable (com.orientechnologies.orient.core.db.record.OIdentifiable)7 OCommandScript (com.orientechnologies.orient.core.command.script.OCommandScript)2 Collection (java.util.Collection)2 LinkedHashMap (java.util.LinkedHashMap)2 ORecord (com.orientechnologies.orient.core.record.ORecord)1 OCommandSQL (com.orientechnologies.orient.core.sql.OCommandSQL)1 OCommandGremlin (com.orientechnologies.orient.graph.gremlin.OCommandGremlin)1