|
| 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 | +import Tabs from "@theme/Tabs" |
| 8 | +import TabItem from "@theme/TabItem" |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +# ObjectBox C / C++ Database |
| 13 | + |
| 14 | +This is the ObjectBox documentation for our C and C++ APIs. We strive to provide you with the easiest and fastest solution to store and retrieve data. |
| 15 | + |
| 16 | + |
| 17 | +:::info |
| 18 | +Jobs: We're looking for a [C++ Developer](https://objectbox.io/jobs/objectbox-senior-c-plusplus-developer/) with a ❤️ for performant code |
| 19 | +::: |
| 20 | + |
| 21 | +Are you ready use ObjectBox? These two pages will get you up to speed: |
| 22 | + |
| 23 | +<div className="custom-nav-card"> |
| 24 | + <a href="/installation" className="custom-nav-card-link"> |
| 25 | + <div className="custom-nav-card-content"> |
| 26 | + <h3 className="custom-nav-card-title">Installation</h3> |
| 27 | + <p className="custom-nav-card-description">Get ObjectBox library and generator set up in your project</p> |
| 28 | + </div> |
| 29 | + <div className="custom-nav-card-arrow">›</div> |
| 30 | + </a> |
| 31 | +</div> |
| 32 | + |
| 33 | +<div className="custom-nav-card"> |
| 34 | + <a href="/getting-started" className="custom-nav-card-link"> |
| 35 | + <div className="custom-nav-card-content"> |
| 36 | + <h3 className="custom-nav-card-title">How to get started</h3> |
| 37 | + <p className="custom-nav-card-description">Learn the basics of using ObjectBox in your application</p> |
| 38 | + </div> |
| 39 | + <div className="custom-nav-card-arrow">›</div> |
| 40 | + </a> |
| 41 | +</div> |
| 42 | + |
| 43 | +Alternatively, you can also dive into [some examples on GitHub](https://github.com/objectbox/objectbox-c/tree/main/examples) right away. |
| 44 | + |
| 45 | +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. |
| 46 | + |
| 47 | +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 :)  |
| 48 | + |
| 49 | +## Latest Versions (Changelogs) |
| 50 | + |
| 51 | +<div align="left"><img src="https://img.shields.io/github/v/release/objectbox/objectbox-c?style=for-the-badge" alt=""/></div> |
| 52 | + |
| 53 | +### 4.3.0 (2025-05-12) |
| 54 | + |
| 55 | +* Windows: msvc runtime is now embedded to avoid incompatible msvcp140.dll (e.g. those shipped with some JDKs) |
| 56 | +* External property types (via [MongoDB connector](https://sync.objectbox.io/mongodb-sync-connector)): JsonToNative to support sub (embedded/nested) documents/arrays in MongoDB |
| 57 | +* External property types (via MongoDB connector): support ID mapping to UUIDs (v4 and v7) |
| 58 | +* Admin: add class and dependency diagrams to the schema page (view and download) |
| 59 | +* Admin: improved data view for large vectors by displaying only the first elements and the full vector in a dialog |
| 60 | +* Admin: detects images stored as bytes and shows them as such (PNG, GIF, JPEG, SVG, WEBP) |
| 61 | + |
| 62 | +#### Sync |
| 63 | + |
| 64 | +* Add "Log Events" for important server events, which can be viewed on new Admin page |
| 65 | +* Detect and ignore changes for objects that were put but were unchanged |
| 66 | +* The limit for message size was raised to 32 MB |
| 67 | +* Transactions above the message size limit will already fail on the client now (to better enforce the limit) |
| 68 | +* C++: add missing APIs for JWT token credentials |
| 69 | + |
| 70 | +### 4.2.0 (2025-03-04) |
| 71 | + |
| 72 | +* Extended the model by external names and types: allows defining a different name for an external database, which ObjectBox syncs with. |
| 73 | + |
| 74 | +This prepares upcoming features for our [MongoDB Sync Connector](https://sync.objectbox.io/mongodb-sync-connector). |
| 75 | + |
| 76 | +### 4.1.0 (2025-01-28) |
| 77 | + |
| 78 | +* New query conditions for map properties (via flex properties): now supports key/value pairs for inequality conditions (e.g. greater than, less than) for string, integer and floating point values |
| 79 | +* Vector search: add "Geo" distance type for longitude/latitude pairs |
| 80 | +* Various internal improvements |
| 81 | + |
| 82 | +#### Sync |
| 83 | + |
| 84 | +* Add JWT authentication |
| 85 | +* Sync clients can now send multiple credentials for login |
| 86 | + |
| 87 | +### 4.0 (2024-11-11) |
| 88 | + |
| 89 | +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). |
| 90 | + |
| 91 | +* CMake stubs to easily integrate with [ObjectBox Generator 4.0](https://github.com/objectbox/objectbox-generator/releases/tag/v4.0.0) |
| 92 | +* ObjectBox now supports vector search ("vector database") to enable efficient similarity searches.\ |
| 93 | + This is particularly useful for AI/ML/RAG applications, e.g. image, audio, or text similarity.\ |
| 94 | + Other use cases include semantic search or recommendation engines.\ |
| 95 | + See [https://docs.objectbox.io/ann-vector-search](https://docs.objectbox.io/ann-vector-search) for details. |
| 96 | +* Adjusting the version number to match the core version (4.0); we will be aligning on major versions from now on. |
| 97 | +* Made closing the store more robust; e.g. it waits for ongoing queries and transactions to finish\ |
| 98 | + (please still ensure to clean up properly on your side, this is an additional safety net) |
| 99 | +* Made Box API more robust when racing against store closing |
| 100 | +* Add "vectorsearch-cities" example |
| 101 | + |
| 102 | +### 0.21.0 (2024-02-13) |
| 103 | + |
| 104 | +* In-memory databases (simply provide a "memory:" prefixed "directory") |
| 105 | + |
| 106 | +#### Sync: |
| 107 | + |
| 108 | +* New client/server statistics API |
| 109 | +* New server API to enable authenticators |
| 110 | +* Sync server: support for sync permissions, blocks client updates with no write permission |
| 111 | +* Added sync-level login/write permissions for Admin Users DB and Web-UI |
| 112 | +* New authenticator "ObjectBox Admin" with support for authorization |
| 113 | +* New client API for username/password credentials |
| 114 | +* New client-side error listener API; initially reports "receive-only" downgrade due to no write permissions. |
| 115 | + |
| 116 | +### 0.20.0 (2023-12-11) |
| 117 | + |
| 118 | +* Added OBXFeature\_Backup to query for the feature's availability |
| 119 | +* Internal: added a DB store abstraction layer (another announcement about this will follow) |
| 120 | +* Tree API: fix for meta IDs vs. IDs |
| 121 | +* Various internal improvements |
| 122 | + |
| 123 | +#### Sync |
| 124 | + |
| 125 | +* 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. |
| 126 | + |
| 127 | +### 0.19.0 (2023-09-04) |
| 128 | + |
| 129 | +* New K/V validation option on opening the store |
| 130 | +* Additions cursor API: get current ID, ID-based seeks (seek to first ID, seek to next ID) |
| 131 | +* Support scalar vector types with basic queries (APIs only, no generator support) |
| 132 | +* Various tree API improvements, e.g. introspection |
| 133 | +* Minor API clean up: e.g. using int types for bit flags not enums |
| 134 | +* Fixes query link condition in combination with some "or" conditions |
| 135 | +* Fixes query "less" condition for case-sensitive strings with value indexes (default is hashed index) |
| 136 | +* 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) |
| 137 | +* Various internal improvements |
| 138 | +* Sync: various additions and improvements (client and server) |
| 139 | + |
| 140 | +### 0.18.1 (2023-01-30) |
| 141 | + |
| 142 | +Recommended bugfix release; please update. |
| 143 | + |
| 144 | +* Fixes "Could not put (-30786)", which may occur in some corner cases on some platforms. |
| 145 | + |
| 146 | +### 0.18.0 (2022-10-31) |
| 147 | + |
| 148 | +* Date properties can now be tagged as expiration time; which can be then be easily evicted |
| 149 | +* Tree API: various additions and improvements, e.g. OBXTreeOptionFlags to configure the tree behavior |
| 150 | +* New query condition to match objects that have a given number of relations |
| 151 | +* New "max data size" store setting |
| 152 | +* Enabled stricter compiler settings |
| 153 | +* Added stacktraces on errors (Linux only; very lightweight as it uses external addr2line or llvm-symbolizer) |
| 154 | +* Added log callback for most important logs |
| 155 | +* Consolidated "user data" passing as the last parameter |
| 156 | +* Various internal improvements |
| 157 | + |
| 158 | +#### C++ |
| 159 | + |
| 160 | +* Added BoxTypeless, QueryBuilderBase and QueryBase: these can be used without generated code and template types. |
| 161 | +* New APIs to get the schema IDs for entity types and properties |
| 162 | +* Added two methods to Store to await asynchronous processing |
| 163 | +* Added "internal" namespace so that internal members do not spill into the obx namespace |
| 164 | +* Move more implementations to OBX\_CPP\_FILE |
| 165 | + |
| 166 | +#### Sync |
| 167 | + |
| 168 | +* Custom protocols for Sync: plugin your own messaging protocol, which ObjectBox Sync will run on |
| 169 | +* Improvements to run Sync Server with limited disk space (e.g. on small devices) |
| 170 | +* Tree Sync improvements; e.g. consolidate conflicts |
| 171 | +* WebSockets (sync protocol) is now a feature, which can be turned off (special build version) |
| 172 | +* Performance optimizations |
| 173 | + |
| 174 | +### 0.17.0 (2022-06-15) |
| 175 | + |
| 176 | +* Added a "weak store" API providing weak reference for stores (typically used by background threads) |
| 177 | +* Added Store ID API, e.g. getting a store by its ID |
| 178 | +* Various internal improvements including minor optimizations for binary size and performance |
| 179 | + |
| 180 | +#### C++ |
| 181 | + |
| 182 | +* New "OBX\_CPP\_FILE" define to place declarations in a single .cpp/.cc file: improves compilation time and results |
| 183 | +* New "Exception" base class for all thrown exceptions |
| 184 | +* Various internal improvements, e.g. a "internal" namespace to better distinguish from userland API |
| 185 | + |
| 186 | +### 0.16.0 (2022-05-06) |
| 187 | + |
| 188 | +* Allow UTF-8 for database directories on Windows (available for other platforms before) |
| 189 | +* Various internal improvements |
| 190 | + |
| 191 | +#### C++ |
| 192 | + |
| 193 | +* Promoted `Options` to a top level class, as nested classes cannot be declared forward |
| 194 | +* New `#define` to disable FlatBuffers includes to simplify new project setup |
| 195 | +* Rename `Exception` to `DbException` |
| 196 | +* Minor improvements |
| 197 | + |
| 198 | +### V0.15.2 (2022-02-15) |
| 199 | + |
| 200 | +* Add store cloning |
| 201 | +* Fix attaching to a reopened store |
| 202 | + |
| 203 | +### V0.15.1 (2022-01-26) |
| 204 | + |
| 205 | +* 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) |
| 206 | +* Admin UI now supports multiple sessions to the same host using different ports (session ID via HTTP request) |
| 207 | +* Minor performance improvements with hashed indexes |
| 208 | + |
| 209 | +#### Sync |
| 210 | + |
| 211 | +* Performance improvements for compression and decompression |
| 212 | + |
| 213 | +### V0.15.0 (2021-12-09) |
| 214 | + |
| 215 | +* New "Flex" data type that can contain data of various types like integers, floating points, strings, lists and maps |
| 216 | +* New query conditions for Flex lists to find a specific element |
| 217 | +* New query conditions for Flex maps to find elements with a specific key or key/value pair |
| 218 | +* New unique on-conflict strategy: replace conflicting objects (OBXPropertyFlags\_UNIQUE\_ON\_CONFLICT\_REPLACE) |
| 219 | +* New functions to attach to existing stores using only the file path (in the same process) |
| 220 | +* New APIs for ObjectBox Admin, the web based UI (formerly known as Object Browser): obx\_admin\_\* |
| 221 | +* Minor performance improvements for indexed access |
| 222 | +* Major performance improvements for tree/GraphQL queries |
| 223 | +* ARM binaries are now built for minimal size reducing the library size significantly |
| 224 | +* New "no\_reader\_thread\_locals" store option |
| 225 | +* Enable debug logging (requires a special build) |
| 226 | +* API: Type for query offsets and limits was changed from uint64\_t to size\_t |
| 227 | +* API: rarely used obx\_txn\_mark\_success() was removed; use obx\_txn\_success() |
| 228 | +* API: feature checks consolidated to only use obx\_has\_feature() |
| 229 | +* Many internal improvements |
| 230 | +* Core version 3.0.1-2021-12-09 |
| 231 | + |
| 232 | +#### Sync |
| 233 | + |
| 234 | +* New API for embedded server mode: obx\_sync\_server\_\* (implementation available on request) |
| 235 | + |
| 236 | +### Earlier Versions |
| 237 | + |
| 238 | +The changelogs of earlier versions are available as part of the [GitHub releases](https://github.com/objectbox/objectbox-c/releases). |
| 239 | + |
| 240 | +Provides native dynamic/shared library (.so/.dylib/.dll) |
| 241 | + |
| 242 | +* Provides C & C++ headers (objectbox.h & objectbox.hpp) |
| 243 | + |
| 244 | +## ObjectBox Generator |
| 245 | + |
| 246 | +<div align="left"><img src="https://img.shields.io/github/v/release/objectbox/objectbox-generator?style=for-the-badge" alt=""/></div> |
| 247 | + |
| 248 | +Check the [ObjectBox Generator](https://github.com/objectbox/objectbox-generator/releases) releases for details. |
0 commit comments