@@ -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
0 commit comments