Skip to content

Commit 392cf0f

Browse files
committed
0.19.0
1 parent f11e22d commit 392cf0f

File tree

13 files changed

+368
-80
lines changed

13 files changed

+368
-80
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: objectboxio/cbuild:21.11.11-xenial
1+
image: objectboxio/cbuild-ubuntu18.04:2023-08-23
22

33
build:
44
stage: build

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
ObjectBox C and C++ API Changelog
22
=================================
33

4+
0.19.0 (2023-09-04)
5+
-------------------
6+
* New K/V validation option on opening the store
7+
* Additions cursor API: get current ID, ID-based seeks (seek to first ID, seek to next ID)
8+
* Support scalar vector types with basic queries (APIs only, no generator support)
9+
* Various tree API improvements, e.g. introspection
10+
* Minor API clean up: e.g. using int types for bit flags not enums
11+
* Fixes query link condition in combination with some "or" conditions
12+
* Fixes query "less" condition for case-sensitive strings with value indexes (default is hashed index)
13+
* Updated Linux toolchain; now requires glibc 2.28 or higher (and GLIBCXX_3.4.25);
14+
e.g. the following minium versions are fine: Debian Buster 10 (2019), Ubuntu 20.04, RHEL 8 (2019)
15+
* Various internal improvements
16+
* Sync: various additions and improvements (client and server)
17+
418
0.18.1 (2023-01-30)
519
-------------------
620
Recommended bugfix release, generally recommended to update.
@@ -9,7 +23,7 @@ Recommended bugfix release, generally recommended to update.
923

1024
0.18.0 (2022-10-31)
1125
-------------------
12-
* Date properties can now be tagged as expiration time; which can be then be easily evicted
26+
* Date properties can now be tagged as expiration time, which can then be easily evicted
1327
* Tree API: various additions and improvements, e.g. OBXTreeOptionFlags to configure the tree behavior
1428
* New query condition to match objects that have a given number of relations
1529
* New "max data size" store setting

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.18.1)
34+
set(DL_VERSION 0.19.0)
3535

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

README.md

