TIBCO ActiveSpaces®
|
A batchresult object holds the results of a single batch of operations returned by tibdgSession_GetRows , tibdgSession_PutRows , tibdgSession_UpdateRows , or tibdgSession_DeleteRows. More...
Functions | |
TIBDG_API tibbool_t | tibdgBatchResult_AllSucceeded (tibEx e, tibdgBatchResult batchResult) |
Find whether or not every operation in the batch succeeded. More... | |
TIBDG_API void | tibdgBatchResult_Destroy (tibEx e, tibdgBatchResult batchResult) |
Destroy the Batch Result. More... | |
TIBDG_API tibdgRow | tibdgBatchResult_GetRow (tibEx e, tibdgBatchResult batchResult, tibint32_t index) |
Get the Row at index from batchResult returned by tibdgSession_GetRows. More... | |
TIBDG_API tibint32_t | tibdgBatchResult_GetRowUpdateCount (tibEx e, tibdgBatchResult batchResult, tibint32_t index) |
Get the number of rows updated (0 or 1) for the row at index in batchResult. More... | |
TIBDG_API tibint32_t | tibdgBatchResult_GetSize (tibEx e, tibdgBatchResult batchResult) |
Get the number of rows in batchResult. More... | |
A batchresult object holds the results of a single batch of operations returned by tibdgSession_GetRows , tibdgSession_PutRows , tibdgSession_UpdateRows , or tibdgSession_DeleteRows.
Upon obtaining a batchResult from one of the listed functions, tibdgBatchResult_AllSucceeded should be called to determine whether the entire batch was successful and additional information is available, or if the batch failed and some additional action must be taken.
If tibdgBatchResult_AllSucceeded returns true, the following functions may be called as described below.
tibdgBatchResult_GetSize may be called on any batchResult to get the number of rows in the batch.
For results returned from tibdgSession_GetRows , tibdgBatchResult_GetRow may be called to get individual rows.
For results returned from tibdgSession_UpdateRows , tibdgBatchResult_GetRowUpdateCount may be called to determine whether each row required an update.
When no longer needed, batchresult objects should be destroyed with tibdgBatchResult_Destroy .
TIBDG_API tibbool_t tibdgBatchResult_AllSucceeded | ( | tibEx | e, |
tibdgBatchResult | batchResult | ||
) |
Find whether or not every operation in the batch succeeded.
This function must be called prior to retrieving any result information from a batchResult object returned by tibdgSession_GetRows , tibdgSession_PutRows , tibdgSession_UpdateRows , or tibdgSession_DeleteRows. If this function returns false, no further information about failures is available.
e | The exception object captures information about failures. |
batchResult | The batch result object from the batched operation |
TIBDG_API void tibdgBatchResult_Destroy | ( | tibEx | e, |
tibdgBatchResult | batchResult | ||
) |
Destroy the Batch Result.
e | The exception object captures information about failures. |
batchResult | The batch result object to destroy |
TIBDG_API tibdgRow tibdgBatchResult_GetRow | ( | tibEx | e, |
tibdgBatchResult | batchResult, | ||
tibint32_t | index | ||
) |
Get the Row at index from batchResult returned by tibdgSession_GetRows.
Example:
Note: only valid for GET batches. You must call AllSucceeded() to verify that all the operations in the batch completed successfully.
The row returned is owned by the BatchResult object, and must be copied using tibdgRow_Copy to modify or use after the batch is destroyed.
e | The exception object captures information about failures. |
batchResult | The batch result object from the batched operation |
index | The index of the row to retrieve |
NULL
. TIBDG_API tibint32_t tibdgBatchResult_GetRowUpdateCount | ( | tibEx | e, |
tibdgBatchResult | batchResult, | ||
tibint32_t | index | ||
) |
Get the number of rows updated (0 or 1) for the row at index in batchResult.
Example:
Note: only valid for UPDATE batch results returned from the tibdgSession_UpdateRows call. You must call AllSucceeded() to verify that all the operations in the batch completed successfully.
e | The exception object captures information about failures. |
batchResult | The batch result object from the batched operation |
index | The index of the row to retrieve |
TIBDG_API tibint32_t tibdgBatchResult_GetSize | ( | tibEx | e, |
tibdgBatchResult | batchResult | ||
) |
Get the number of rows in batchResult.
If the batch was successful as indicated by tibdgBatchResult_AllSucceeded, the value returned will match the number of rows passed in to tibdgSession_GetRows , tibdgSession_PutRows, tibdgSession_DeleteRows , or tibdgSession_UpdateRows .
e | The exception object captures information about failures. |
batchResult | The batch result object from the batched operation |