@@ -479,8 +479,8 @@ typedef enum {
479
479
/// Value range (normalized vectors): 0.0 - 2.0 (0.0: same direction, 1.0: orthogonal, 2.0: opposite direction)
480
480
OBXVectorDistanceType_DotProduct = 3 ,
481
481
482
- OBXVectorDistanceType_Manhattan = 4 ,
483
- OBXVectorDistanceType_Hamming = 5 ,
482
+ // OBXVectorDistanceType_Manhattan = 4,
483
+ // OBXVectorDistanceType_Hamming = 5,
484
484
485
485
/// For geospatial coordinates aka latitude/longitude pairs.
486
486
/// 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 {
625
625
/// Encoding: 1:1 binary representation, little endian (16 bytes)
626
626
OBXExternalPropertyType_Int128 = 100 ,
627
627
// 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.
628
632
/// Representing type: ByteVector
629
633
/// Encoding: 1:1 binary representation (16 bytes)
630
634
OBXExternalPropertyType_Uuid = 102 ,
631
635
/// IEEE 754 decimal128 type, e.g. supported by MongoDB
632
636
/// Representing type: ByteVector
633
637
/// Encoding: 1:1 binary representation (16 bytes)
634
638
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 ,
638
653
/// A key/value map; e.g. corresponds to a JSON object or a MongoDB document (although not keeping the key order).
639
654
/// Unlike the Flex type, this must contain a map value (e.g. not a vector or a scalar).
640
655
/// Representing type: Flex
@@ -661,7 +676,7 @@ typedef enum {
661
676
/// A vector (array) of Int128 values
662
677
OBXExternalPropertyType_Int128Vector = 116 ,
663
678
// OBXExternalPropertyType_Reserved9 = 117,
664
- /// A vector (array) of Int128 values
679
+ /// A vector (array) of Uuid values
665
680
OBXExternalPropertyType_UuidVector = 118 ,
666
681
// OBXExternalPropertyType_Reserved10 = 119,
667
682
// OBXExternalPropertyType_Reserved11 = 120,
@@ -2956,4 +2971,4 @@ OBX_C_API obx_err obx_admin_close(OBX_admin* admin);
2956
2971
2957
2972
#endif // OBJECTBOX_H
2958
2973
2959
- /**@}*/ // end of doxygen group
2974
+ /**@}*/ // end of doxygen group
0 commit comments