objectbox.g library

Classes

Admin
ObjectBox Admin allows you to explore the database in a regular web browser.
AllDocViewDocMetaEntity_
AllDocViewDocMetaEntity entity fields to define ObjectBox queries.
AllDocViewKeyMetaEntity_
AllDocViewKeyMetaEntity entity fields to define ObjectBox queries.
An annotation for a ToMany field of an Entity class to create a relation based on another relation. See Backlink.new.
Box<T>
A Box instance gives you access to objects of a particular type. You get Box instances via Store.box() or Box(Store).
Condition<EntityT>
A Query condition base class.
DebugFlags
Passed as debugFlags when calling Store.new to enable debug options.
DocEntity_
DocEntity entity fields to define ObjectBox queries.
Entity
An annotation to mark a class as an ObjectBox Entity. See Entity.new.
ExternalName
An annotation to specify the name of an Entity class or field of an Entity class in an external system. See ExternalName.new.
ExternalType
An annotation to specify the type of a field in an Entity class in an external system. See ExternalType.new.
HnswFlags
Flags as a part of the HnswIndex configuration.
HnswIndex
An annotation to create an HSNW index for a field of an Entity class. See HnswIndex.new.
Id
An annotation to mark a field of an Entity class as the ID property. See Id.new.
IdWithScore
Wraps the ID of a matching object and a score when using Query.findIdsWithScores.
Index
An annotation to create an index for a field of an Entity class. See Index.new.
LocalDocEntity_
LocalDocEntity entity fields to define ObjectBox queries.
ObjectWithScore<T>
Wraps a matching object and a score when using Query.findWithScores.
Order
Groups query order flags.
Property
An optional annotation to configure how a field of an Entity class is stored. See Property.new.
PropertyQuery<T>
Property query base.
Query<T>
A repeatable Query returning the latest matching Objects.
QueryBacklinkToMany<Source, Target>
QueryBooleanProperty<EntityT>
QueryBuilder<T>
Query builder allows creating reusable queries.
QueryByteVectorProperty<EntityT>
QueryDateNanoProperty<EntityT>
This wraps QueryIntegerProperty for DateTime properties annotated with @Property(type: PropertyType.dateNano) to avoid having to manually convert to nanoseconds (DateTime.microsecondsSinceEpoch * 1000) when creating query conditions.
QueryDateProperty<EntityT>
This wraps QueryIntegerProperty for DateTime properties to avoid having to manually convert to DateTime.millisecondsSinceEpoch when creating query conditions.
QueryDoubleProperty<EntityT>
QueryDoubleVectorProperty<EntityT>
For double vectors greater and less queries are supported on elements of the vector (e.g. "has element greater").
QueryHnswProperty<EntityT>
Provides extra conditions for float vector properties with an HnswIndex.
QueryIntegerProperty<EntityT>
QueryIntegerVectorProperty<EntityT>
For integer vectors (excluding QueryByteVectorProperty) greater, less and equal are supported on elements of the vector (e.g. "has element greater").
QueryProperty<EntityT, DartType>
The QueryProperty types allow users to build query conditions on a property.
QueryRelationToMany<Source, Target>
QueryRelationToOne<Source, Target>
QueryStringProperty<EntityT>
QueryStringVectorProperty<EntityT>
SequenceEntity_
SequenceEntity entity fields to define ObjectBox queries.
Store
Represents an ObjectBox database and works together with Box to allow getting and putting.
Sync
ObjectBox Sync makes data available and synchronized across devices, online and offline.
SyncChange
Sync incoming data event.
SyncClient
Sync client is used to connect to an ObjectBox sync server. Use through Sync.
SyncCredentials
Credentials used to authenticate a sync client against a server.
ToMany<EntityT>
A to-many relation of an entity that references multiple objects of a "target" entity EntityT.
ToOne<EntityT>
A to-one relation of an entity that references one object of a "target" entity EntityT.
Transient
An annotation to mark a field of an Entity class that should not be stored. See Transient.new.
Unique
An annotation to create a unique index for a field of an Entity class. See Unique.new.
UtilsEntity_
UtilsEntity entity fields to define ObjectBox queries.
Version
Wrapper for a semantic version information.
ViewDocMetaEntity_
ViewDocMetaEntity entity fields to define ObjectBox queries.
ViewKeyMetaEntity_
ViewKeyMetaEntity entity fields to define ObjectBox queries.
ViewMetaEntity_
ViewMetaEntity entity fields to define ObjectBox queries.

