Skip to content

Commit b1e5af0

Browse files
obx-viviengreenrobot
authored andcommitted
Initial mdx files
1 parent 5a9f708 commit b1e5af0

33 files changed

+18953
-340
lines changed

14.x

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.11.1

convert_gitbook_to_mdx.py

Lines changed: 1108 additions & 0 deletions
Large diffs are not rendered by default.

website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/README.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```bash
8+
```
9+
yarn
10+
```
11+
```
12+
13+
## Local Development
14+
15+
```bash
16+
```
17+
yarn start
18+
```
19+
```
20+
21+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
22+
23+
## Build
24+
25+
```bash
26+
```
27+
yarn build
28+
```
29+
```
30+
31+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
32+
33+
## Deployment
34+
35+
Using SSH:
36+
37+
```bash
38+
```
39+
USE_SSH=true yarn deploy
40+
```
41+
```
42+
43+
Not using SSH:
44+
45+
```bash
46+
```
47+
GIT_USER=<Your GitHub username> yarn deploy
48+
```
49+
```
50+
51+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

README.md renamed to website/docs/README.mdx

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,41 @@ description: >-
44
provide you with the easiest and fastest solution to store and retrieve data.
55
---
66

7+
import Tabs from "@theme/Tabs"
8+
import TabItem from "@theme/TabItem"
9+
10+
11+
712
# ObjectBox C / C++ Database
813

9-
{% hint style="info" %}
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
1018
Jobs: We're looking for a [C++ Developer](https://objectbox.io/jobs/objectbox-senior-c-plusplus-developer/) with a ❤️ for performant code
11-
{% endhint %}
19+
:::
1220

1321
Are you ready use ObjectBox? These two pages will get you up to speed:
1422

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 %}
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>
2242

