Skip to content

Commit

Permalink
0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot committed Oct 30, 2019
1 parent 243c06a commit b7e8b91
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
0.7.2 (2019-10-29)
------------------
* new obx_store_wrap() (use with Java version 2.4.1)
* Minor fixes

0.7.1 (2019-10-16)
------------------
* Query performance improvements
Expand Down
19 changes: 14 additions & 5 deletions include/objectbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern "C" {
/// 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().
#define OBX_VERSION_MAJOR 0
#define OBX_VERSION_MINOR 7
#define OBX_VERSION_PATCH 1 // values >= 100 are reserved for dev releases leading to the next minor/major increase
#define OBX_VERSION_PATCH 2 // values >= 100 are reserved for dev releases leading to the next minor/major increase

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

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

obx_schema_id obx_store_entity_id(OBX_store* store, const char* entity_name);

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

/// Returns the number of matching objects
obx_err obx_query_count(OBX_query* query, uint64_t* count);
obx_err obx_query_count(OBX_query* query, uint64_t* out_count);

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

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

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

/// Removes (deletes!) all matching objects.
obx_err obx_query_cursor_remove(OBX_query* query, OBX_cursor* cursor, uint64_t* count);
obx_err obx_query_cursor_remove(OBX_query* query, OBX_cursor* cursor, uint64_t* out_count);

//----------------------------------------------
// Query parameters (obx_query_{type}_param(s))
Expand Down

0 comments on commit b7e8b91

Please sign in to comment.