|
1 |
| -Dummy for GitBook Sync |
| 1 | +--- |
| 2 | +description: >- |
| 3 | + This is the ObjectBox documentation for our C and C++ APIs. We strive to |
| 4 | + provide you with the easiest and fastest solution to store and retrieve data. |
| 5 | +--- |
| 6 | + |
| 7 | +# ObjectBox C / C++ Database |
| 8 | + |
| 9 | +{% hint style="info" %} |
| 10 | +Jobs: We're looking for a [C++ Developer](https://objectbox.io/jobs/objectbox-senior-c-plusplus-developer/) with a ❤️ for performant code |
| 11 | +{% endhint %} |
| 12 | + |
| 13 | +Are you ready use ObjectBox? These two pages will get you up to speed: |
| 14 | + |
| 15 | +{% content-ref url="installation.md" %} |
| 16 | +[installation.md](installation.md) |
| 17 | +{% endcontent-ref %} |
| 18 | + |
| 19 | +{% content-ref url="getting-started.md" %} |
| 20 | +[getting-started.md](getting-started.md) |
| 21 | +{% endcontent-ref %} |
| 22 | + |
| 23 | +Alternatively, you can also dive into [some examples on GitHub](https://github.com/objectbox/objectbox-c/tree/main/examples) right away. |
| 24 | + |
| 25 | +Your opinion matters to us! To make ObjectBox better for our users, we have set up an [Anonymous Feedback Form](https://forms.gle/bdktGBUmL4m48ruj7). Please do fill this in (it only takes 2 minutes). Every response is highly appreciated. To rate this documentation, you can use the "Was this page helpful?" smiley at the end of each page. |
| 26 | + |
| 27 | +Otherwise, feel free to open an issue on [GitHub ](https://github.com/objectbox/objectbox-c/issues)or send us your comments to contact\[at]objectbox.io - Thank you! - and if you like what you see, we also appreciate a shoutout :)  |
| 28 | + |
| 29 | +## Latest Versions (Changelogs) |
| 30 | + |
| 31 | +<div align="left"> |
| 32 | + |
| 33 | +<img src="https://img.shields.io/github/v/release/objectbox/objectbox-c?style=for-the-badge" alt=""> |
| 34 | + |
| 35 | +</div> |
| 36 | + |
| 37 | +### 4.0 (2024-11-11) |
| 38 | + |
| 39 | +Note: 4.0.3 the first 4.0.x version working with ObjectBox Generator 4.0 and thus is the first full 4.0 release. For individual changes in the runtime library check the GitHub release notes: [4.0.0](https://github.com/objectbox/objectbox-c/releases/tag/v4.0.0), [4.0.1](https://github.com/objectbox/objectbox-c/releases/tag/v4.0.1) and [4.0.2](https://github.com/objectbox/objectbox-c/releases/tag/v4.0.2). |
| 40 | + |
| 41 | +* CMake stubs to easily integrate with [ObjectBox Generator 4.0](https://github.com/objectbox/objectbox-generator/releases/tag/v4.0.0) |
| 42 | +* ObjectBox now supports vector search ("vector database") to enable efficient similarity searches.\ |
| 43 | + This is particularly useful for AI/ML/RAG applications, e.g. image, audio, or text similarity.\ |
| 44 | + Other use cases include semantic search or recommendation engines.\ |
| 45 | + See [https://docs.objectbox.io/ann-vector-search](https://docs.objectbox.io/ann-vector-search) for details. |
| 46 | +* Adjusting the version number to match the core version (4.0); we will be aligning on major versions from now on. |
| 47 | +* Made closing the store more robust; e.g. it waits for ongoing queries and transactions to finish\ |
| 48 | + (please still ensure to clean up properly on your side, this is an additional safety net) |
| 49 | +* Made Box API more robust when racing against store closing |
| 50 | +* Add "vectorsearch-cities" example |
| 51 | + |
| 52 | +### 0.21.0 (2024-02-13) |
| 53 | + |
| 54 | +* In-memory databases (simply provide a "memory:" prefixed "directory") |
| 55 | + |
| 56 | +#### Sync: |
| 57 | + |
| 58 | +* New client/server statistics API |
| 59 | +* New server API to enable authenticators |
| 60 | +* Sync server: support for sync permissions, blocks client updates with no write permission |
| 61 | +* Added sync-level login/write permissions for Admin Users DB and Web-UI |
| 62 | +* New authenticator "ObjectBox Admin" with support for authorization |
| 63 | +* New client API for username/password credentials |
| 64 | +* New client-side error listener API; initially reports "receive-only" downgrade due to no write permissions. |
| 65 | + |
| 66 | +### 0.20.0 (2023-12-11) |
| 67 | + |
| 68 | +* Added OBXFeature\_Backup to query for the feature's availability |
| 69 | +* Internal: added a DB store abstraction layer (another announcement about this will follow) |
| 70 | +* Tree API: fix for meta IDs vs. IDs |
| 71 | +* Various internal improvements |
| 72 | + |
| 73 | +#### Sync |
| 74 | + |
| 75 | +* Sync clients may now supply multiple URLs; for each connection attempt a random one is chosen. This allows for client-side load balancing and failover with an ObjectBox Sync cluster. |
| 76 | + |
| 77 | +### 0.19.0 (2023-09-04) |
| 78 | + |
| 79 | +* New K/V validation option on opening the store |
| 80 | +* Additions cursor API: get current ID, ID-based seeks (seek to first ID, seek to next ID) |
| 81 | +* Support scalar vector types with basic queries (APIs only, no generator support) |
| 82 | +* Various tree API improvements, e.g. introspection |
| 83 | +* Minor API clean up: e.g. using int types for bit flags not enums |
| 84 | +* Fixes query link condition in combination with some "or" conditions |
| 85 | +* Fixes query "less" condition for case-sensitive strings with value indexes (default is hashed index) |
| 86 | +* Updated Linux toolchain; now requires glibc 2.28 or higher (and GLIBCXX\_3.4.25); e.g. the following minium versions are fine: Debian Buster 10 (2019), Ubuntu 20.04, RHEL 8 (2019) |
| 87 | +* Various internal improvements |
| 88 | +* Sync: various additions and improvements (client and server) |
| 89 | + |
| 90 | +### 0.18.1 (2023-01-30) |
| 91 | + |
| 92 | +Recommended bugfix release; please update. |
| 93 | + |
| 94 | +* Fixes "Could not put (-30786)", which may occur in some corner cases on some platforms. |
| 95 | + |
| 96 | +### 0.18.0 (2022-10-31) |
| 97 | + |
| 98 | +* Date properties can now be tagged as expiration time; which can be then be easily evicted |
| 99 | +* Tree API: various additions and improvements, e.g. OBXTreeOptionFlags to configure the tree behavior |
| 100 | +* New query condition to match objects that have a given number of relations |
| 101 | +* New "max data size" store setting |
| 102 | +* Enabled stricter compiler settings |
| 103 | +* Added stacktraces on errors (Linux only; very lightweight as it uses external addr2line or llvm-symbolizer) |
| 104 | +* Added log callback for most important logs |
| 105 | +* Consolidated "user data" passing as the last parameter |
| 106 | +* Various internal improvements |
| 107 | + |
| 108 | +#### C++ |
| 109 | + |
| 110 | +* Added BoxTypeless, QueryBuilderBase and QueryBase: these can be used without generated code and template types. |
| 111 | +* New APIs to get the schema IDs for entity types and properties |
| 112 | +* Added two methods to Store to await asynchronous processing |
| 113 | +* Added "internal" namespace so that internal members do not spill into the obx namespace |
| 114 | +* Move more implementations to OBX\_CPP\_FILE |
| 115 | + |
| 116 | +#### Sync |
| 117 | + |
| 118 | +* Custom protocols for Sync: plugin your own messaging protocol, which ObjectBox Sync will run on |
| 119 | +* Improvements to run Sync Server with limited disk space (e.g. on small devices) |
| 120 | +* Tree Sync improvements; e.g. consolidate conflicts |
| 121 | +* WebSockets (sync protocol) is now a feature, which can be turned off (special build version) |
| 122 | +* Performance optimizations |
| 123 | + |
| 124 | +### 0.17.0 (2022-06-15) |
| 125 | + |
| 126 | +* Added a "weak store" API providing weak reference for stores (typically used by background threads) |
| 127 | +* Added Store ID API, e.g. getting a store by its ID |
| 128 | +* Various internal improvements including minor optimizations for binary size and performance |
| 129 | + |
| 130 | +#### C++ |
| 131 | + |
| 132 | +* New "OBX\_CPP\_FILE" define to place declarations in a single .cpp/.cc file: improves compilation time and results |
| 133 | +* New "Exception" base class for all thrown exceptions |
| 134 | +* Various internal improvements, e.g. a "internal" namespace to better distinguish from userland API |
| 135 | + |
| 136 | +### 0.16.0 (2022-05-06) |
| 137 | + |
| 138 | +* Allow UTF-8 for database directories on Windows (available for other platforms before) |
| 139 | +* Various internal improvements |
| 140 | + |
| 141 | +#### C++ |
| 142 | + |
| 143 | +* Promoted `Options` to a top level class, as nested classes cannot be declared forward |
| 144 | +* New `#define` to disable FlatBuffers includes to simplify new project setup |
| 145 | +* Rename `Exception` to `DbException` |
| 146 | +* Minor improvements |
| 147 | + |
| 148 | +### V0.15.2 (2022-02-15) |
| 149 | + |
| 150 | +* Add store cloning |
| 151 | +* Fix attaching to a reopened store |
| 152 | + |
| 153 | +### V0.15.1 (2022-01-26) |
| 154 | + |
| 155 | +* Fix non-unique indexes triggering unique constraint violations in corner cases (requires at least two unique constraints in an entity and a specific order; introduced in 0.15.0) |
| 156 | +* Admin UI now supports multiple sessions to the same host using different ports (session ID via HTTP request) |
| 157 | +* Minor performance improvements with hashed indexes |
| 158 | + |
| 159 | +#### Sync |
| 160 | + |
| 161 | +* Performance improvements for compression and decompression |
| 162 | + |
| 163 | +### V0.15.0 (2021-12-09) |
| 164 | + |
| 165 | +* New "Flex" data type that can contain data of various types like integers, floating points, strings, lists and maps |
| 166 | +* New query conditions for Flex lists to find a specific element |
| 167 | +* New query conditions for Flex maps to find elements with a specific key or key/value pair |
| 168 | +* New unique on-conflict strategy: replace conflicting objects (OBXPropertyFlags\_UNIQUE\_ON\_CONFLICT\_REPLACE) |
| 169 | +* New functions to attach to existing stores using only the file path (in the same process) |
| 170 | +* New APIs for ObjectBox Admin, the web based UI (formerly known as Object Browser): obx\_admin\_\* |
| 171 | +* Minor performance improvements for indexed access |
| 172 | +* Major performance improvements for tree/GraphQL queries |
| 173 | +* ARM binaries are now built for minimal size reducing the library size significantly |
| 174 | +* New "no\_reader\_thread\_locals" store option |
| 175 | +* Enable debug logging (requires a special build) |
| 176 | +* API: Type for query offsets and limits was changed from uint64\_t to size\_t |
| 177 | +* API: rarely used obx\_txn\_mark\_success() was removed; use obx\_txn\_success() |
| 178 | +* API: feature checks consolidated to only use obx\_has\_feature() |
| 179 | +* Many internal improvements |
| 180 | +* Core version 3.0.1-2021-12-09 |
| 181 | + |
| 182 | +#### Sync |
| 183 | + |
| 184 | +* New API for embedded server mode: obx\_sync\_server\_\* (implementation available on request) |
| 185 | + |
| 186 | +### Earlier Versions |
| 187 | + |
| 188 | +The changelogs of earlier versions are available as part of the [GitHub releases](https://github.com/objectbox/objectbox-c/releases). |
| 189 | + |
| 190 | +Provides native dynamic/shared library (.so/.dylib/.dll) |
| 191 | + |
| 192 | +* Provides C & C++ headers (objectbox.h & objectbox.hpp) |
| 193 | + |
| 194 | +## ObjectBox Generator |
| 195 | + |
| 196 | +<div align="left"> |
| 197 | + |
| 198 | +<img src="https://img.shields.io/github/v/release/objectbox/objectbox-generator?style=for-the-badge" alt=""> |
| 199 | + |
| 200 | +</div> |
| 201 | + |
| 202 | +Check the [ObjectBox Generator](https://github.com/objectbox/objectbox-generator/releases) releases for details. |
0 commit comments