internal library
This library serves as an entrypoint for generated code and objectbox tools. Don't import into your own code, use 'objectbox.dart' instead.
Classes
- BacklinkSource
- Contains either a source property (backlink from to-one) or a source relation (backlink from to-many).
- BacklinkSourceProperty
- BacklinkSourceRelation
-
EntityDefinition<
T> - Used by the generated code as a container for model loading callables
- Float32ListReader
- Reads a list of 32-bit floating points as a Float32List.
- Float64ListReader
- Reads a list of 64-bit floating points as a Float64List.
- IdUid
- IdUid represents a compound of an ID, which is locally unique, i.e. inside an entity, and a UID, which is globally unique, i.e. for the entire model.
- Int16ListReader
- Reads a list of signed 16-bit integers as a Int16List.
- Int32ListReader
- Reads a list of signed 32-bit integers as a Int32List.
- Int64ListReader
- Reads a list of signed 64-bit integers as a Int64List.
- InternalStoreAccess
- Internal only.
- InternalToManyAccess
- Internal only.
-
InternalToManyTestAccess<
EntityT> - Internal only.
- ModelBacklink
- ModelBacklink describes a relation backlink
- ModelDefinition
- ModelEntity
- ModelEntity describes an entity of a model.
- ModelEntityKey
- Map keys for properties of this entity.
- ModelHnswParams
- Describes HNSW index parameters for a float vector property.
- ModelInfo
-
In order to represent the model stored in
objectbox-model.jsonin Dart, several classes have been introduced. Conceptually, these classes are comparable to how models are handled in ObjectBox Java and ObjectBox Go. This is also why for explanations on most concepts related to ObjectBox models, you can refer to https://docs.objectbox.io/advanced. - ModelProperty
- ModelProperty describes a single property of an entity.
- ModelPropertyKey
- Map keys for properties of this property.
- ModelRelation
- ModelRelation describes a standalone relation
- ModelRelationKey
- Map keys for properties of this relation.
- OBXEntityFlags
- Bit-flags defining the behavior of entities. Note: Numbers indicate the bit position
- OBXExternalPropertyType
- A property type of an external system (e.g. another database) that has no default mapping to an ObjectBox type. External property types numeric values start at 100 to avoid overlaps with ObjectBox's PropertyType. (And if we ever support one of these as a primary type, we could share the numeric value?)
- OBXHnswBuildLevel
- Build levels define the essential parameters for building the HNSW graph; see obx_model_property_index_hnsw_build_level(). Start with the default L4_Balanced and adjust from there if you want to optimize the graph further. The trade-off is the graph's build time and memory against search quality (recall) and speed. In HNSW terms, this defines the neighbors per node ("M") and the indexing search count ("efConstruction") together. Unlike the search level, this applies when vectors are inserted (indexed); thus, a changed build level requires re-indexing (rebuilding the entire graph, which can be time-consuming). Higher levels pay off on "hard" data only (e.g. GloVe word embeddings), where the default graph limits the recall even at the highest search levels (OBXHnswSearchLevel); on "easy" data, which reaches a high recall already with the default, they cost build time, memory and search speed. The values' comments give the underlying M and efConstruction values (these may change in future versions; existing indexes keep the values they were built with), which you can use as a starting point if you want to optimize them further.
- OBXHnswFlags
- Bit-flags to influence the behavior of HNSW index (vector search).
- OBXHnswQuantType
- Quantization (compression) of the vectors held in memory for the HNSW index (vector search). This only affects the in-memory representation: the vectors persisted on disk always stay unchanged, thus changing the quantization requires no data migration and no re-indexing. The search level (OBXHnswSearchLevel) selects how searches explore and rescore candidates; each quantization type has its own measured levels.
- OBXHnswSearchLevel
- Search levels of a HNSW index: the preferred way to trade search speed for quality (recall); see obx_query_param_vector_search_level(). Start from L4_Balanced and adjust from there if you want to optimize the speed/quality trade-off. The levels range from the fastest search (lowest recall) to the highest recall (slowest search); each level costs roughly 1.3-2x the time of the previous one. With quantization, levels 1-3 do not rescore, so their result distances are estimates; levels 4 and higher rescore (TurboQuant1, TurboQuant1_5 and TurboQuant2 already rescore at level 3). Queries without a level search at the index's level (obx_model_property_index_hnsw_search_level(); default: L4_Balanced). The single search parameters (e.g. obx_query_param_vector_oversample_factor()) are for power users only, who tune them for their data. If the highest levels do not reach a recall target, build the graph at a higher build level (OBXHnswBuildLevel) instead. Each quantization type has its own measured levels. The table gives the explored / rescored candidates per level for result_count 10 ("-": no rescoring; other counts scale proportionally, rounded, at least result_count). These values may change in future versions. For TQ4, TQ3 and SQ8, they include the index's default quantization oversample (1.25 with rescoring, 1.5 without) and rescore factor (max(1.5, sqrt(oversample))); changing these index options changes them (obx_model_property_index_hnsw_quantization_oversample() and obx_model_property_index_hnsw_quantization_rescore_factor()). TQ1, TQ1.5 and TQ2 rescore more candidates than TQ4 to compensate for their low precision (TQ1: all explored ones), and their counts are fixed.
- OBXPropertyFlags
- Bit-flags defining the behavior of properties. Note: Numbers indicate the bit position
- OBXPropertyType
- OBXSyncFlags
- Flags to adjust sync client behavior.
- OBXVectorDistanceType
- The vector distance algorithm used by an HNSW index (vector search).
-
RelInfo<
SourceEntityT> - Holds relation information for a field.
- Uint16ListReader
- Reads a list of unsigned 16-bit integers as a Uint16List.
- Uint32ListReader
- Reads a list of unsigned 32-bit integers as a Uint32List.
- Uint64ListReader
- Reads a list of unsigned 64-bit integers as a Uint64List.
Enums
- FlexKind
- The kind of Dart type of a Flex property, detected by the generator.
- GeneratorVersion
- Represents the generator version used to create the model.
- RelType
- Specifies a type of a relation field.
Extensions
- MeshConfigInternal on MeshConfig
- Hides internal MeshConfig methods from the public API (this is not marked as show in objectbox.dart) while remaining accessible by other libraries in this package and to other packages importing the internal APIs (internal.dart).
- ModelHnswFlags on HnswFlags
- Adds mapping to internal flags.
- ModelVectorBuildLevel on VectorBuildLevel
- Adds mapping to internal constants.
- ModelVectorDistanceType on VectorDistanceType
- Adds mapping to internal constants.
- ModelVectorQuantization on VectorQuantization
- Adds mapping to internal constants.
- ModelVectorSearchLevel on VectorSearchLevel
- Adds mapping to internal constants.
Constants
- generatorVersionLatest → const GeneratorVersion
- The latest generator version (aligned with this ObjectBox runtime library).
Functions
-
externalTypeToOBXExternalType(
ExternalPropertyType type) → int -
flexBufferToList(
BufferContext buffer, int offset, int field, {bool skipNull = false}) → List? -
Deserializes FlexBuffer bytes to a
List<dynamic>. -
flexBufferToListOfMaps(
BufferContext buffer, int offset, int field) → List< Map< ?String, dynamic> > -
Deserializes FlexBuffer bytes to a
List<Map<String, dynamic>>. -
flexBufferToMap(
BufferContext buffer, int offset, int field, {bool skipNull = false}) → Map< String, dynamic> ? -
Deserializes FlexBuffer bytes to a
Map<String, dynamic>. -
fromFlexBuffer(
BufferContext buffer, int offset, int field, {bool skipNullCollectionValues = false}) → dynamic - Reads the given field as a FlexBuffer and converts it to any Dart value.
-
obxPropertyTypeToString(
int type) → String - Maps OBXPropertyType to its string representation (name).
-
propertyTypeToOBXPropertyType(
PropertyType type) → int -
toFlexBuffer(
Object value) → Uint8List - Serializes any FlexBuffer-compatible value to bytes.