Rxdb

Interfaces

Interfaces

StorageConfig

Storage configuration

Properties:

PropertyTypeRequiredDescription
typeStorageType | undefinedNoStorage type (auto-detected if not specified)
optionsRecord<string, any> | undefinedNoStorage-specific options (e.g., batchSize for IndexedDB)
customRxStorage<any, any> | undefinedNoCustom RxStorage instance

PluginConfig

Plugin configuration

Properties:

PropertyTypeRequiredDescription
devModeboolean | undefinedNoEnable dev mode plugin (dev only)
queryBuilderboolean | undefinedNoEnable query builder plugin
updateboolean | undefinedNoEnable update plugin
migrationboolean | undefinedNoEnable migration schema plugin
leaderElectionboolean | undefinedNoEnable leader election plugin
encryptionboolean | undefinedNoEnable encryption plugin (requires encryption key)
customRxPlugin[] | undefinedNoCustom plugins to add

EncryptionConfig

Encryption configuration

Properties:

PropertyTypeRequiredDescription
enabledbooleanYesEnable encryption
keystring | undefinedNoEncryption key (32-byte base64 encoded string)
If not provided, will try to read from RXDB_ENCRYPTION_KEY env var

RxDBConfig

Main RxDB configuration

Properties:

PropertyTypeRequiredDescription
namestringYesDatabase name
collectionsRxCollectionsYesCollection definitions
presetRxDBPreset | undefinedNoPreset configuration (ignored if plugins specified)
storageStorageConfig | undefinedNoStorage configuration
pluginsPluginConfig | undefinedNoPlugin configuration
premiumboolean | undefinedNoEnable RxDB premium features
closeDuplicatesboolean | undefinedNoAuto-close duplicate databases (useful for hot reload in development)
encryptionEncryptionConfig | undefinedNoEncryption configuration
Previous
API Reference
Next
Types