2343
Alternatively, you can also dive into [some examples on GitHub](https://github.com/objectbox/objectbox-c/tree/main/examples) right away.
2444

@@ -28,7 +48,7 @@ Otherwise, feel free to open an issue on [GitHub ](https://github.com/objectbox/
2848

2949
## Latest Versions (Changelogs)
3050

31-
<div align="left"><img src="https://img.shields.io/github/v/release/objectbox/objectbox-c?style=for-the-badge" alt=""></div>
51+
<div align="left"><img src="https://img.shields.io/github/v/release/objectbox/objectbox-c?style=for-the-badge" alt=""/></div>
3252

3353
### 4.3.0 (2025-05-12)
3454

@@ -223,6 +243,6 @@ Provides native dynamic/shared library (.so/.dylib/.dll)
223243

224244
## ObjectBox Generator
225245

226-
<div align="left"><img src="https://img.shields.io/github/v/release/objectbox/objectbox-generator?style=for-the-badge" alt=""></div>
246+
<div align="left"><img src="https://img.shields.io/github/v/release/objectbox/objectbox-generator?style=for-the-badge" alt=""/></div>
227247

228-
Check the [ObjectBox Generator](https://github.com/objectbox/objectbox-generator/releases) releases for details.
248+
Check the [ObjectBox Generator](https://github.com/objectbox/objectbox-generator/releases) releases for details.

SUMMARY.md renamed to website/docs/SUMMARY.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import Tabs from "@theme/Tabs"
2+
import TabItem from "@theme/TabItem"
3+
4+
15
# Table of contents
26

37
* [ObjectBox C / C++ Database](README.md)
@@ -18,4 +22,4 @@
1822
* [C API docs](https://objectbox.io/docfiles/c/current/)
1923
* [Golang Database](https://golang.objectbox.io/)
2024
* [Swift Database](https://swift.objectbox.io/)
21-
* [Java Database](https://docs.objectbox.io/)
25+
* [Java Database](https://docs.objectbox.io/)

dev-tools-and-debugging.md renamed to website/docs/dev-tools-and-debugging.mdx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,16 @@ description: >-
55
information.
66
---
77

8+
import Tabs from "@theme/Tabs"
9+
import TabItem from "@theme/TabItem"
10+
11+
12+
813
# Dev Tools and Debugging
914

15+
ObjectBox has tools that help during development. Learn more about looking at data inside the database and how to enable debug logs for additional information.
16+
17+
1018
## Database Viewer
1119

1220
[ObjectBox Admin](https://docs.objectbox.io/data-browser) is a web-app that can be used to view inside the ObjectBox database. Since it is available as a Docker container with a developer-friendly front-end script you can use it right from a developer console to get insights into your database.\
@@ -24,11 +32,11 @@ Starting server on http://0.0.0.0:8081
2432

2533
Opening the URL `http://localhost:8081` with your browser will open the ObjectBox Admin UI:
2634

27-
<figure><img src="https://2056134408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LETufmyus5LFkviJjr4%2Fuploads%2F4l4B1wXLIHFxdoxtBEAn%2Fadmin-data.png?alt=media&#x26;token=b2faf98f-75a0-448b-8154-4cefcdcaa05f" alt=""><figcaption></figcaption></figure>
35+
<img src="https://2056134408-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LETufmyus5LFkviJjr4%2Fuploads%2F4l4B1wXLIHFxdoxtBEAn%2Fadmin-data.png?alt=media&#x26;token=b2faf98f-75a0-448b-8154-4cefcdcaa05f" alt="" /><figcaption></figcaption>
2836

29-
{% hint style="info" %}
37+
:::info
3038
See [ObjectBox Admin](https://docs.objectbox.io/data-browser) Documentation for further details and to download developer-friendly front-end launcher shell script.
31-
{% endhint %}
39+
:::
3240

3341
## Logging
3442

@@ -60,13 +68,12 @@ $ ./build/myapp
6068
[..]
6169
```
6270

63-
{% hint style="info" %}
71+
:::info
6472
See [C API Documentation of OBXDebugFlag](https://objectbox.io/docfiles/c/current/group\_\_c.html#gade842fb1271541e05f848925f32efa9d) for a list of available debug flags.&#x20;
65-
{% endhint %}
73+
:::
6674

67-
{% hint style="info" %}
75+
:::info
6876
ObjectBox also offers a **DebugLog** which gives insights at a very detail level. This is typically not used by an application end-user but might be helpful when things go wrong or when developing improvements, enhancements and features. \
6977
\
7078
This feature is not available in the public release but on request.
71-
{% endhint %}
72-
79+
:::

entity-annotations.md renamed to website/docs/entity-annotations.mdx

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@ description: >-
44
persist entities with entity annotations in this tutorial section.
55
---
66

7+
import Tabs from "@theme/Tabs"
8+
import TabItem from "@theme/TabItem"
9+
10+
11+
712
# Entity Annotations
813

14+
ObjectBox database persistence for C and C++ is based on objects. Learn how to persist entities with entity annotations in this tutorial section.
15+
16+
917
The source FlatBuffer schema can contain some ObjectBox-specific annotations, declared as specially formatted comments to `table` and `field` FlatBuffer schema elements.&#x20;
1018

1119
## Annotated schema example
1220

1321
Have a look at the following FlatBuffers schema example showing some ObjectBox annotations:
1422

15-
{% code title="schema.fbs" %}
16-
```
23+
```fbs title="schema.fbs"
1724
/// This entity is not annotated and serves as a relation target in this example
1825
table Simple {
1926
id:ulong;
@@ -48,19 +55,11 @@ table SharedInfo {
4855
...
4956
}
5057
```
51-
{% endcode %}
5258

5359
## Annotation format
54-
5560
To ensure that the annotations are recognized, follow these guidelines:
5661

57-
* Must be a comment immediately preceding an Entity or a Property (no empty lines between them).
58-
* The comment must start with three slashes so it's picked up by FlatBuffer schema parser as a "documentation".
59-
* Spaces between words inside the comment are skipped so you can use them for better readability if you like. See e.g. `Annotated`, `time`.
60-
* The comment must start with the text `objectbox:` and is followed by one or more annotations, separated by commas.
61-
* Each annotation has a name and some annotations also support specifying a value (some even require a value, e.g. the `name` annotation). See e.g. `Annotated`, `relId`.
62-
* Value, if present, is added to the annotation by adding an equal sign and the actual value.
63-
* A value may additionally be surrounded by double quotes but it's not necessary. See e.g. `fullName` showing both variants.
62+
6463

6564
## Supported annotations
6665

@@ -73,7 +72,7 @@ The following annotations are currently supported:
7372
* **uid** - used to explicitly specify UID used with this entity; used when renaming entities. See [Schema changes](schema-changes.md) for more details.
7473
* **relation** - adds a standalone (many-to-many) relation, usually to another entity. Example: creating a relation to the authors of a book: `objectbox:relation(name=authors,to=Author)`
7574
* **sync** - enables synchronization for the entity - only relevant with [ObjectBox Sync](https://objectbox.io/sync/) library builds. Entities not marked with this annotation will not be synchronized to the server, i.e. they're local-only.
76-
* `sync(sharedGlobalIds)` can be used to switch from the default behaviour (ID-mapping) to using a global ID space. This flag tells ObjectBox to treat object IDs globally and thus no ID mapping (local <-> global) is performed. Often this is used with `id(assignable)` annotation and some special ID scheme.
75+
* `sync(sharedGlobalIds)` can be used to switch from the default behaviour (ID-mapping) to using a global ID space. This flag tells ObjectBox to treat object IDs globally and thus no ID mapping (local `<->` global) is performed. Often this is used with `id(assignable)` annotation and some special ID scheme.
7776

7877
### **Property annotations**
7978

@@ -91,4 +90,4 @@ The following annotations are currently supported:
9190
* **name** - specifies the name to use in the database if it's desired to be different than what the FlatBuffer schema "field" is called.
9291
* **transient** - this property is skipped, no code is generated for it. Useful if you have custom FlatBuffer handling but still want to generate ObjectBox binding code for the entity.
9392
* **uid** - used to explicitly specify UID used with this property; used when renaming properties. See [Schema changes](schema-changes.md) for more details.
94-
* **unique** - set to enforce that values are unique before an entity is inserted/updated. A `put` operation will abort and return an error if the unique constraint is violated.
93+
* **unique** - set to enforce that values are unique before an entity is inserted/updated. A `put` operation will abort and return an error if the unique constraint is violated.

faq.md renamed to website/docs/faq.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,16 @@
22
description: Frequently asked questions about ObjectBox C and C++.
33
---
44

5+
import Tabs from "@theme/Tabs"
6+
import TabItem from "@theme/TabItem"
7+
8+
9+
510
# FAQ
611

12+
Frequently asked questions about ObjectBox C and C++.
13+
14+
715
## How do I distribute ObjectBox?
816

917
Don't forget to bundle the dynamic library (so/dylib/dll) with your program when distributing/packaging for a installer. Having the library in the same directory as your program binary should be enough for Windows. For other system, you might need to ensure the installation library to the system directory (`usr/lib` or `/usr/local/lib`) or one of the paths specified in`LD_LIBRARY_PATH`(Linux) or`DYLD_LIBRARY_PATH`(macOS).
@@ -14,4 +22,4 @@ Symptoms: error messages like "Could not put", "Storage error(code -30792)" indi
1422

1523
The 1 GB limit is a default, which can be changed via options. In C++ there's an `Option` class for that and in C there are `obx_opt_*()` functions. These options have to be prepared before opening the store.
1624

17-
To increase the DB limit, use [`obx::Options::maxDbSizeInKb(uint64_t sizeInKb)`](https://objectbox.io/docfiles/c/current/classobx\_1\_1Options.html#a1e18dbe2cc14998827b265dcc2956994) in C++. For C, it's [`obx_opt_max_db_size_in_kb(OBX_store_options *opt, uint64_t size_in_kb)`](https://objectbox.io/docfiles/c/current/group\_\_c.html#ga1a334d11e5a989ae3195c56a5bf0a3ea).
25+
To increase the DB limit, use [`obx::Options::maxDbSizeInKb(uint64_t sizeInKb)`](https://objectbox.io/docfiles/c/current/classobx\_1\_1Options.html#a1e18dbe2cc14998827b265dcc2956994) in C++. For C, it's [`obx_opt_max_db_size_in_kb(OBX_store_options *opt, uint64_t size_in_kb)`](https://objectbox.io/docfiles/c/current/group\_\_c.html#ga1a334d11e5a989ae3195c56a5bf0a3ea).

generator.md renamed to website/docs/generator.mdx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,27 @@ description: >-
44
ObjectBox.
55
---
66

7+
import Tabs from "@theme/Tabs"
8+
import TabItem from "@theme/TabItem"
9+
10+
11+
712
# Generator
813

9-
{% hint style="info" %}
14+
This is the reference guide on the ObjectBox Generator, a build-time tool for ObjectBox.
15+
16+
17+
:::info
1018
For an intro to the generator, see also the [installation guide](installation.md#objectbox-generator) and [Generating Binding Code](getting-started.md#generating-binding-code).
11-
{% endhint %}
19+
:::
1220

1321
When using ObjectBox within your project, you typically need two things: the runtime library and the the build-time ObjectBox Generator. The generator takes a data model (see [Entity Annotations](entity-annotations.md)) as input and generates `struct`s, a data model representation as code and additional glue code for a tight and fast integration of your individual data types and the ObjectBox API.
1422

1523
If you are using CMake, it's highly recommended to use the CMake integration of the ObjectBox Generator. For all other setups, triggering the generator in [standalone mode](generator.md#standalone) is also supported.
1624

17-
{% hint style="info" %}
25+
:::info
1826
The ObjectBox Generator binary is currently not available for Linux/Windows ARM architectures (pull requests are welcome). The macOS as universal binary supports ARM64 and AMD64 architectures.
19-
{% endhint %}
27+
:::
2028

2129
## CMake Integration
2230

@@ -87,9 +95,9 @@ The CMake module is implicitly downloaded together with objectbox shared librari
8795
\
8896
The latest version of the find module is also available from [https://raw.githubusercontent.com/objectbox/objectbox-generator/main/cmake/FindObjectBoxGenerator.cmake](https://raw.githubusercontent.com/objectbox/objectbox-generator/main/cmake/FindObjectBoxGenerator.cmake)
8997

90-
{% hint style="info" %}
98+
:::info
9199
Automatic download of ObjectBox-Generator executables can be disabled via CMake Option `OBX_GENERATOR_ALLOW_FETCH` set to `FALSE`.
92-
{% endhint %}
100+
:::
93101

94102
The generator repository provides a CMake find module for `find_package` .
95103

@@ -210,4 +218,4 @@ Available flags:
210218
m
211219
212220
213-
```
221+
```

0 commit comments

Comments
 (0)