Like Box, but without template type. Serves as the basis for Box, but can also be used as "lower-level" box with some restrictions on the functionality. More...
#include <objectbox.hpp>
Public Member Functions | |
BoxTypeless (Store &store, obx_schema_id entityTypeId) | |
OBX_box * | cPtr () const |
uint64_t | count (uint64_t limit=0) |
Return the number of objects contained by this box. More... | |
bool | isEmpty () |
Returns true if the box contains no objects. More... | |
bool | contains (obx_id id) |
Checks whether this box contains an object with the given ID. More... | |
bool | contains (const std::vector< obx_id > &ids) |
Checks whether this box contains all objects matching the given IDs. More... | |
bool | get (CursorTx &cTx, obx_id id, const void **data, size_t *size) |
Low-level API: read an object as FlatBuffers bytes from the database. More... | |
obx_id | putNoThrow (void *data, size_t size, OBXPutMode mode=OBXPutMode_PUT) |
Low-level API: puts the given FlatBuffers object. More... | |
obx_id | put (void *data, size_t size, OBXPutMode mode=OBXPutMode_PUT) |
bool | remove (obx_id id) |
Remove the object with the given id. More... | |
uint64_t | remove (const std::vector< obx_id > &ids) |
Removes all objects matching the given IDs. More... | |
uint64_t | removeAll () |
Removes all objects from the box. More... | |
Protected Attributes | |
Store & | store_ |
OBX_box * | cBox_ |
const obx_schema_id | entityTypeId_ |
Like Box, but without template type. Serves as the basis for Box, but can also be used as "lower-level" box with some restrictions on the functionality.
|
inline |
|
inline |
Checks whether this box contains all objects matching the given IDs.
|
inline |
Checks whether this box contains an object with the given ID.
|
inline |
Return the number of objects contained by this box.
limit | if provided: stop counting at the given limit - useful if you need to make sure the Box has "at least" this many objects but you don't need to know the exact number. |
|
inline |
|
inline |
Low-level API: read an object as FlatBuffers bytes from the database.
|
inline |
Returns true if the box contains no objects.
obx_id obx::BoxTypeless::put | ( | void * | data, |
size_t | size, | ||
OBXPutMode | mode = OBXPutMode_PUT |
||
) |
obx_id obx::BoxTypeless::putNoThrow | ( | void * | data, |
size_t | size, | ||
OBXPutMode | mode = OBXPutMode_PUT |
||
) |
Low-level API: puts the given FlatBuffers object.
uint64_t obx::BoxTypeless::remove | ( | const std::vector< obx_id > & | ids | ) |
Removes all objects matching the given IDs.
bool obx::BoxTypeless::remove | ( | obx_id | id | ) |
Remove the object with the given id.
uint64_t obx::BoxTypeless::removeAll | ( | ) |
Removes all objects from the box.
|
protected |
|
protected |
|
protected |