Skip to content

Commit eb7f96e

Browse files
committed
0.11.0
1 parent af48cfa commit eb7f96e

30 files changed

+2001
-1701
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
:rotating_light: First, please check:
11+
- existing issues,
12+
- Docs https://cpp.objectbox.io/
13+
14+
**Describe the bug**
15+
A clear and concise description in English of what the bug is.
16+
17+
**Basic info (please complete the following information):**
18+
- ObjectBox version: [e.g. 0.10.0, latest version?]
19+
- C or C++ version: [e.g. C++11]
20+
- Reproducibility: [e.g. occurred once only | occasionally without visible pattern | always]
21+
- OS: [e.g. Ubuntu 20.04]
22+
23+
**To Reproduce**
24+
Steps to reproduce the behavior:
25+
1. Put '...'
26+
2. Make changes to '....'
27+
3. See error
28+
29+
**Expected behavior**
30+
A clear and concise description of what you expected to happen.
31+
32+
**Code**
33+
If applicable, add code to help explain your problem.
34+
- Include affected entity code.
35+
- Please remove any unnecessary or confidential parts.
36+
- At best, link to or attach a project with a failing test.
37+
38+
**Logs, stack traces**
39+
If applicable, add relevant logs, or a stack trace.
40+
41+
**Additional context**
42+
Add any other context about the problem here.
43+
- Is there anything special about your code?
44+
- May transactions or multi-threading play a role?
45+
- Did you find any workarounds to prevent the issue?

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Question
4+
url: https://stackoverflow.com/questions/tagged/objectbox
5+
about: Ask how to do something, or why it isn't working on Stack Overflow.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
:rotating_light: First, please check:
11+
- existing issues,
12+
- Docs https://cpp.objectbox.io/
13+
14+
Start with a clear and concise description of what problem you are trying to solve.
15+
Often there is already a solution!
16+
17+
**Describe the solution you'd like**
18+
A clear and concise description of what you want to happen.
19+
20+
**Describe alternatives you've considered**
21+
A clear and concise description of any alternative solutions or features you've considered.
22+
23+
**Additional context**
24+
Add any other context (e.g. platform or language) about the feature request here.

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+
0.11.0 (2020-11-12)
5+
------------------
6+
* update CMakeLists.txt to simplify integration for users, e.g. with `FetchContent`,
7+
see the updated [installation docs](https://cpp.objectbox.io/installation#objectbox-library)
8+
* rename `objectbox-cpp.h` to `objectbox.hpp`
9+
* change cursor and box read functions `get/first/current/next` `void**` argument to `const void**`
10+
* change multiple Query and QueryBuilder functions `int count` argument to `size_t count`
11+
* change observer signatures (`obx_err` return value and `size_t count` argument)
12+
* change C++ Store Options to a "builder" pattern and expose all available options
13+
* new obx_model_entity_flags()
14+
* new obx_opt_async_*() to configure Async box behavior
15+
* new C++ AsyncBox and Box::async() to expose asynchronous operations
16+
* new QueryBuilder greater-or-equal/less-or-equal functions for integers and floats
17+
* new obx_query_offset_limit() setter for offset and limit in a single call
18+
* new obx_sync_available() to check whether the loaded runtime library supports [ObjectBox Sync](https://objectbox.io/sync)
19+
* clean up linter warnings in the examples and `objectbox.h(pp)`
20+
421
0.10.0 (2020-08-13)
522
------------------
623
C++ API queries and model classes for more feature-rich generated code.

CMakeLists.txt

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,78 @@
11
cmake_minimum_required(VERSION 3.0)
22

3-
project(ObjectBoxCRoot)
3+
project(ObjectBoxCRoot) # to be displayed in an IDE when this CMake is opened
44

5-
IF(NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib")
6-
message( FATAL_ERROR "Directory lib does not exist; please run ./download.sh first" )
7-
ENDIF()
5+
if (${CMAKE_VERSION} VERSION_LESS "3.11.0")
6+
message("Please consider upgrading your CMake to a more recent version (v3.11+) to get automatic library download.")
7+
if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/lib")
8+
message(FATAL_ERROR "Directory lib does not exist; please run ./download.sh first")
9+
endif ()
10+
link_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib")
11+
else ()
12+
project(objectbox-download)
813

9-
link_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib")
14+
# Configuration updated for each release
15+
set(DL_VERSION 0.11.0)
16+
set(DL_CHANNEL testing)
17+
18+
# Platform detection and other setup
19+
set(DL_URL https://dl.bintray.com/objectbox/conan/objectbox/objectbox-c)
20+
21+
# ${CMAKE_SYSTEM_PROCESSOR} is invalid on Windows, see https://gitlab.kitware.com/cmake/cmake/-/issues/15170
22+
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
23+
if (CMAKE_SIZEOF_VOID_P MATCHES 8)
24+
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-x86_64)
25+
else ()
26+
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-x86)
27+
endif ()
28+
else ()
29+
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
30+
endif ()
31+
32+
if (${DL_PLATFORM} STREQUAL Linux-x86_64)
33+
set(DL_PACKAGE 4db1be536558d833e52e862fd84d64d75c2b3656)
34+
35+
elseif (${DL_PLATFORM} MATCHES "^Linux-armv7")
36+
set(DL_PACKAGE d42930899c74345edc43f8b7519ec7645c13e4d8)
37+
set(DL_PLATFORM "Linux-armv7hf") # show what we actually download
38+
39+
elseif (${DL_PLATFORM} MATCHES "^Linux-armv6")
40+
set(DL_PACKAGE 4a625f0bd5f477eacd9bd35e9c44c834d057524b)
41+
set(DL_PLATFORM "Linux-armv6hf") # show what we actually download
42+
43+
elseif (${DL_PLATFORM} STREQUAL Darwin-x86_64)
44+
set(DL_PACKAGE 46f53f156846659bf39ad6675fa0ee8156e859fe)
45+
46+
elseif (${DL_PLATFORM} STREQUAL Windows-x86_64)
47+
set(DL_PACKAGE ca33edce272a279b24f87dc0d4cf5bbdcffbc187)
48+
49+
elseif (${DL_PLATFORM} STREQUAL Windows-x86)
50+
set(DL_PACKAGE 11e6a84a7894f41df553e7c92534c3bf26896802)
51+
52+
else ()
53+
message(FATAL_ERROR "Can't download pre-compiled ObjectBox library - platform not supported: ${DL_PLATFORM}")
54+
endif ()
55+
56+
include(FetchContent)
57+
FetchContent_Declare(
58+
${PROJECT_NAME}
59+
URL ${DL_URL}/${DL_VERSION}/${DL_CHANNEL}/0/package/${DL_PACKAGE}/0/conan_package.tgz
60+
)
61+
62+
message(STATUS "Using pre-compiled ObjectBox library version ${DL_CHANNEL}:${DL_VERSION} for ${DL_PLATFORM}")
63+
FetchContent_Populate(${PROJECT_NAME})
64+
message(STATUS "Pre-compiled ObjectBox library is saved in ${objectbox-download_SOURCE_DIR}")
65+
66+
project(objectbox)
67+
add_library(${PROJECT_NAME} SHARED IMPORTED GLOBAL)
68+
set(objectbox_include_dirs ${objectbox-download_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/external/)
69+
set_target_properties(
70+
${PROJECT_NAME} PROPERTIES
71+
IMPORTED_LOCATION ${objectbox-download_SOURCE_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}
72+
IMPORTED_IMPLIB ${objectbox-download_SOURCE_DIR}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}objectbox${CMAKE_IMPORT_LIBRARY_SUFFIX}
73+
INTERFACE_INCLUDE_DIRECTORIES "${objectbox_include_dirs}"
74+
)
75+
endif ()
1076

1177
add_subdirectory(src-test)
1278
add_subdirectory(src-test-gen)

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ ObjectBox C and C++ APIs
33
[ObjectBox](https://objectbox.io) is a superfast database for objects.
44
This is the **ObjectBox runtime library** to run ObjectBox as an embedded database in your C or C++ application.
55

6-
**Latest version: 0.10.0** (2020-08-13). See [changelog](CHANGELOG.md) for more details.
6+
**Latest version: 0.11.0** (2020-11-12).
7+
See [changelog](CHANGELOG.md) for more details.
78

89
In most cases you want to use the C and C++ APIs in combination with the **[ObjectBox Generator](https://github.com/objectbox/objectbox-generator) tool**.
910
This way, you get a convenient C or C++ API which requires minimal code on your side to work with the database.
@@ -36,7 +37,7 @@ Usage and Installation
3637
The APIs come as single header file for C and C++:
3738
3839
* C: [include/objectbox.h](include/objectbox.h)
39-
* C++: [include/objectbox-cpp.h](include/objectbox-cpp.h) (depends on objectbox.h)
40+
* C++: [include/objectbox.hpp](include/objectbox.hpp) (depends on objectbox.h)
4041
4142
Compile your code against it and use the binary library (.so, .dylib, .dll depending on the platform) to link against.
4243
Head over to [ObjectBox C and C++ installation docs](https://cpp.objectbox.io/installation) for step-by-step instructions.
@@ -60,8 +61,8 @@ Have a look at the following TaskList example apps, depending on your programmin
6061
Documentation
6162
-------------
6263
* [C and C++ docs](https://cpp.objectbox.io/) - official ObjectBox C and C++ documentation
63-
* [include/objectbox.h](include/objectbox.h) - C-API header file contains docs in as code comments
64-
* [include/objectbox-cpp.h](include/objectbox-cpp.h) - C-API header file contains docs in as code comments
64+
* [include/objectbox.h](include/objectbox.h) - C API header file contains docs as code comments
65+
* [include/objectbox.hpp](include/objectbox.hpp) - C++ API header file contains docs as code comments
6566
* [C and C++ API reference docs](https://objectbox.io/docfiles/c/current/) - online HTML docs (Doxygen)
6667
6768
Current state / Changelog

download.sh

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

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

42-
version=${1:-0.10.0}
42+
version=${1:-0.11.0}
4343
repoType=${2:-testing}
4444
os=${3:-$(uname)}
4545
arch=${4:-$(uname -m)}

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+
0.11.0 (2020-11-12)
7+
------------------
8+
* update CMakeLists.txt to simplify integration for users, e.g. with `FetchContent`,
9+
see the updated [installation docs](https://cpp.objectbox.io/installation#objectbox-library)
10+
* rename `objectbox-cpp.h` to `objectbox.hpp`
11+
* change cursor and box read functions `get/first/current/next` `void**` argument to `const void**`
12+
* change multiple Query and QueryBuilder functions `int count` argument to `size_t count`
13+
* change observer signatures (`obx_err` return value and `size_t count` argument)
14+
* change C++ Store Options to a "builder" pattern and expose all available options
15+
* new obx_model_entity_flags()
16+
* new obx_opt_async_*() to configure Async box behavior
17+
* new C++ AsyncBox and Box::async() to expose asynchronous operations
18+
* new QueryBuilder greater-or-equal/less-or-equal functions for integers and floats
19+
* new obx_query_offset_limit() setter for offset and limit in a single call
20+
* new obx_sync_available() to check whether the loaded runtime library supports [ObjectBox Sync](https://objectbox.io/sync)
21+
* clean up linter warnings in the examples and `objectbox.h(pp)`
22+
623
0.10.0 (2020-08-13)
724
------------------
825
C++ API queries and model classes for more feature-rich generated code.

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.10.0"
41+
PROJECT_NUMBER = "0.11.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

doxygen/main-page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See [Installation docs](https://cpp.objectbox.io/installation) and check the [pr
1111
Headers
1212
-------------
1313
* ObjectBox C99 support is provided by a single header file: **objectbox.h**
14-
* ObjectBox C++11 support is available in an additional header: **objectbox-cpp.h**
14+
* ObjectBox C++11 support is available in an additional header: **objectbox.hpp**
1515

1616
Basic concepts
1717
--------------

0 commit comments

Comments
 (0)