Lines changed: 2 additions & 2 deletions
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: 0.18.1** (2023-01-30).
21+
**Latest version: 0.19.0** (2023-09-04).
2222
See [changelog](CHANGELOG.md) for more details.
2323
2424
## Table of Contents:
@@ -28,7 +28,7 @@ See [changelog](CHANGELOG.md) for more details.
2828
- [Examples](#examples)
2929
- [Documentation](#documentation)
3030
- [Current state / Changelog](#current-state--changelog)
31-
- [Supported platforms](#supported-platforms)
31+
- [Supported platforms](#supported-platforms)
3232
- [C API as the Foundation for Higher Languages](#c-api-as-the-foundation-for-higher-languages)
3333
- [Other languages/bindings](#other-languagesbindings)
3434
- [How can I help ObjectBox?](#how-can-i-help-objectbox)

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

doxygen/Changelog.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
ObjectBox C and C++ API Changelog
44
=================================
55

6+
0.19.0 (2023-09-04)
7+
-------------------
8+
* New K/V validation option on opening the store
9+
* Additions cursor API: get current ID, ID-based seeks (seek to first ID, seek to next ID)
10+
* Support scalar vector types with basic queries (APIs only, no generator support)
11+
* Various tree API improvements, e.g. introspection
12+
* Minor API clean up: e.g. using int types for bit flags not enums
13+
* Fixes query link condition in combination with some "or" conditions
14+
* Fixes query "less" condition for case-sensitive strings with value indexes (default is hashed index)
15+
* Updated Linux toolchain; now requires glibc 2.28 or higher (and GLIBCXX_3.4.25);
16+
e.g. the following minium versions are fine: Debian Buster 10 (2019), Ubuntu 20.04, RHEL 8 (2019)
17+
* Various internal improvements
18+
* Sync: various additions and improvements (client and server)
19+
620
0.18.1 (2023-01-30)
721
-------------------
822
Recommended bugfix release, generally recommended to update.
@@ -11,7 +25,7 @@ Recommended bugfix release, generally recommended to update.
1125

1226
0.18.0 (2022-10-31)
1327
-------------------
14-
* Date properties can now be tagged as expiration time; which can be then be easily evicted
28+
* Date properties can now be tagged as expiration time, which can then be easily evicted
1529
* Tree API: various additions and improvements, e.g. OBXTreeOptionFlags to configure the tree behavior
1630
* New query condition to match objects that have a given number of relations
1731
* New "max data size" store setting

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.18.1"
41+
PROJECT_NUMBER = "0.19.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

examples/c-cursor-no-gen/main.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2020 ObjectBox Ltd. All rights reserved.
2+
* Copyright 2018-2023 ObjectBox Ltd. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -164,6 +164,7 @@ int do_action_new(OBX_store* store, int argc, char* argv[]) {
164164
size_t size = 0;
165165
OBX_txn* txn = NULL;
166166
OBX_cursor* cursor = NULL;
167+
bool success = false;
167168

168169
// grab the task text from the command line
169170
if (parse_text(argc, argv, &text) <= 0) {
@@ -186,7 +187,7 @@ int do_action_new(OBX_store* store, int argc, char* argv[]) {
186187

187188
// Get an ID for our soon-to-be-created task entity
188189
obx_id id = obx_cursor_id_for_put(cursor, 0);
189-
if (!id) {
190+
if (id == 0) {
190191
goto clean_up;
191192
}
192193

@@ -199,30 +200,29 @@ int do_action_new(OBX_store* store, int argc, char* argv[]) {
199200
if (obx_cursor_put_new(cursor, id, buff, size)) {
200201
goto clean_up;
201202
}
203+
printf("New task created with ID %" PRIu64 ": %s\n", id, text);
204+
success = true;
202205

203206
clean_up:
204-
if (!obx_last_error_code()) {
205-
printf("New task: %" PRIu64 " - %s\n", id, text);
206-
} else {
207+
if (!success) {
207208
printf("Failed to create the task\n");
208209
}
210+
obx_err error_code = obx_last_error_code();
209211

210-
if (cursor) {
211-
obx_cursor_close(cursor);
212-
}
213-
214-
if (txn && !obx_last_error_code()) {
215-
obx_txn_success(txn);
216-
}
212+
obx_cursor_close(cursor); // cursor may be NULL
217213

218214
if (txn) {
219-
obx_txn_close(txn);
215+
if (success && error_code == OBX_SUCCESS) {
216+
obx_txn_success(txn);
217+
} else {
218+
obx_txn_close(txn);
219+
}
220220
}
221221

222222
free(text);
223223
free(buff);
224224

225-
return obx_last_error_code();
225+
return error_code;
226226
}
227227

228228
//--------------------------------------------------------------------------------------------------------------------
@@ -395,7 +395,7 @@ int parse_text(int argc, char** argv, char** outText) {
395395
return -1;
396396
}
397397

398-
*outText = (char*) malloc(sizeof(char) * (size_t)(size + 1));
398+
*outText = (char*) malloc(sizeof(char) * (size_t) (size + 1));
399399
if (!*outText) {
400400
printf("Could not process task text\n");
401401
return -1;
@@ -446,14 +446,14 @@ int task_build(void** out_buff, size_t* out_size, obx_id id, const char* text, u
446446
return rc;
447447
}
448448

449-
uint64_t timestamp_now() { return (uint64_t)(time(NULL) * 1000); }
449+
uint64_t timestamp_now() { return (uint64_t) (time(NULL) * 1000); }
450450

451451
void date_to_str(char* buff, uint64_t timestamp) {
452452
if (!timestamp) {
453453
// empty string
454454
buff[0] = '\0';
455455
} else {
456-
time_t time = (time_t)(timestamp / 1000);
456+
time_t time = (time_t) (timestamp / 1000);
457457
struct tm* tm_info = localtime(&time);
458458
strftime(buff, DATE_BUFFER_LENGTH, DATE_FORMAT_STRING, tm_info);
459459
}

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 == 0 && OBX_VERSION_MINOR == 18 && OBX_VERSION_PATCH == 1, // NOLINT
37+
static_assert(OBX_VERSION_MAJOR == 0 && OBX_VERSION_MINOR == 19 && 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "objectbox-sync.h"
2020
#include "objectbox.hpp"
2121

22-
static_assert(OBX_VERSION_MAJOR == 0 && OBX_VERSION_MINOR == 18 && OBX_VERSION_PATCH == 1, // NOLINT
22+
static_assert(OBX_VERSION_MAJOR == 0 && OBX_VERSION_MINOR == 19 && OBX_VERSION_PATCH == 0, // NOLINT
2323
"Versions of objectbox.h and objectbox-sync.hpp files do not match, please update");
2424

2525
namespace obx {

0 commit comments

Comments
 (0)