graphdb/src/main/java/com/orientechnologies/orient/graph/sql/OCommandExecutorSQLDeleteVertex.java
public boolean result(final Object iRecord) {
    final OIdentifiable id = (OIdentifiable) iRecord;
    if (id.getIdentity().isValid()) {
      final ODocument record = id.getRecord();

      final OrientBaseGraph g = currentGraph.get();

      final OrientVertex v = g.getVertex(record);
      if (v != null) {
        v.remove();

        if (!txAlreadyBegun && batch > 0 && removed % batch == 0) {
          if (g instanceof OrientGraph) {
            g.commit();
            ((OrientGraph) g).begin();
          }
        }

        if (returning.equalsIgnoreCase("BEFORE"))
          allDeletedRecords.add(record);

        removed++;
      }
    }

    return true;

  }
public boolean result(final Object iRecord) {
    final OIdentifiable id = (OIdentifiable) iRecord;
    if (id.getIdentity().isValid()) {
      final ODocument record = id.getRecord();

      final OrientBaseGraph g = currentGraph.get();

      final OrientVertex v = g.getVertex(record);
      if (v != null) {
        v.remove();

        if (!txAlreadyBegun && batch > 0 && removed % batch == 0) {
          if (g instanceof OrientGraph) {
            g.commit();
            ((OrientGraph) g).begin();
          }
        }

        if (returning.equalsIgnoreCase("BEFORE"))
          allDeletedRecords.add(record);

        removed++;
      }
    }

    return true;

  }
Delete the current vertex.