code: public Object execute(final Map<Object, Object> iArgs) {
      if (newRecords == null)
        throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");
  
      final OCommandParameters commandParameters = new OCommandParameters(iArgs);
      if (indexName != null) {
        final OIndex<?> index = getDatabase().getMetadata().getIndexManager().getIndex(indexName);
        if (index == null)
          throw new OCommandExecutionException("Target index '" + indexName + "' not found");
  
        // BIND VALUES
        Map<String, Object> result = null;
  
        for (Map<String, Object> candidate : newRecords) {
          index.put(getIndexKeyValue(commandParameters, candidate), getIndexValue(commandParameters, candidate));
          result = candidate;
        }
  
        // RETURN LAST ENTRY
        return new ODocument(result);
      } else {
  
        // CREATE NEW DOCUMENTS
        final List<ODocument> docs = new ArrayList<ODocument>();
        for (Map<String, Object> candidate : newRecords) {
          final ODocument doc = className != null ? new ODocument(className) : new ODocument();
          OSQLHelper.bindParameters(doc, candidate, commandParameters);
  
          if (clusterName != null) {
            doc.save(clusterName);
          } else {
            doc.save();
          }
          docs.add(doc);
        }
  
        if (docs.size() == 1) {
          return docs.get(0);
        } else {
          return docs;
        }
      }
    }
docs: Execute the INSERT and return the ODocument object created.