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);

Examples

GetDocumentsCommand

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

DeleteDocumentCommand

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

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