Class OServerCommandPostBatch
java.lang.Object
com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract
com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAuthenticatedDbAbstract
com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandDocumentAbstract
com.orientechnologies.orient.server.network.protocol.http.command.post.OServerCommandPostBatch
- All Implemented Interfaces:
OServerCommand
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:
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.
{ "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)
-
Field Summary
Fields inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAuthenticatedDbAbstract
DBNAME_DIR_SEPARATOR, SESSIONID_LOGOUT, SESSIONID_UNAUTHORIZEDFields inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract
server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(OHttpRequest iRequest, OHttpResponse iResponse) Executes the command requested.String[]getNames()Methods inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandDocumentAbstract
bindToFieldsMethods inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAuthenticatedDbAbstract
afterExecute, authenticate, beforeExecute, getProfiledDatabaseInstance, getProfiledDatabaseInstanceBasic, getProfiledDatabaseInstanceToken, sendAuthorizationRequestMethods inherited from class com.orientechnologies.orient.server.network.protocol.http.command.OServerCommandAbstract
checkSyntax, configure, getServer, isJsonResponse, sendJsonError, setNoCache
-
Constructor Details
-
OServerCommandPostBatch
public OServerCommandPostBatch()
-
-
Method Details
-
execute
Description copied from interface:OServerCommandExecutes the command requested.- Returns:
- boolean value that indicates if this command is part of a chain
- Throws:
Exception
-
getRecord
-
getNames
-