package org.apache.tinkerpop.gremlin.orientdb.executor.transformer;

import com.orientechnologies.orient.core.command.script.transformer.result.OResultTransformer;
import com.orientechnologies.orient.core.sql.executor.OResult;
import com.orientechnologies.orient.core.sql.executor.OResultInternal;
import org.apache.tinkerpop.gremlin.orientdb.OrientElement;

/** Created by Enrico Risa on 24/01/17. */
public class OElementTransformer implements OResultTransformer<OrientElement> {

  @Override
  public OResult transform(OrientElement element) {
    OResultInternal internal = new OResultInternal();
    internal.setElement(element.getRawElement());
    return internal;
  }
}

@@ -544,16 +544,27 @@
 ) %7B%0A    
+return new 
 OResultI
@@ -574,66 +574,8 @@
 rnal
- internal = new OResultInternal();%0A    internal.setElement
 (ele
@@ -601,29 +601,8 @@
 ));%0A
-    return internal;%0A
   %7D%0A

use optimized constructro for result internal