Enums

ConflictStrategy
Used with Unique to specify the conflict resolution strategy.
ExternalPropertyType
A property type of an external system (e.g. another database) that has no default mapping to an ObjectBox type.
IndexType
IndexType can be used to change what type ObjectBox uses when indexing a property.
PropertyType
Use with Property.type.
PutMode
Box put (write) mode.
SyncConnectionEvent
Connection state change event.
SyncLoginEvent
Login state change event.
SyncRequestUpdatesMode
Configuration of how SyncClient fetches remote updates from the server.
SyncState
Current state of the SyncClient.
TxMode
Configure transaction mode. Used with Store.runInTransaction().
VectorDistanceType
The vector distance algorithm used by an HnswIndex (vector search).

Extensions

DoublePropertyQuery on PropertyQuery<double>
"Property query" for a double field. Created by Query.property().
IntegerPropertyQuery on PropertyQuery<int>
"Property query" for an integer field. Created by Query.property().
ObservableStore on Store
StreamController implementation inspired by the sample controller sample at: https://dart.dev/articles/libraries/creating-streams#honoring-the-pause-state https://dart.dev/articles/libraries/code/stream_controller.dart
QueryParamBool on QueryParam<bool>
QueryParam for boolean properties
QueryParamBytes on QueryParam<List<int>>
QueryParam for byte vector properties
QueryParamDouble on QueryParam<double>
QueryParam for double properties
QueryParamInt on QueryParam<int>
QueryParam for int properties
QueryParamString on QueryParam<String>
QueryParam for string properties
QuerySetParam on Query
Adds capabilities to set query parameters
StringPropertyQuery on PropertyQuery<String>
"Property query" for a string field. Created by Query.property().

Functions

getObjectBoxModel() → ModelDefinition
Returns the ObjectBox model definition for this project for use with obx.Store.new.
openStore({String? directory, int? maxDBSizeInKB, int? maxDataSizeInKB, int? fileMode, int? maxReaders, bool queriesCaseSensitiveDefault = true, String? macosApplicationGroup}) Future<Store>
Shortcut for obx.Store.new that passes getObjectBoxModel and for Flutter apps by default a directory using defaultStoreDirectory() from the ObjectBox Flutter library.

Exceptions / Errors

DbFileCorruptException
Errors were detected in a database file, e.g. illegal values or structural inconsistencies.
DbFullException
Thrown when applying a transaction (e.g. putting an object) would exceed the maxDBSizeInKB configured when calling Store.new.
DbMaxDataSizeExceededException
Thrown when applying a transaction would exceed the maxDataSizeInKByte configured when calling Store.new.
DbMaxReadersExceededException
Thrown when the maximum amount of readers (read transactions) was exceeded.
DbPagesCorruptException
Errors related to pages were detected in a database file, e.g. bad page refs outside of the file.
DbShutdownException
Thrown when an error occurred that requires the store to be closed.
NonUniqueResultException
Thrown if Query.findUnique() is called, but the query matches more than one object.
NumericOverflowException
Thrown if a property query aggregate function (e.g. sum()) can not compute a result due to a number type overflowing.
ObjectBoxException
ObjectBox database exception.
SchemaException
Thrown when there is an error with the data schema (data model).
StorageException
ObjectBox database exception with an OBX_ERROR code.
UniqueViolationException
A unique constraint would have been violated by this database operation.