Skip to content

V3.0.0-alpha2

Pre-release
Pre-release
Compare
Choose a tag to compare
@greenrobot-team greenrobot-team released this 24 Mar 13:59
· 75 commits to master since this release

Note: this is a preview release. Future releases may add, change or remove APIs.

  • Add Kotlin infix extension functions for creating conditions using the new Query API. See the documentation for examples.
  • The old Query API now also supports setting an alias after combining conditions using and() or or(). #834
  • Add documentation that string property conditions ignore case by default. Point to using case-sensitive conditions for high-performance look-ups, e.g. when using string UIDs.
  • Java's String[] and Kotlin's Array<String> are now a supported database type. A converter is no longer necessary to store these types. Using the arrayProperty.equal("item") condition, it is possible to query for entities where "item" is equal to one of the array items.
  • Support @Unsigned to indicate that values of an integer property (e.g. Integer and Long in Java) should be treated as unsigned when doing queries or creating indexes. See the Javadoc of the annotation for more details.
  • Support marking 64-bit integer properties (e.g. Long in Java) with @Type(DateNano) to indicate the database should treat these values as time with nanosecond precision. Note: to store time in millisecond precision continue to use java.util.Date (without annotation). This is not ready, yet.
  • Add new library to support RxJava 3, objectbox-rxjava3. In addition, objectbox-kotlin adds extension functions to more easily obtain Rx types, e.g. use query.observable() to get an Observable. #839

To use this release change the version of objectbox-gradle-plugin to 3.0.0-alpha2. The plugin now properly adds the preview version of objectbox-java to your dependencies.

buildscript {
    dependencies {
        classpath "io.objectbox:objectbox-gradle-plugin:3.0.0-alpha2"
    }
}

dependencies {
    // Artifacts with native code remain at 2.5.1.
    implementation "io.objectbox:objectbox-android:2.5.1"
}

The objectbox-android, objectbox-linux, objectbox-macos and objectbox-windows artifacts shipping native code remain at version 2.5.1 as there have been no changes. If you explicitly include them, make sure to specify their version as 2.5.1.