nitrite_hive_adapter 1.0.0 nitrite_hive_adapter: ^1.0.0 copied to clipboard
Hive storage adapter for Nitrite database.
Nitrite Hive Adapter #
Nitrite Hive adapter uses Hive as a file based storage engine for Nitrite database.
Getting started #
To use Hive as a storage engine for Nitrite, add the following dependency in your pubspec.yaml
file:
dependencies:
nitrite_hive_adapter: ^[version]
Usage #
To use Hive as a storage engine, you need to create a HiveModule
and pass it to Nitrite builder.
// create a hive backed storage module
var storeModule = HiveModule.withConfig()
.crashRecovery(true)
.path('$dbDir/db')
.build();
// initialization using builder
var db = await Nitrite.builder()
.loadModule(storeModule)
.openOrCreate(username: 'user', password: 'pass123');
Additional information #
For additional information visit the Hive module documentation.