Skip to content

Commit b7e8b91

Browse files
committed
0.7.2
1 parent 243c06a commit b7e8b91

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.7.2 (2019-10-29)
2+
------------------
3+
* new obx_store_wrap() (use with Java version 2.4.1)
4+
* Minor fixes
5+
16
0.7.1 (2019-10-16)
27
------------------
38
* Query performance improvements

include/objectbox.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern "C" {
4141
/// When using ObjectBox as a dynamic library, you should verify that a compatible version was linked using obx_version() or obx_version_is_at_least().
4242
#define OBX_VERSION_MAJOR 0
4343
#define OBX_VERSION_MINOR 7
44-
#define OBX_VERSION_PATCH 1 // values >= 100 are reserved for dev releases leading to the next minor/major increase
44+
#define OBX_VERSION_PATCH 2 // values >= 100 are reserved for dev releases leading to the next minor/major increase
4545

4646
/// Returns the version of the library as ints. Pointers may be null.
4747
void obx_version(int* major, int* minor, int* patch);
@@ -406,6 +406,15 @@ void obx_opt_free(OBX_store_options* opt);
406406
/// @returns NULL if the operation failed, see functions like obx_last_error_code() to get error details
407407
OBX_store* obx_store_open(OBX_store_options* opt);
408408

409+
/// For stores created outside of this C API, e.g. via C++ or Java, this is how you can use it via C too.
410+
/// Like this, it is OK to use the same store instance (same database) from multiple languages in parallel.
411+
/// Note: the store's life time will still be managed outside of the C API;
412+
/// thus ensure that store is not closed while calling any C function on it.
413+
/// Once you are done with the C specific OBX_store, call obx_store_close() to free any C related resources.
414+
/// This, however, will not close the "core store".
415+
/// @param core_store A pointer to the core C++ ObjectStore, or the native JNI handle for a BoxStore.
416+
OBX_store* obx_store_wrap(void* core_store);
417+
409418
obx_schema_id obx_store_entity_id(OBX_store* store, const char* entity_name);
410419

411420
obx_schema_id obx_store_entity_property_id(OBX_store* store, obx_schema_id entity_id, const char* property_name);
@@ -864,10 +873,10 @@ obx_err obx_query_visit(OBX_query* query, obx_data_visitor* visitor, void* user_
864873
OBX_id_array* obx_query_find_ids(OBX_query* query, uint64_t offset, uint64_t limit);
865874

866875
/// Returns the number of matching objects
867-
obx_err obx_query_count(OBX_query* query, uint64_t* count);
876+
obx_err obx_query_count(OBX_query* query, uint64_t* out_count);
868877

869878
/// Removes all matching objects from the database & returns the number of deleted objects
870-
obx_err obx_query_remove(OBX_query* query, uint64_t* count);
879+
obx_err obx_query_remove(OBX_query* query, uint64_t* out_count);
871880

872881
/// the resulting char* is valid until another call on to_string is made on the same query or until the query is freed
873882
const char* obx_query_describe(OBX_query* query);
@@ -888,10 +897,10 @@ OBX_bytes_array* obx_query_cursor_find(OBX_query* query, OBX_cursor* cursor, uin
888897

889898
/// @returns NULL if the operation failed, see functions like obx_last_error_code() to get error details
890899
OBX_id_array* obx_query_cursor_find_ids(OBX_query* query, OBX_cursor* cursor, uint64_t offset, uint64_t limit);
891-
obx_err obx_query_cursor_count(OBX_query* query, OBX_cursor* cursor, uint64_t* count);
900+
obx_err obx_query_cursor_count(OBX_query* query, OBX_cursor* cursor, uint64_t* out_count);
892901

893902
/// Removes (deletes!) all matching objects.
894-
obx_err obx_query_cursor_remove(OBX_query* query, OBX_cursor* cursor, uint64_t* count);
903+
obx_err obx_query_cursor_remove(OBX_query* query, OBX_cursor* cursor, uint64_t* out_count);
895904

896905
//----------------------------------------------
897906
// Query parameters (obx_query_{type}_param(s))

0 commit comments

Comments
 (0)