core/src/main/java/com/orientechnologies/orient/core/command/script/OCommandExecutorScript.java
protected Object executeSQL() {
    ODatabaseDocument db = ODatabaseRecordThreadLocal.instance().getIfDefined();
    try {

      return executeSQLScript(parserText, db);

    } catch (IOException e) {
      throw OException.wrapException(new OCommandExecutionException("Error on executing command: " + parserText), e);
    }
  }
protected Object executeSQL() {
    ODatabaseDocument db = ODatabaseRecordThreadLocal.instance().getIfDefined();
    try {

      return executeSQLScript(parserText, db);

    } catch (IOException e) {
      throw OException.wrapException(new OCommandExecutionException("Error on executing command: " + parserText), e);
    }
  }
TODO: CREATE A REGULAR JSR223 SCRIPT IMPL