Android Database - first and fast, lightweight on-device vector database
APACHE-2.0 License
Bot releases are hidden (Show)
See the 2.8.0 release notes for the latest changes.
Query.findLazy()
and Query.findLazyCached()
work with LazyList
#906).@Index
and @Id
errors. #902DbExceptionListener
by accepting null values for BoxStore.setDbExceptionListener(listener)
.BoxStoreBuilder.build()
to allow retries. For example, after a FileCorruptException
you could try to open the database again using the recently added usePreviousCommit()
option.PagesCorruptException
as a special case of FileCorruptException
.DbExceptionListener
is called more robustly.Published by greenrobot-team over 4 years ago
See changelogs for details.
Published by greenrobot-team over 4 years ago
@DefaultValue("")
annotation. Annotated properties will return the specified default value (currently only ""
is supported) instead of null. This is useful if a not-null property is added to an entity, but there are existing entities in the database that will return null for the new property.@AbsentValue("")
. #157objectbox-rxjava3
. Also includes Kotlin extension functions to more easily obtain Rx types, e.g. use query.observable()
to get an Observable
. #83Changes since 2.6.0-RC (released on 2020/04/28):
objectbox-java
no longer exposes the greenrobot-essentials and FlatBuffers dependencies to consuming projects.See the full changelog for more details.
Note: this is a preview release. Future releases may add, change or remove APIs.
and()
or or()
. #834String[]
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.@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.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).objectbox-rxjava3
. In addition, objectbox-kotlin
adds extension functions to more easily obtain Rx types, e.g. use query.observable()
to get an Observable
. #839To 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
.
Note: this is a preview release. Future releases may add, change or remove APIs.
To use this release change the version of objectbox-gradle-plugin
to 3.0.0-alpha1
and add a dependency on objectbox-java
version 3.0.0-alpha1
.
buildscript {
dependencies {
classpath "io.objectbox:objectbox-gradle-plugin:3.0.0-alpha1"
}
}
dependencies {
implementation "io.objectbox:objectbox-java:3.0.0-alpha1"
// 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. However, if your project explicitly depends on them they will pull in version 2.5.1 of objectbox-java
. Make sure to add an explicit dependency on of objectbox-java
version 3.0.0-alpha1
as mentioned above.
Support Android Gradle Plugin 3.6.0. #817
Support for incremental annotation processing. #620
It is off by default. To turn it on set objectbox.incremental
to true in build.gradle
:
android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = [ "objectbox.incremental" : "true" ]
}
}
}
}
This release has mainly quality of life improvements and resolves reported issues.
Android: after updating to this version your app might require changes before it can build successfully. See the upgrade notes for details: https://docs.objectbox.io/#v-2-4-0-2019-10-15
Release notes: https://docs.objectbox.io/