Skip to content

Commit f22d0b2

Browse files
committed
README.md: clarify that there's a C and a C++ API, update features
1 parent 27c6b0e commit f22d0b2

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
ObjectBox C/C++ API
2-
===================
1+
ObjectBox C and C++ APIs
2+
========================
33
[ObjectBox](https://objectbox.io) is a superfast database for objects.
4-
This is the **ObjectBox runtime library** to run ObjectBox as an embedded database in your C/C++ application.
4+
This is the **ObjectBox runtime library** to run ObjectBox as an embedded database in your C or C++ application.
55

66
**Latest version: 0.9.1** (2020-06-23). See [changelog](CHANGELOG.md) for more details.
77

8-
In most cases you want to use the C/C++ API in combination with the **companion project [ObjectBox Generator](https://github.com/objectbox/objectbox-generator)**.
9-
The Generator generates boiler plate code and maintains some metadata around the data model.
8+
In most cases you want to use the C and C++ APIs in combination with the **companion project [ObjectBox Generator](https://github.com/objectbox/objectbox-generator)**.
109
Like this, you get a convenient API which requires minimal code on your side to work with the database.
1110

12-
Here's a code example that inserts a `Task` data object into the database:
11+
Here's a C++ code example that inserts a `Task` data object into the database:
1312

1413
obx::Box<Task> box(store);
1514
box.put({.text = "Buy milk"});
@@ -18,20 +17,26 @@ Note: `Task` is a `struct` representing a user defined data model - see [ObjectB
1817

1918
Some features
2019
-------------
21-
* ACID compliant object storage based on [FlatBuffers](https://google.github.io/flatbuffers/)
20+
* ACID compliant object storage ("object" as in class/struct instances)
21+
* Direct support for [FlatBuffers](https://google.github.io/flatbuffers/) data objects (aka "flatbuffers table")
2222
* Lightweight for smart devices; its binary size is only around 1 MB
2323
(special feature reduced versions with 1/3 - 1/2 size are available on request)
24-
* Zero-copy reads
24+
* Zero-copy reads for highest possible performance; access tens of millions of objects on commodity hardware
2525
* Secondary indexes based on object properties
26-
* Simple get/put API
2726
* Async API for asynchronous puts, inserts, updates, removes
2827
* Automatic model migration (no schema upgrade scripts etc.)
2928
* Powerful queries
3029
* Relations to other objects (1:N and M:N)
30+
* Optimized Time series types (TS edition only)
31+
* Data synchronization across the network (sync edition only)
3132

3233
Usage and Installation
3334
----------------------
34-
The C API comes as a single header in the [include/objectbox.h](include/objectbox.h) file.
35+
The APIs come as single header file for C and C++:
36+
37+
* C: [include/objectbox.h](include/objectbox.h)
38+
* C++: [include/objectbox-cpp.h](include/objectbox-cpp.h) (depends on objectbox.h)
39+
3540
Compile your code against it and use the binary library (.so, .dylib, .dll depending on the platform) to link against.
3641

3742
There are a couple of ways to get the library:
@@ -53,9 +58,11 @@ Details on the download.sh script:
5358

5459
C++ API
5560
-------
56-
The C++ API builds on top of the C API and comes as another single header in the [include/objectbox-cpp.h](include/objectbox-cpp.h) file.
57-
58-
Please check the [ObjectBox Generator](https://github.com/objectbox/objectbox-generator) project for a sample.
61+
The C++ API is built on top of the C API exposed by the library (e.g. you still need objectbox.h).
62+
You can also use both APIs from your code if need be.
63+
For example, you use the C++ `obx::Box` class for most database operations, but "break out" into the C API for a special function you need.
64+
Note that to use the `obx::Box` class, you also need the [ObjectBox Generator](https://github.com/objectbox/objectbox-generator) to generate binding code.
65+
In short, it generates "boiler plate" source code and maintains some metadata around the data model.
5966

6067
Examples & API Documentation
6168
----------------------------

0 commit comments

Comments
 (0)