Releases: objectbox/objectbox-dart
v2.2.0
-
For Flutter apps running on Android 6 (or older): added
loadObjectBoxLibraryAndroidCompat()
to
objectbox_flutter_libs
(andobjectbox_sync_flutter_libs
). Use this to fix loading the
ObjectBox library on these devices.Let us know if this works for you in #369!
We might consider calling this automatically in a future release. -
Improve code generator performance if there are many entities with many constructor parameters.
-
Throw
StateError
instead of crashing on closedBox
,Query
andPropertyQuery
. -
Export query property classes to make them usable in user code.
-
Resolve an issue where unexpected data was returned when doing a read operation in an entity constructor or property setter. #550
In this release objectbox_flutter_libs
ships with objectbox-android 3.5.1
and ObjectBox pod 1.8.1
.
v2.1.0
-
Support for integer and floating point lists: store 8-bit, 16-bit, 32-bit and 64-bit integer
lists as well as 32-bit and 64-bit floating point lists (called "vectors" by ObjectBox).Use a
typed_data
class likeInt16List
,Uint16List
orFloat32List
for large lists, it uses
less memory and CPU. Otherwise just use a Dart number list.A simple example is a shape entity that stores a palette of RGB colors:
@Entity() class Shape { @Id() int id = 0; // An array of RGB color values that are used by this shape. Int32List? palette; }
This can also be useful to store vector embeddings produced by machine learning:
@Entity() class ImageEmbedding { @Id() int id = 0; // Link to the actual image, e.g. on Cloud storage String? url; // The coordinates computed for this image (vector embedding) @Property(type: PropertyType.floatVector) List<double>? coordinates; }
Note: for queries currently only the
isNull
andnotNull
conditions are supported. -
Changed
PropertyType.char
from a 8-bit signed integer to a 16-bit unsigned integer to match the
ObjectBox database type. -
Fix put returning an incorrect error message in a rare case.
-
Require at least Dart SDK 2.18 (shipped with Flutter 3.3.0).
-
Let
Store.awaitQueueCompletion
actually wait on the async queue to become idle. It previously
behaved likeStore.awaitQueueSubmitted
. -
Fix analysis event send failure breaking the code generator. #542
In this release objectbox_flutter_libs
ships with objectbox-android 3.5.1
and ObjectBox pod 1.8.1
.
v2.0.0
To upgrade to this major release run flutter pub upgrade objectbox --major-versions
(or for Dart Native apps dart pub upgrade objectbox --major-versions
).
- Breaking changes to generated code: run
flutter pub run build_runner build
(ordart run build_runner build
for Dart Native apps) after updating! - Added and updated async APIs in
Box
:- new
getAsync
,getManyAsync
,getAllAsync
, - new
putAsync
andputManyAsync
which support objects with relations, - renamed the former
putAsync
toputQueuedAwaitResult
, - new
putAndGetAsync
andputAndGetManyAsync
which return a copy of the given objects with new
IDs set. - new
removeAsync
,removeManyAsync
andremoveAllAsync
.
- new
- Add new async
Query
APIs:findAsync
,findFirstAsync
,findUniqueAsync
,findIdsAsync
and
removeAsync
. - Support sending objects containing
ToOne
andToMany
across isolates, e.g. when using
store.runInTransactionAsync
. #340 Store.attach
(andStore.fromReference
) do not longer accept a null model, which was not
supported anyhow.- Breaking change: renamed
store.awaitAsyncSubmitted
andawaitAsyncCompletion
to
awaitQueueSubmitted
andawaitQueueCompletion
to avoid any mix-up with the new async methods. - Removed deprecated
Store.runIsolated
. - Require at least Dart SDK 2.15 (shipped with Flutter 2.8.0).
In this release objectbox_flutter_libs
ships with objectbox-android 3.5.1
and ObjectBox pod 1.8.1
.
v1.7.2
- Flutter Linux apps do not longer fail to run due to the shared ObjectBox C library not loading. #504
- Fixes writes failing with "Storage error (code -30786)", which may occur in some corner cases on
iOS and some Android devices. #485 - Update: objectbox-c 0.18.1.
- Update: objectbox-swift 1.8.1.
- Update: objectbox-android 3.5.1.
If you are using Admin, make sure to update yourobjectbox-android-objectbrowser
dependency to3.5.1
.
We're hiring! 😎 We believe resource-efficient coding is still cool and are looking for a C / C++ developer who shares our sentiment.
v1.7.0
- Support more concise method chaining when using a sort order with a query:
// BEFORE final query = (box.query()..order(Person_.name)).build(); // AFTER final query = box.query().order(Person_.name).build();
- Allow
analyzer
with major version 5. #487 - Generator not longer warns that it can not find the package source root if the output directory is
the package root directory. - Query: add
.containsElement
, deprecate.contains
condition forList<String>
. #481 - Add
StorageException
which is aObjectBoxException
with anerrorCode
(aOBX_ERROR
code). - Throw
DbFullException
instead ofObjectBoxException
with message10101 Could not put
(error
codeOBX_ERROR_DB_FULL
). - Change
Query.findUnique()
to throwNonUniqueResultException
instead of
UniqueViolationException
if there is more than one result. - Update: objectbox-c 0.18.0.
- Update: objectbox-android 3.5.0. If you are using Admin, make sure to update your
objectbox-android-objectbrowser
dependency. - Update: objectbox-swift 1.8.1-rc.
- (Data) Sync only: protocol updates improving efficiency. Reach out via your existing contact to check if any actions are required for your setup.
v1.6.2
- Revert to objectbox-android 3.2.0 to restore query functionality (#460). If you are using Admin, make sure to update your
objectbox-android-objectbrowser
dependency. - Generator messages should be more helpful, provide code location when possible and link to docs.
v1.6.1
- Store: add option to pass debug flags. #134
- Add
// coverage:ignore-file
to generated objectbox.g.dart skipping this file from coverage test. - Increase supported
analyzer
to v4. #443 - Update documentation on
Query
streams usingwatch
to highlight it is a single-subscription
stream that can only be listened to once. Also updated code examples to not imply the stream is
re-usable. - Update: objectbox-android 3.2.1.
v1.6.0
- Require at least Dart SDK 2.14 (shipped with Flutter 2.5.0).
- When using the "All Exceptions" debug option in Visual Studio Code there is no longer an exception
when initializing ObjectBox. #252 - Update: objectbox-c 0.17.0.
- Update: objectbox-android 3.2.0.
v1.5.0
- Add
Store.runInTransactionAsync
to run database operations asynchronously in the background (requires Flutter 2.8.0/Dart 2.15.0 or newer). #415 - Rename
Store.runIsolated
torunAsync
, drop unusedmode
parameter, propagate errors and handle premature isolate exit. #415 - The native ObjectBox library is also searched for in the
lib
subfolder on desktop OS (macOS, Linux, Windows). This is where theinstall.sh
script downloads it by default.
E.g. it is no longer necessary to install the library globally to rundart test
orflutter test
. - Windows: Support database directory paths that contain unicode (UTF-8) characters. #406
- Changed
Query.stream
to collect results in a worker isolate, which should typically be faster. #420 - Update: objectbox-c 0.16.0.
- Update: objectbox-android 3.1.3.
- Add new task with tag list Flutter example app that shows how to use relations. #419