A save point bookmarks the current point in the transaction process. You can create multiple save points and use "revertTransactionToSavepoint" to undo changes back to any save point.
A transaction save point represents the current point in the transaction process specified by the "transactionId" property.
A client can roll back a transaction to any save point by calling the "revertTransactionToSavepoint" action with the desired "transactionSavepointId" property.
A client can commit a transaction to any save point by calling the "commitTransaction" action with the desired "transactionSavepointId" property. This action is equivalent to and more efficient than running the "revertTransactionToSavepoint" action followed by "commitTransaction".
Request examples
Minimal
{
"action": "createTransactionSavepoint",
"params": {
"transactionId": "replaceWithTransactionIdFromCreateTransaction"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}Maximal
{
"api": "db",
"action": "createTransactionSavepoint",
"params":
{
"transactionId": "replaceWithTransactionIdFromCreateTransaction"
},
"responseOptions": {},
"apiVersion": "1.0",
"requestId": "2",
"debug": "max",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Response examples
Success
{
"result": {
"transactionSavepointId": 1
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}Maximal
{
"authToken": "replaceWithAuthTokenFromCreateSession",
"result": {
"transactionSavepointId": 1
},
"requestId": "00000003",
"debugInfo": {
"request": {
"authToken": "replaceWithAuthTokenFromCreateSession",
"api": "db",
"action": "createTransactionSavepoint",
"params": {
"transactionId": "replaceWithAValidTransactionId"
},
"requestId": "00000003",
"debug": "max"
},
"serverSuppliedValues": {
"databaseName": null,
"ownerName": null
},
"errorData": {
"errorData": null
},
"warnings": [
]
},
"errorCode": 0,
"errorMessage": ""
}
Request properties ("params")
| Property | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
transactionId |
The "transactionId" property identifies a transaction in which the specified action will be included. |
Optional with default of ""
|
string | 0 to 255 bytes |
Response properties ("result")
| Property | Description | Type | Limits (inclusive) |
|---|---|---|---|
transactionSavePointId |
The
|
string | 0 to 255 bytes |