tostore library
ToStore is a high-performance distributed data storage engine that builds intelligent data networks using multi-partition parallel mechanisms and interconnected topologies.
Key features:
- Precise table structure change detection and automatic migration
- Encryption protection and multi-space architecture
- Isolate parallel processing to fully utilize multi-core performance
- Cross-platform support from mobile edge devices to cloud servers
- Multiple distributed primary key algorithms and horizontal node expansion
ToStore provides a distributed data foundation for immersive virtual-real fusion, multimodal interaction, 3D spatial features, generative AI, and semantic vector space modeling.
Classes
- Agg
- A helper class to construct aggregations for select clauses.
- BinaryOp
- Represents a binary operation (e.g., +, -, *, /, %).
-
ChainBuilder<
SELF extends ChainBuilder< SELF> > - chain builder base class
- ConfigInfo
- Information about the current effective configuration of the database
- Constant
- Represents a constant numeric value in an expression.
- ConstraintStatus
- Status detail for database integrity and constraint violations.
- DataStoreConfig
- data store config
- DbResult
- Database operation result model Used to represent the result of database operations (insert, update, delete, createTable, dropTable, etc.)
- DbStatus
- Database status and diagnostics interface
- DeleteBuilder
- delete builder
- DistributedNodeConfig
- Distributed node configuration
- EncryptionConfig
- Encryption configuration for data store
- Expr
- Helper class for building expressions in a type-safe, fluent manner.
- ExprNode
- Base class for all expression nodes in the expression AST.
- FieldRef
- Represents a reference to a field in the current record.
- FieldSchema
- field schema
- FieldSchemaUpdate
- model for field update, allow explicit distinction of whether a value is set
- ForeignKeySchema
- ForeignKeySchema: Foreign key constraint configuration
- FunctionCall
- Represents a function call (e.g., min, max, round, abs).
- GeneralStatus
- Generic status detail for other errors without custom diagnostics (e.g. timeouts, system, IO).
- IfElse
- Conditional expression: if condition then thenValue else elseValue.
- IndexSchema
- index schema
- InvalidArgumentStatus
- Status detail for invalid argument errors.
- IsInsert
- Predicate: true when the current operation is an insert (e.g. upsert inserted new row).
- IsUpdate
- Predicate: true when the current operation is an update (e.g. upsert matched existing row).
- KvQueryBuilder
- Chain builder for querying user-facing key-value records.
- LogConfig
- global log config
- LogRecord
- A standard log record containing details of a logged event
- MemoryInfo
- Information about cache and memory status
- MigrationConfig
- Migration configuration
- MigrationOperation
- migration operation
- MigrationStatus
- migration task status
- MigrationTask
- migration task, for storing table structure, table data migration operations
- PrimaryKeyConfig
- Primary key configuration
- QueryAggregation
- QueryAggregationPartial
- QueryAggregationStateSnapshot
- QueryAggregator
- QueryBuilder
- query builder
- QueryClauseMask
- Integer bitmask flags for query clauses to enable O(1) point query detection.
- QueryCondition
- Query Condition Builder
-
QueryResult<
T> - query result class
- ResultStatus
- Base class for all database operation status results. Provides basic status parameters and supports machine-friendly error diagnostic fields.
- RetrievalContext
- Retrieval context associated with a QueryResult, providing scores and fusion diagnostics.
- RetrievalEntry
- Detailed retrieval context entry for a single result row.
- SchemaUpdateResult
- Schema update result model
- SchemaValidationStatus
- Status detail for table schema validation and format failures.
- SequentialIdConfig
- Sequential primary key configuration
- SpaceInfo
- Information about a space in the database
- SuccessStatus
- Status detail for successful database operations.
- TableInfo
- table info
- TableSchema
- table schema
- TableTtlConfig
- Table TTL configuration.
- TimestampExpr
- Represents the current server timestamp.
- ToCrypto
- Value-level encode/decode. Output is Base64 and can be stored in JSON or a TEXT column.
- ToStore
- High-performance storage engine Features:
- TransactionError
- TransactionOperationStatus
- Status detail for transaction failures.
- TransactionResult
- Transaction-level result (public API)
- UnaryOp
- Represents a unary operation (e.g., negation, absolute value).
- UpdateBuilder
- update builder
- VectorData
- Represents vector data for machine learning and similarity search operations.
- VectorFieldConfig
- Vector field configuration (embedding width only).
- VectorIndexConfig
- Vector index configuration for dense ANN (IndexType.vector).
- VectorSearchResult
- Result of a vector similarity search, returned to the user.
- When
- Single-branch conditional: when condition holds use value, otherwise use otherwise (default null).
Enums
- BackupScope
- Backup scope selector for database backups
- BinaryOperator
- Binary operators supported in expressions.
- DataType
- Field data type.
- DbStartupStage
- Database startup/initialization stage
- DefaultValueType
- Field default value type
- EncryptionScope
- Encryption scope configuration
- EncryptionType
- Encryption type enumeration for data encoding and encryption
- ForeignKeyCascadeAction
- IndexType
- index type enum
- LogLevel
- Log level, each level represents showing logs of that level and higher
- LogType
- MigrationType
- Migration operation type
- MigrationWriteMode
- Write mode defining which target storage components are rewritten during migration.
- PersistenceMode
- Persistence mode for the engine.
- PrimaryKeyType
- Primary key generation method
- QueryAggregationType
- RecoveryFlushPolicy
- Background flush policy for recovery artifacts (WAL/journal/meta)
- ResultType
- Database operation result status type 0 represents complete success Class Code represents the first 2 digits of the 5-digit code
- RetrievalChannel
- Represents the retrieval channel / modality for candidate recall.
- RetrievalFusionMethod
- Strategy used to combine multi-channel retrieval results into a unified score.
- ToCryptoType
- Encryption type for ToCrypto. Specified in ToCrypto.encode; ToCrypto.decode reads it from the cipher header.
- TransactionErrorType
- TransactionIsolationLevel
- Transaction isolation levels
- TransactionStatus
- UnaryOperator
- Unary operators supported in expressions.
- VectorDistanceMetric
- Vector distance metric for similarity calculations.
- VectorIndexType
- Dense vector index algorithm family.
Extensions
- EncryptionScopeExtension on EncryptionScope
- EncryptionTypeExtension on EncryptionType
- ExprNodeOperators on ExprNode
- Extension methods on ExprNode to enable operator overloading for fluent expression building.
Properties
- defaultEncodingKey → String
-
Engine built-in DEK seed when EncryptionConfig.encodingKey is null.
no setter
- defaultEncryptionKey → String
-
Engine built-in KEK when EncryptionConfig.encryptionKey is null.
no setter
Functions
-
jsonSafeDiagnosticValue(
dynamic value) → dynamic - Convert a diagnostic field value into a JSON-serializable representation.
Typedefs
- StartupProgressCallback = void Function(double progress, DbStartupStage stage)
-
Callback definition for database startup progress
progressOverall startup progress (0.0 ~ 1.0)stageCurrent startup stage
Exceptions / Errors
- DbClosedException
- Exception thrown when the database is closed or closing during an operation.
- DbException
- Database operation exception Used to represent fatal developer mistakes or initialization-stage schema verification failures.