Skip to content

Commit 0d75e98

Browse files
committed
0.18.0
1 parent 9e0d32b commit 0d75e98

22 files changed

+2233
-409
lines changed

CHANGELOG.md

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

4+
0.18.0 (2022-10-31)
5+
-------------------
6+
* Date properties can now be tagged as expiration time; which can be then be easily evicted
7+
* Tree API: various additions and improvements, e.g. OBXTreeOptionFlags to configure the tree behavior
8+
* New query condition to match objects that have a given number of relations
9+
* New "max data size" store setting
10+
* Enabled stricter compiler settings
11+
* Added stacktraces on errors (Linux only; very lightweight as it uses external addr2line or llvm-symbolizer)
12+
* Added log callback for most important logs
13+
* Consolidated "user data" passing as the last parameter
14+
* Various internal improvements
15+
16+
### C++
17+
18+
* Added BoxTypeless, QueryBuilderBase and QueryBase:
19+
these can be used without generated code and template types.
20+
* New APIs to get the schema IDs for entity types and properties
21+
* Added two methods to Store to await asynchronous processing
22+
* Added "internal" namespace so that internal members do not spill into the obx namespace
23+
* Move more implementations to OBX_CPP_FILE
24+
25+
### Sync
26+
27+
* Custom protocols for Sync: plugin your own messaging protocol, which ObjectBox Sync will run on
28+
* Improvements to run Sync Server with limited disk space (e.g. on small devices)
29+
* Tree Sync improvements; e.g. consolidate conflicts
30+
* WebSockets (sync protocol) is now a feature, which can be turned off (special build version)
31+
* Performance optimizations
32+
433
0.17.0 (2022-06-15)
534
-------------------
635
* Added a "weak store" API providing weak reference for stores (typically used by background threads)

CMakeLists.txt

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

3232
function(defineObjectBoxLib VARIANT)
3333
# Configuration updated for each release
34-
set(DL_VERSION 0.17.0)
34+
set(DL_VERSION 0.18.0)
3535

3636
# Platform detection and other setup
3737
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
@@ -14,7 +14,7 @@ box.put({.text = "Buy milk"});
1414
1515
See [ObjectBox C and C++ docs](https://cpp.objectbox.io/) for API details.
1616
17-
**Latest version: 0.17.0** (2022-06-15).
17+
**Latest version: 0.18.0** (2022-10-31).
1818
See [changelog](CHANGELOG.md) for more details.
1919
2020
Feature Highlights

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:-0.17.0}
47+
version=${1:-0.18.0}
4848
os=${2:-$(uname)}
4949
arch=${3:-$(uname -m)}
5050
echo "Base config: OS ${os} and architecture ${arch}"

doxygen/Changelog.md

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

6+
0.18.0 (2022-10-31)
7+
-------------------
8+
* Date properties can now be tagged as expiration time; which can be then be easily evicted
9+
* Tree API: various additions and improvements, e.g. OBXTreeOptionFlags to configure the tree behavior
10+
* New query condition to match objects that have a given number of relations
11+
* New "max data size" store setting
12+
* Enabled stricter compiler settings
13+
* Added stacktraces on errors (Linux only; very lightweight as it uses external addr2line or llvm-symbolizer)
14+
* Added log callback for most important logs
15+
* Consolidated "user data" passing as the last parameter
16+
* Various internal improvements
17+
18+
### C++
19+
20+
* Added BoxTypeless, QueryBuilderBase and QueryBase:
21+
these can be used without generated code and template types.
22+
* New APIs to get the schema IDs for entity types and properties
23+
* Added two methods to Store to await asynchronous processing
24+
* Added "internal" namespace so that internal members do not spill into the obx namespace
25+
* Move more implementations to OBX_CPP_FILE
26+
27+
### Sync
28+
29+
* Custom protocols for Sync: plugin your own messaging protocol, which ObjectBox Sync will run on
30+
* Improvements to run Sync Server with limited disk space (e.g. on small devices)
31+
* Tree Sync improvements; e.g. consolidate conflicts
32+
* WebSockets (sync protocol) is now a feature, which can be turned off (special build version)
33+
* Performance optimizations
34+
635
0.17.0 (2022-06-15)
736
-------------------
837
* Added a "weak store" API providing weak reference for stores (typically used by background threads)

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 = "0.17.0"
41+
PROJECT_NUMBER = "0.18.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

