Releases: objectbox/objectbox-dart
v2.2.1
- Resolve an issue where not all query results are returned, when an entity constructor or property
setter itself executes a query. #550
In this release objectbox_flutter_libs ships with objectbox-android 3.5.1 and ObjectBox pod 1.8.1.
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
StateErrorinstead of crashing on closedBox,QueryandPropertyQuery. -
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_dataclass likeInt16List,Uint16ListorFloat32Listfor 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
isNullandnotNullconditions are supported. -
Changed
PropertyType.charfrom 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.awaitQueueCompletionactually 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 buildfor Dart Native apps) after updating! - Added and updated async APIs in
Box:- new
getAsync,getManyAsync,getAllAsync, - new
putAsyncandputManyAsyncwhich support objects with relations, - renamed the former
putAsynctoputQueuedAwaitResult, - new
putAndGetAsyncandputAndGetManyAsyncwhich return a copy of the given objects with new
IDs set. - new
removeAsync,removeManyAsyncandremoveAllAsync.
- new
- Add new async
QueryAPIs:findAsync,findFirstAsync,findUniqueAsync,findIdsAsyncand
removeAsync. - Support sending objects containing
ToOneandToManyacross 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.awaitAsyncSubmittedandawaitAsyncCompletionto
awaitQueueSubmittedandawaitQueueCompletionto 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-objectbrowserdependency 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
analyzerwith 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.containscondition forList<String>. #481 - Add
StorageExceptionwhich is aObjectBoxExceptionwith anerrorCode(aOBX_ERRORcode). - Throw
DbFullExceptioninstead ofObjectBoxExceptionwith message10101 Could not put(error
codeOBX_ERROR_DB_FULL). - Change
Query.findUnique()to throwNonUniqueResultExceptioninstead of
UniqueViolationExceptionif 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-objectbrowserdependency. - 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-objectbrowserdependency. - 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-fileto generated objectbox.g.dart skipping this file from coverage test. - Increase supported
analyzerto v4. #443 - Update documentation on
Querystreams usingwatchto 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.runInTransactionAsyncto run database operations asynchronously in the background (requires Flutter 2.8.0/Dart 2.15.0 or newer). #415 - Rename
Store.runIsolatedtorunAsync, drop unusedmodeparameter, propagate errors and handle premature isolate exit. #415 - The native ObjectBox library is also searched for in the
libsubfolder on desktop OS (macOS, Linux, Windows). This is where theinstall.shscript downloads it by default.
E.g. it is no longer necessary to install the library globally to rundart testorflutter test. - Windows: Support database directory paths that contain unicode (UTF-8) characters. #406
- Changed
Query.streamto 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