Skip to content

Commit 25609a8

Browse files
committed
Version 4.3.0
1 parent 888d119 commit 25609a8

File tree

10 files changed

+92
-17
lines changed

10 files changed

+92
-17
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
ObjectBox C and C++ API Changelog
22
=================================
33

4+
4.3.0 (2025-05-12)
5+
------------------
6+
* Windows: msvc runtime is now embedded to avoid incompatible msvcp140.dll (e.g. those shipped with some JDKs)
7+
* External property types (via MongoDB connector): JsonToNative to support sub (embedded/nested) documents/arrays in MongoDB
8+
* External property types (via MongoDB connector): support ID mapping to UUIDs (v4 and v7)
9+
* Admin: add class and dependency diagrams to the schema page (view and download)
10+
* Admin: improved data view for large vectors by displaying only the first elements and the full vector in a dialog
11+
* Admin: detects images stored as bytes and shows them as such (PNG, GIF, JPEG, SVG, WEBP)
12+
13+
### Sync
14+
15+
* Add "Log Events" for important server events, which can be viewed on new Admin page
16+
* Detect and ignore changes for objects that were put but were unchanged
17+
* The limit for message size was raised to 32 MB
18+
* Transactions above the message size limit will already fail on the client now (to better enforce the limit)
19+
* C++: add missing APIs for JWT token credentials
20+
421
4.2.0 (2025-03-04)
522
------------------
623
* Extended the model by external names and types:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ else ()
4949

5050
function(defineObjectBoxLib VARIANT)
5151
# Configuration updated for each release
52-
set(DL_VERSION 4.2.0)
52+
set(DL_VERSION 4.3.0)
5353

