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

#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

std::string path
 Path of leaf. More...
 
obx_err status
 OBX_SUCCESS or OBX_NOT_FOUND if operation did not succeed. More...
 
obx_id id
 ID of the leaf that was get if operation succeeded or 0 if not found. More...
 
OBX_bytes leaf_data
 Leaf data if operation succeeded. More...
 
OBX_bytes leaf_metadata
 Leaf metadata if operation succeeded. More...
 
std::string errorMessage
 Non-empty if an error occurred (result is "Undefined") More...
 

Member Function Documentation

◆ isSuccess()

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

◆ throwException()

void obx::AsyncTreeGetResult::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::AsyncTreeGetResult::errorMessage

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

◆ id

obx_id obx::AsyncTreeGetResult::id

ID of the leaf that was get if operation succeeded or 0 if not found.

◆ leaf_data

OBX_bytes obx::AsyncTreeGetResult::leaf_data

Leaf data if operation succeeded.

◆ leaf_metadata

OBX_bytes obx::AsyncTreeGetResult::leaf_metadata

Leaf metadata if operation succeeded.

◆ path

std::string obx::AsyncTreeGetResult::path

Path of leaf.

◆ status

obx_err obx::AsyncTreeGetResult::status

OBX_SUCCESS or OBX_NOT_FOUND if operation did not succeed.