Skip to content

Releases: objectbox/objectbox-dart

v2.2.0

08 Aug 15:06
Compare
Choose a tag to compare
  • For Flutter apps running on Android 6 (or older): added loadObjectBoxLibraryAndroidCompat() to
    objectbox_flutter_libs (and objectbox_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 closed Box, Query and PropertyQuery.

  • 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

13 Jun 12:02
Compare
Choose a tag to compare
  • 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 like Int16List, Uint16List or Float32List 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 and notNull 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 like Store.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

21 Mar 10:41
Compare
Choose a tag to compare

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
    (or dart run build_runner build for Dart Native apps) after updating!
  • Added and updated async APIs in Box:
    • new getAsync, getManyAsync, getAllAsync,
    • new putAsync and putManyAsync which support objects with relations,
    • renamed the former putAsync to putQueuedAwaitResult,
    • new putAndGetAsync and putAndGetManyAsync which return a copy of the given objects with new
      IDs set.
    • new removeAsync, removeManyAsync and removeAllAsync.
  • Add new async Query APIs: findAsync, findFirstAsync, findUniqueAsync, findIdsAsync and
    removeAsync.
  • Support sending objects containing ToOne and ToMany across isolates, e.g. when using
    store.runInTransactionAsync. #340
  • Store.attach (and Store.fromReference) do not longer accept a null model, which was not
    supported anyhow.
  • Breaking change: renamed store.awaitAsyncSubmitted and awaitAsyncCompletion to
    awaitQueueSubmitted and awaitQueueCompletion 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

31 Jan 12:57
Compare
Choose a tag to compare

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

15 Dec 14:54
Compare
Choose a tag to compare
  • 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 for List<String>. #481
  • Add StorageException which is a ObjectBoxException with an errorCode (a OBX_ERROR code).
  • Throw DbFullException instead of ObjectBoxException with message 10101 Could not put (error
    code OBX_ERROR_DB_FULL).
  • Change Query.findUnique() to throw NonUniqueResultException 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

24 Aug 09:08
Compare
Choose a tag to compare
  • 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

22 Aug 14:26
Compare
Choose a tag to compare
  • 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 using watch 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

27 Jun 12:52
Compare
Choose a tag to compare
  • 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

11 May 09:50
Compare
Choose a tag to compare
  • 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 to runAsync, drop unused mode 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 the install.sh script downloads it by default.
    E.g. it is no longer necessary to install the library globally to run dart test or flutter 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

v1.4.1

01 Mar 14:35
Compare
Choose a tag to compare
  • Resolve "another store is still open" issue after Flutter hot restart (hot reload continues to work). #387
  • Add Store.isClosed(). #390
  • Add note to objectbox.g.dart on how to re-generate (update) it.