ObjectBox C and C++ API  4.0.3
obx::AsyncTreePutResult Struct Reference

Parameter to AsyncTreePutCallback, which is passed to Tree::putAsync(). More...

#include <objectbox.hpp>

Public Member Functions

bool isSuccess ()
 
void throwException ()
 Alternative to checking error codes: throw an exception instead. Note that this will always throw, so you should at least check for a successful outcome, e.g. via isSuccess(). More...
 

Public Attributes

TreePutResult result
 Non-exceptional results or "Undefined"; in the latter case obx_err has more details. More...
 
obx_err status
 More detailed error code if operation did not succeed. More...
 
obx_id id
 ID of the leaf that was put if operation succeeded. More...
 
std::string errorMessage
 Non-empty if an error occurred (result is "Undefined") More...
 

Detailed Description

Parameter to AsyncTreePutCallback, which is passed to Tree::putAsync().

Member Function Documentation

◆ isSuccess()

bool obx::AsyncTreePutResult::isSuccess ( )
inline
Returns
true if the operation was successful.

◆ throwException()

void obx::AsyncTreePutResult::throwException ( )
inline

Alternative to checking error codes: throw an exception instead. Note that this will always throw, so you should at least check for a successful outcome, e.g. via isSuccess().

Member Data Documentation

◆ errorMessage

std::string obx::AsyncTreePutResult::errorMessage

Non-empty if an error occurred (result is "Undefined")

◆ id

obx_id obx::AsyncTreePutResult::id

ID of the leaf that was put if operation succeeded.

◆ result

TreePutResult obx::AsyncTreePutResult::result

Non-exceptional results or "Undefined"; in the latter case obx_err has more details.

◆ status

obx_err obx::AsyncTreePutResult::status

More detailed error code if operation did not succeed.