external/flatbuffers/base.h

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140

141141
#define FLATBUFFERS_VERSION_MAJOR 2
142142
#define FLATBUFFERS_VERSION_MINOR 0
143-
#define FLATBUFFERS_VERSION_REVISION 6
143+
#define FLATBUFFERS_VERSION_REVISION 8
144144
#define FLATBUFFERS_STRING_EXPAND(X) #X
145145
#define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X)
146146
namespace flatbuffers {
@@ -260,24 +260,27 @@ namespace flatbuffers {
260260
#endif // !FLATBUFFERS_HAS_NEW_STRTOD
261261

262262
#ifndef FLATBUFFERS_LOCALE_INDEPENDENT
263-
// Enable locale independent functions {strtof_l, strtod_l,strtoll_l, strtoull_l}.
264-
#if ((defined(_MSC_VER) && _MSC_VER >= 1800) || \
265-
(defined(_XOPEN_VERSION) && (_XOPEN_VERSION>=700)) && (!defined(__ANDROID_API__) || (defined(__ANDROID_API__) && (__ANDROID_API__>=21))))
263+
// Enable locale independent functions {strtof_l, strtod_l,strtoll_l,
264+
// strtoull_l}.
265+
#if (defined(_MSC_VER) && _MSC_VER >= 1800) || \
266+
(defined(__ANDROID_API__) && __ANDROID_API__>= 21) || \
267+
(defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 700)) && \
268+
(!defined(__Fuchsia__) && !defined(__ANDROID_API__))
266269
#define FLATBUFFERS_LOCALE_INDEPENDENT 1
267270
#else
268271
#define FLATBUFFERS_LOCALE_INDEPENDENT 0
269272
#endif
270273
#endif // !FLATBUFFERS_LOCALE_INDEPENDENT
271274

272275
// Suppress Undefined Behavior Sanitizer (recoverable only). Usage:
273-
// - __supress_ubsan__("undefined")
274-
// - __supress_ubsan__("signed-integer-overflow")
276+
// - __suppress_ubsan__("undefined")
277+
// - __suppress_ubsan__("signed-integer-overflow")
275278
#if defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >=7))
276-
#define __supress_ubsan__(type) __attribute__((no_sanitize(type)))
279+
#define __suppress_ubsan__(type) __attribute__((no_sanitize(type)))
277280
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)
278-
#define __supress_ubsan__(type) __attribute__((no_sanitize_undefined))
281+
#define __suppress_ubsan__(type) __attribute__((no_sanitize_undefined))
279282
#else
280-
#define __supress_ubsan__(type)
283+
#define __suppress_ubsan__(type)
281284
#endif
282285

283286
// This is constexpr function used for checking compile-time constants.
@@ -328,6 +331,13 @@ typedef uintmax_t largest_scalar_t;
328331
// In 32bits, this evaluates to 2GB - 1
329332
#define FLATBUFFERS_MAX_BUFFER_SIZE ((1ULL << (sizeof(::flatbuffers::soffset_t) * 8 - 1)) - 1)
330333

