reaxdb_flutter library

Flutter companion for ReaxDB.

  • ReaxFlutter.open stores the database in the app support directory, so apps never pass a relative path (which fails on iOS and Android).
  • With encrypted: true the AES-256 key is generated on first launch and kept in the Keychain (iOS, macOS) or the Keystore (Android).
  • ReaxWatchQuery.watchQuery turns a query into a stream that runs again whenever its collection changes, ready for a StreamBuilder.

This library also exports the whole reaxdb_dart API, so one import is enough.

Classes

Aes256KeyConfig
Configuration for AES-256-GCM with a raw key.
Aes256PassphraseConfig
Configuration for AES-256-GCM with a PBKDF2-derived key.
AggregationBuilder
Collects aggregation specifications and executes them over documents.
AggregationResult
Result of a single aggregation.
AndroidOptions
Specific options for Android platform.
AppliedOperation
One key mutation applied by a committed transaction.
CacheStatistics
Point-in-time counters for a ReaxCache.
CollectionChange<T>
A change to a document of a typed collection.
CommitResult
The result of a successful transaction commit.
ConsoleLogOutput
Log output that prints to the console via print.
DatabaseChangeEvent
A change applied to the database, delivered after its durability point.
DatabaseConfig
The ReaxDB 1.x database configuration object.
DatabaseInfo
Point-in-time description of an open database.
EncryptionConfig
Sealed configuration describing how a database encrypts values.
FlutterSecureStorage
A class to manage secure storage in a Flutter application across multiple platforms.
GroupByResult
One group produced by a grouped aggregation.
IndexDefinition
Immutable description of a (possibly compound) secondary index.
IOSOptions
Specific options for iOS platform. Currently there are no specific ios options available, but only shared options from apple options.
KeyDerivation
Key derivation and secure random material for ReaxDB encryption.
LegacyDatabaseInfo
Describes a database directory written by ReaxDB 1.x.
LegacyMigration
Reads ReaxDB 1.x databases and migrates them into ReaxDB 2.x.
LinuxOptions
Specific options for Linux platform. Currently there are no specific linux options available.
LogEntry
A single recorded log entry.
LogOutput
Destination for log records.
MacOsOptions
Specific options for macOS platform. Extends AppleOptions and adds the usesDataProtectionKeychain parameter.
MemoryLogOutput
In-memory log output, primarily for tests.
MigrationReport
The outcome of migrating a ReaxDB 1.x database.
NoEncryptionConfig
Configuration for EncryptionType.none.
ObfuscationConfig
Configuration for EncryptionType.obfuscation. NOT secure.
QueryBuilder
Fluent interface for building and executing collection queries.
QueryCondition
A single condition of a query.
ReactiveStream
Immutable fluent wrapper over a stream of database change events.
ReaxCollection<T>
A typed view over one collection of documents.
ReaxDB
A ReaxDB database instance.
ReaxEntry<T>
A key/value pair read from the database.
ReaxFlutter
Opens ReaxDB databases in the right place for a Flutter app.
ReaxLogger
ReaxDB logger with per-instance configuration.
ReaxTransaction
A transaction handle with typed values.
Redaction
Redaction helpers for log messages.
SimpleReaxDB
A small key/value API covering the common case.
StorageStats
Point-in-time counters describing engine state.
TransactionStats
Counters describing the transaction manager's activity.
WindowsOptions
Specific options for Windows platform.

Enums

AggregationFunction
Aggregation functions available to AggregationBuilder.
AppliedOperationType
The kind of mutation a committed transaction applied to a key.
ChangeType
The kind of change described by a DatabaseChangeEvent.
EncryptionType
Encryption algorithms supported by ReaxDB.
IsolationLevel
Concurrency-control mode of a transaction.
KeychainAccessibility
KeyChain accessibility attributes as defined here: https://developer.apple.com/documentation/security/ksecattraccessible?language=objc
LegacyMigrationMode
How ReaxDB.open reacts to a ReaxDB 1.x database in the target directory.
LogLevel
Log levels for the ReaxDB logging system.
QueryOperator
Operators available for database queries.
SyncMode
How durable an acknowledged append is.
TransactionState
Lifecycle state of a transaction.

Extensions

EncryptionTypeExtension on EncryptionType
Human-readable descriptions of each EncryptionType.
ReactiveStreamExtension on Stream<DatabaseChangeEvent>
Extension to lift a change stream into a ReactiveStream.
ReaxWatchQuery on ReaxDB
Live queries for ReaxDB.

Properties

logger → ReaxLogger
Process-wide default logger instance (same object as ReaxLogger.root).
final

Functions

compareValues(dynamic a, dynamic b) → int
Compares a and b under the documented total order.
extractFieldValue(Map<String, dynamic> document, String path) → dynamic
Reads the value at dotted path from document.
valuesEqual(dynamic a, dynamic b) → bool
Returns true when a and b are equal under the index total order (structural equality for lists/maps, 5 == 5.0 for numbers).

Exceptions / Errors

ChangeStreamOverflowException
Thrown into a change stream whose subscriber fell too far behind.
CorruptionException
Thrown when data on disk fails validation, such as a checksum mismatch.
DatabaseClosedException
Thrown when an operation is attempted on a database that is closed.
DatabaseLockedException
Thrown when a database path is already open by another instance or process.
DeadlockException
Thrown when two or more transactions wait on each other's locks.
EncryptionException
Thrown when encryption or decryption fails.
InvalidKeyException
Thrown when a key is not usable as a database key.
QueryException
Thrown when a query is malformed or cannot be executed.
ReaxDbException
Base type for every error thrown by ReaxDB.
SchemaVersionException
Thrown when the stored schema version cannot be handled.
SerializationException
Thrown when a value cannot be encoded or decoded.
StorageException
Thrown when the file system fails an operation ReaxDB needs.
TransactionConflictException
Thrown when a transaction cannot commit because of a conflicting write.
TransactionTimeoutException
Thrown when a transaction exceeds its time limit.
UnsupportedApiException
Thrown when a ReaxDB 1.x API is called in a way 2.0 cannot honour safely.