Skip to content

Commit a30d20c

Browse files
committed
README.md: changes mostly related to language
1 parent 1a6ba6e commit a30d20c

File tree

1 file changed

+24
-16
lines changed

1 file changed

+24
-16
lines changed

README.md

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
1-
# ObjectBox for Dart/Flutter
2-
ObjectBox for Dart is a standalone database storing Dart objects locally with strong ACID semantics.
3-
4-
## Help wanted
5-
ObjectBox for Dart is still in a prototype stage supporting only the most basic database tasks like putting and getting objects.
6-
The ObjectBox core however supports many more features, e.g. queries, indexing, async operations, transaction control.
1+
ObjectBox for Dart/Flutter
2+
==========================
3+
ObjectBox for Dart is a standalone database storing Dart objects locally, with strong ACID semantics.
4+
5+
Help wanted
6+
-----------
7+
ObjectBox for Dart is still in a prototype stage supporting only the most basic database tasks, like putting and getting objects.
8+
However, the ObjectBox core supports many more features, e.g. queries, indexing, async operations, transaction control.
79
To bring all these features to Dart, we're asking the community to help out. PRs are more than welcome!
810
The ObjectBox team will try its best to guide you and answer questions.
911

10-
Also, please let us know your feedback and open an issue: for example, if you experience errors or if you have ideas to how to improve the API.
12+
Also, please let us know your feedback by opening an issue:
13+
for example, if you experience errors or if you have ideas for how to improve the API.
1114
Thanks!
1215

13-
## Getting started
14-
To try out the demo code in this repository, do the following:
16+
Getting started
17+
---------------
18+
To try out the demo code in this repository, follow these:
19+
1520
1. Install [objectbox-c](https://github.com/objectbox/objectbox-c) system-wide: `bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/master/download.sh)` (answer Y when it asks about installing to /usr/lib).
1621
2. Back in this repository, run `pub get` to download all Dart dependencies.
1722
3. Finally run `dart test/test.dart` to start the demo script.
1823
Note that, as fairly recent language features are used, the minimal required Dart version is 2.2.2.
1924

20-
## Dart integration
21-
In general, Dart class annotations are used in order to design ObjectBox entities in the most intuitive way possible.
25+
Dart integration
26+
----------------
27+
In general, Dart class annotations are used to mark classes as ObjectBox entities and provide meta information.
2228
Note that right now, only a limited set of types is supported; this will be expanded upon in the near future.
23-
Entity IDs and UIDs defined in their respective annotations need to be unique across all entities, while property IDs only need to be unique in their respective entity; property UIDs also need to be globally unique.
29+
Entity IDs and UIDs that are defined in their respective annotations need to be unique across all entities, while property IDs only need to be unique in their respective entity; property UIDs also need to be globally unique.
2430

2531
All non-annotated class instance variables are ignored by ObjectBox.
2632

2733
### Object IDs
34+
2835
Each entity is required to have an _Id_ property of type _Long_.
2936
Already persisted entities have an ID greater or equal to 1.
3037
New (not yet persisted) objects typically have _Id_ value of `0` or `null`: calling `Box.put` automatically assigns a new ID to the object.
@@ -50,7 +57,7 @@ class Note {
5057
```
5158

5259
In your main function, you can then create a _store_ which needs an array of your entity classes to be constructed.
53-
Finally, you need a _box_, i.e. an interface to objects of one specific entity type contained in the store it is connected to.
60+
Finally, you need a _box_, representing the interface for objects of one specific entity type.
5461

5562
```dart
5663
var store = Store([Note]);
@@ -64,11 +71,12 @@ print("refetched note: ${box.getById(note.id)}");
6471
store.close();
6572
```
6673

67-
## Basic technical approach
74+
Basic technical approach
75+
------------------------
6876
ObjectBox offers a [C API](https://github.com/objectbox/objectbox-c) which can be called by [Dart FFI](https://dart.dev/server/c-interop).
69-
The C API is is also used by [ObjectBox Go](https://github.com/objectbox/objectbox-go) and the minimal [Python binding](https://github.com/objectbox/objectbox-python) (the [Swift binding](https://github.com/objectbox/objectbox-swift) will soon follow).
77+
The C API is is also used by the ObjectBox language bindings for [Go](https://github.com/objectbox/objectbox-go), [Swift](https://github.com/objectbox/objectbox-swift), and [Python](https://github.com/objectbox/objectbox-python).
7078
These language bindings currently serve as an example for this Dart implementation.
7179

7280
Internally, ObjectBox uses [FlatBuffers](https://google.github.io/flatbuffers/) to store objects.
73-
There are two basic ways make the conversion: generated binding code or implicit FlatBuffers conversion.
81+
There are two basic ways to make the conversion: generated binding code, or implicit FlatBuffers conversion.
7482
In order to require as little setup as possible and to define entity classes directly in Dart code, the latter is used in this binding.

0 commit comments

Comments
 (0)