5454
# Platform detection and other setup
5555
set(DL_URL https://github.com/objectbox/objectbox-c/releases/download)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ box.put({.text = "Buy milk"});
1818
1919
See [ObjectBox C and C++ docs](https://cpp.objectbox.io/) for API details.
2020
21-
**Latest version: 4.2.0** (2025-03-04).
21+
**Latest version: 4.3.0** (2025-05-12).
2222
See [changelog](CHANGELOG.md) for more details.
2323
2424
## Table of Contents:

download.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ tty -s || quiet=true
4444

4545
# Note: optional arguments like "--quiet" shifts argument positions in the case block above
4646

47-
version=${1:-4.2.0}
47+
version=${1:-4.3.0}
4848
os=${2:-$(uname)}
4949
arch=${3:-$(uname -m)}
5050
echo "Base config: OS ${os} and architecture ${arch}"

doxygen/Changelog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
ObjectBox C and C++ API Changelog
44
=================================
55

6+
4.3.0 (2025-05-12)
7+
------------------
8+
* Windows: msvc runtime is now embedded to avoid incompatible msvcp140.dll (e.g. those shipped with some JDKs)
9+
* External property types (via MongoDB connector): JsonToNative to support sub (embedded/nested) documents/arrays in MongoDB
10+
* External property types (via MongoDB connector): support ID mapping to UUIDs (v4 and v7)
11+
* Admin: add class and dependency diagrams to the schema page (view and download)
12+
* Admin: improved data view for large vectors by displaying only the first elements and the full vector in a dialog
13+
* Admin: detects images stored as bytes and shows them as such (PNG, GIF, JPEG, SVG, WEBP)
14+
15+
### Sync
16+
17+
* Add "Log Events" for important server events, which can be viewed on new Admin page
18+
* Detect and ignore changes for objects that were put but were unchanged
19+
* The limit for message size was raised to 32 MB
20+
* Transactions above the message size limit will already fail on the client now (to better enforce the limit)
21+
* C++: add missing APIs for JWT token credentials
22+
623
4.2.0 (2025-03-04)
724
------------------
825
* Extended the model by external names and types:

doxygen/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "ObjectBox C and C++ API"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "4.2.0"
41+
PROJECT_NUMBER = "4.3.0"
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

include/objectbox-sync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "objectbox.h"
3535

3636
#if defined(static_assert) || defined(__cplusplus)
37-
static_assert(OBX_VERSION_MAJOR == 4 && OBX_VERSION_MINOR == 2 && OBX_VERSION_PATCH == 0, // NOLINT
37+
static_assert(OBX_VERSION_MAJOR == 4 && OBX_VERSION_MINOR == 3 && OBX_VERSION_PATCH == 0, // NOLINT
3838
"Versions of objectbox.h and objectbox-sync.h files do not match, please update");
3939
#endif
4040

include/objectbox-sync.hpp

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@
1616

1717
#pragma once
1818

19+
#include <chrono>
20+
1921
#include "objectbox-sync.h"
2022
#include "objectbox.hpp"
2123

22-
static_assert(OBX_VERSION_MAJOR == 4 && OBX_VERSION_MINOR == 2 && OBX_VERSION_PATCH == 0, // NOLINT
24+
static_assert(OBX_VERSION_MAJOR == 4 && OBX_VERSION_MINOR == 3 && OBX_VERSION_PATCH == 0, // NOLINT
2325
"Versions of objectbox.h and objectbox-sync.hpp files do not match, please update");
2426

2527
namespace obx {
2628

29+
/// Credentials for logging into a Sync Server that are passed to SyncClient.
30+
/// Typically created using a factory method, e.g. `SyncCredentials::none()` or `SyncCredentials::jwtIdToken(...)`.
2731
class SyncCredentials {
2832
friend SyncClient;
2933
friend SyncServer;
@@ -72,6 +76,23 @@ class SyncCredentials {
7276
static SyncCredentials userPassword(const std::string& username, const std::string& password) {
7377
return SyncCredentials(OBXSyncCredentialsType::OBXSyncCredentialsType_USER_PASSWORD, username, password);
7478
}
79+
80+
static SyncCredentials jwtIdToken(const std::string& token) {
81+
return SyncCredentials(OBXSyncCredentialsType::OBXSyncCredentialsType_JWT_ID, token);
82+
}
83+
84+
static SyncCredentials jwtAccessToken(const std::string& token) {
85+
return SyncCredentials(OBXSyncCredentialsType::OBXSyncCredentialsType_JWT_ACCESS, token);
86+
}
87+
88+
static SyncCredentials jwtRefreshToken(const std::string& token) {
89+
return SyncCredentials(OBXSyncCredentialsType::OBXSyncCredentialsType_JWT_REFRESH, token);
90+
}
91+
92+
static SyncCredentials jwtCustomToken(const std::string& token) {
93+
return SyncCredentials(OBXSyncCredentialsType::OBXSyncCredentialsType_JWT_CUSTOM, token);
94+
}
95+
7596
};
7697

7798
/// Listens to login events on a sync client.
@@ -801,7 +822,7 @@ class SyncServer : public Closable {
801822
/// - accepted credentials via setCredentials() (always required)
802823
/// - SSL certificate info via setCertificatePath() (required if you use wss)
803824
/// \note The model given via store_options is also used to verify the compatibility of the models presented by
804-
/// clients.
825+
/// clients.
805826
/// E.g. a client with an incompatible model will be rejected during login.
806827
/// @param storeOptions Options for the server's store. Will be "consumed"; do not use the Options object again.
807828
/// @param url The URL (following the pattern protocol:://IP:port) the server should listen on.

include/objectbox.h

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ extern "C" {
5252
/// When using ObjectBox as a dynamic library, you should verify that a compatible version was linked using
5353
/// obx_version() or obx_version_is_at_least().
5454
#define OBX_VERSION_MAJOR 4
55-
#define OBX_VERSION_MINOR 2
55+
#define OBX_VERSION_MINOR 3
5656
#define OBX_VERSION_PATCH 0 // values >= 100 are reserved for dev releases leading to the next minor/major increase
5757

5858
//----------------------------------------------
@@ -479,8 +479,8 @@ typedef enum {
479479
/// Value range (normalized vectors): 0.0 - 2.0 (0.0: same direction, 1.0: orthogonal, 2.0: opposite direction)
480480
OBXVectorDistanceType_DotProduct = 3,
481481

482-
OBXVectorDistanceType_Manhattan = 4,
483-
OBXVectorDistanceType_Hamming = 5,
482+
// OBXVectorDistanceType_Manhattan = 4,
483+
// OBXVectorDistanceType_Hamming = 5,
484484

485485
/// For geospatial coordinates aka latitude/longitude pairs.
486486
/// Note, that the vector dimension must be 2, with the latitude being the first element and longitude the second.
@@ -625,16 +625,31 @@ typedef enum {
625625
/// Encoding: 1:1 binary representation, little endian (16 bytes)
626626
OBXExternalPropertyType_Int128 = 100,
627627
// OBXExternalPropertyType_Reserved1 = 101,
628+
/// A UUID (Universally Unique Identifier) as defined by RFC 9562.
629+
/// ObjectBox uses the UUIDv7 scheme (timestamp + random) to create new UUIDs.
630+
/// UUIDv7 is a good choice for database keys as it's mostly sequential and encodes a timestamp.
631+
/// However, if keys are used externally, consider UuidV4 for better privacy by not exposing any time information.
628632
/// Representing type: ByteVector
629633
/// Encoding: 1:1 binary representation (16 bytes)
630634
OBXExternalPropertyType_Uuid = 102,
631635
/// IEEE 754 decimal128 type, e.g. supported by MongoDB
632636
/// Representing type: ByteVector
633637
/// Encoding: 1:1 binary representation (16 bytes)
634638
OBXExternalPropertyType_Decimal128 = 103,
635-
// OBXExternalPropertyType_Reserved2 = 104,
636-
// OBXExternalPropertyType_Reserved3 = 105,
637-
// OBXExternalPropertyType_Reserved4 = 106,
639+
/// UUID represented as a string of 36 characters, e.g. "019571b4-80e3-7516-a5c1-5f1053d23fff".
640+
/// For efficient storage, consider the Uuid type instead, which occupies only 16 bytes (20 bytes less).
641+
/// This type may still be a convenient alternative as the string type is widely supported and more human-readable.
642+
/// In accordance to standards, new UUIDs generated by ObjectBox use lowercase hexadecimal digits.
643+
/// Representing type: String
644+
OBXExternalPropertyType_UuidString = 104,
645+
/// A UUID (Universally Unique Identifier) as defined by RFC 9562.
646+
/// ObjectBox uses the UUIDv4 scheme (completely random) to create new UUIDs.
647+
/// Representing type: ByteVector
648+
/// Encoding: 1:1 binary representation (16 bytes)
649+
OBXExternalPropertyType_UuidV4 = 105,
650+
/// Like UuidString, but using the UUIDv4 scheme (completely random) to create new UUID.
651+
/// Representing type: String
652+
OBXExternalPropertyType_UuidV4String = 106,
638653
/// A key/value map; e.g. corresponds to a JSON object or a MongoDB document (although not keeping the key order).
639654
/// Unlike the Flex type, this must contain a map value (e.g. not a vector or a scalar).
640655
/// Representing type: Flex
@@ -654,14 +669,19 @@ typedef enum {
654669
/// JavaScript source code
655670
/// Representing type: String
656671
OBXExternalPropertyType_JavaScript = 111,
657-
// OBXExternalPropertyType_Reserved5 = 112,
672+
/// A JSON string that is converted to a native representation in the external system.
673+
/// For example, a JSON object on the ObjectBox side (string) would be converted to an embedded document in MongoDB.
674+
/// It depends on the external system what kind of JSON structures is supported.
675+
/// For MongoDB, this is very flexible and allows (nested) objects, arrays, primitives, etc.
676+
/// Representing type: String
677+
OBXExternalPropertyType_JsonToNative = 112,
658678
// OBXExternalPropertyType_Reserved6 = 113,
659679
// OBXExternalPropertyType_Reserved7 = 114,
660680
// OBXExternalPropertyType_Reserved8 = 115,
661681
/// A vector (array) of Int128 values
662682
OBXExternalPropertyType_Int128Vector = 116,
663683
// OBXExternalPropertyType_Reserved9 = 117,
664-
/// A vector (array) of Int128 values
684+
/// A vector (array) of Uuid values
665685
OBXExternalPropertyType_UuidVector = 118,
666686
// OBXExternalPropertyType_Reserved10 = 119,
667687
// OBXExternalPropertyType_Reserved11 = 120,
@@ -2956,4 +2976,4 @@ OBX_C_API obx_err obx_admin_close(OBX_admin* admin);
29562976

29572977
#endif // OBJECTBOX_H
29582978

2959-
/**@}*/ // end of doxygen group
2979+
/**@}*/ // end of doxygen group

include/objectbox.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <optional>
3737
#endif
3838

39-
static_assert(OBX_VERSION_MAJOR == 4 && OBX_VERSION_MINOR == 2 && OBX_VERSION_PATCH == 0, // NOLINT
39+
static_assert(OBX_VERSION_MAJOR == 4 && OBX_VERSION_MINOR == 3 && OBX_VERSION_PATCH == 0, // NOLINT
4040
"Versions of objectbox.h and objectbox.hpp files do not match, please update");
4141

4242
#ifdef __clang__

0 commit comments

Comments
 (0)