334+
// The minimum size buffer that can be a valid flatbuffer.
335+
// Includes the offset to the root table (uoffset_t), the offset to the vtable
336+
// of the root table (soffset_t), the size of the vtable (uint16_t), and the
337+
// size of the referring table (uint16_t).
338+
#define FLATBUFFERS_MIN_BUFFER_SIZE sizeof(uoffset_t) + sizeof(soffset_t) + \
339+
sizeof(uint16_t) + sizeof(uint16_t)
340+
331341
// We support aligning the contents of buffers up to this size.
332342
#ifndef FLATBUFFERS_MAX_ALIGNMENT
333343
#define FLATBUFFERS_MAX_ALIGNMENT 32
@@ -403,7 +413,7 @@ template<typename T> T EndianScalar(T t) {
403413

404414
template<typename T>
405415
// UBSAN: C++ aliasing type rules, see std::bit_cast<> for details.
406-
__supress_ubsan__("alignment")
416+
__suppress_ubsan__("alignment")
407417
T ReadScalar(const void *p) {
408418
return EndianScalar(*reinterpret_cast<const T *>(p));
409419
}
@@ -417,13 +427,13 @@ T ReadScalar(const void *p) {
417427

418428
template<typename T>
419429
// UBSAN: C++ aliasing type rules, see std::bit_cast<> for details.
420-
__supress_ubsan__("alignment")
430+
__suppress_ubsan__("alignment")
421431
void WriteScalar(void *p, T t) {
422432
*reinterpret_cast<T *>(p) = EndianScalar(t);
423433
}
424434

425435
template<typename T> struct Offset;
426-
template<typename T> __supress_ubsan__("alignment") void WriteScalar(void *p, Offset<T> t) {
436+
template<typename T> __suppress_ubsan__("alignment") void WriteScalar(void *p, Offset<T> t) {
427437
*reinterpret_cast<uoffset_t *>(p) = EndianScalar(t.o);
428438
}
429439

@@ -434,7 +444,7 @@ template<typename T> __supress_ubsan__("alignment") void WriteScalar(void *p, Of
434444
// Computes how many bytes you'd have to pad to be able to write an
435445
// "scalar_size" scalar if the buffer had grown to "buf_size" (downwards in
436446
// memory).
437-
__supress_ubsan__("unsigned-integer-overflow")
447+
__suppress_ubsan__("unsigned-integer-overflow")
438448
inline size_t PaddingBytes(size_t buf_size, size_t scalar_size) {
439449
return ((~buf_size) + 1) & (scalar_size - 1);
440450
}

external/flatbuffers/buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ template<typename T> struct IndirectHelper<const T *> {
9595
}
9696
};
9797

98-
/// @brief Get a pointer to the the file_identifier section of the buffer.
98+
/// @brief Get a pointer to the file_identifier section of the buffer.
9999
/// @return Returns a const char pointer to the start of the file_identifier
100100
/// characters in the buffer. The returned char * has length
101101
/// 'flatbuffers::FlatBufferBuilder::kFileIdentifierLength'.

external/flatbuffers/code_generators.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ class BaseGenerator {
138138
std::string WrapInNameSpace(const Namespace *ns,
139139
const std::string &name) const;
140140

141-
std::string WrapInNameSpace(const Definition &def) const;
141+
std::string WrapInNameSpace(const Definition &def,
142+
const std::string &suffix = "") const;
142143

143144
std::string GetNameSpace(const Definition &def) const;
144145

external/flatbuffers/flatbuffer_builder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class FlatBufferBuilder {
358358
// If you get this assert, a corresponding StartTable wasn't called.
359359
FLATBUFFERS_ASSERT(nested);
360360
// Write the vtable offset, which is the start of any Table.
361-
// We fill it's value later.
361+
// We fill its value later.
362362
auto vtableoffsetloc = PushElement<soffset_t>(0);
363363
// Write a vtable, which consists entirely of voffset_t elements.
364364
// It starts with the number of offsets, followed by a type id, followed
@@ -579,7 +579,7 @@ class FlatBufferBuilder {
579579
/// @param[in] str A const pointer to a `String` struct to add to the buffer.
580580
/// @return Returns the offset in the buffer where the string starts
581581
Offset<String> CreateSharedString(const String *str) {
582-
return CreateSharedString(str->c_str(), str->size());
582+
return str ? CreateSharedString(str->c_str(), str->size()) : 0;
583583
}
584584

585585
/// @cond FLATBUFFERS_INTERNAL
@@ -747,7 +747,7 @@ class FlatBufferBuilder {
747747

748748
/// @brief Serialize a collection of Strings into a FlatBuffer `vector`.
749749
/// This is a convenience function for a common case.
750-
/// @param begin The begining iterator of the collection
750+
/// @param begin The beginning iterator of the collection
751751
/// @param end The ending iterator of the collection
752752
/// @return Returns a typed `Offset` into the serialized data indicating
753753
/// where the vector is stored.
@@ -757,7 +757,7 @@ class FlatBufferBuilder {
757757
auto scratch_buffer_usage = size * sizeof(Offset<String>);
758758
// If there is not enough space to store the offsets, there definitely won't
759759
// be enough space to store all the strings. So ensuring space for the
760-
// scratch region is OK, for it it fails, it would have failed later.
760+
// scratch region is OK, for if it fails, it would have failed later.
761761
buf_.ensure_space(scratch_buffer_usage);
762762
for (auto it = begin; it != end; ++it) {
763763
buf_.scratch_push_small(CreateString(*it));

0 commit comments

Comments
 (0)