All Implemented Interfaces:
OServerCommand

public class OServerCommandPostBatch extends OServerCommandDocumentAbstract
Executes a batch of operations in a single call. This is useful to reduce network latency issuing multiple commands as multiple requests. Batch command supports transactions as well.

Format: { "transaction" : <true|false>, "operations" : [ { "type" : "<type>" }* ] }
Where:
  • type can be:
    • 'c' for create
    • 'u' for update
    • 'd' for delete. The '@rid' field only is needed.
Example:

 { "transaction" : true,
   "operations" : [
        { "type" : "u",
          "record" : {
            "@rid" : "#14:122",
            "name" : "Luca",
            "vehicle" : "Car"
          }
        }, { "type" : "d",
          "record" : {
            "@rid" : "#14:100"
          }
        }, { "type" : "c",
          "record" : {
            "@class" : "City",
            "name" : "Venice"
          }
        }
     ]
 }
 
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
  • Constructor Details

    • OServerCommandPostBatch

      public OServerCommandPostBatch()
  • Method Details