You are currently browsing legacy 4.1 version of documentation. Click here to switch to the newest 5.1 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Client API: How to Use Low-Level Commands

Low-level commands are the mechanism that Operations are built on top of.
When performing an operation, there is an underlying low-level command that is in charge of sending the appropriate request to the server (via the Request Executor) and parsing the server reply.

In order to use low-level commands directly, you will need to use the execute method of a Request Executor.

public <TResult> void execute(RavenCommand<TResult> command);

public <TResult> void execute(RavenCommand<TResult> command, SessionInfo sessionInfo);



try (IDocumentSession session = store.openSession()) {
    GetDocumentsCommand command = new GetDocumentsCommand("orders/1-A", null, false);
    ObjectNode order = (ObjectNode) command.getResult().getResults().get(0);


try (IDocumentSession session = store.openSession()) {
    DeleteDocumentCommand command = new DeleteDocumentCommand("employees/1-A", null);

The Following Low-Level Commands are Available:

  • BatchCommand
  • CreateSubscriptionCommand
  • DeleteDocumentCommand
  • DeleteSubscriptionCommand
  • DropSubscriptionConnectionCommand
  • ExplainQueryCommand
  • GetConflictsCommand
  • GetDocumentsCommand
  • GetIdentitiesCommand
  • GetNextOperationIdCommand
  • GetOperationStateCommand
  • GetRevisionsBinEntryCommand
  • GetRevisionsCommand
  • GetSubscriptionsCommand
  • GetSubscriptionStateCommand
  • GetStatisticsCommand
  • HeadAttachmentCommand
  • HeadDocumentCommand
  • HiLoReturnCommand
  • KillOperationCommand
  • NextHiLoCommand
  • NextIdentityForCommand
  • PatchCommand
  • PutDocumentCommand
  • QueryCommand
  • QueryStreamCommand
  • SeedIdentityForCommand
  • StreamCommand