This is a complete rewrite of Hive. It is not compatible with older versions of Hive yet.
Hive now uses Isar internally which brings all the benefits of a native database to Hive.
- Much more resource efficiency
- Support for access from multiple isolates
- Support for transactions
- No more issues with concurrent access and corruption
- Vastly reduced startup time
- No more code generation
- Implemented in-memory storage backend
- Added
notify
parameter to public APIs - Web Worker support
- Threaded AesCipher support (requires hive_flutter >=2.0.0-dev)
- Register DateTime adapter on web - #983
- Retracted hive@2.2.0 from pub.dev
- Fixed hive web backend null value exception - #968
- Added multiple storage backends for web - #956
- Do not return uninitialized box - #916
- Fixed issue caused database to crash when executing crash recovery - #914
- Get IndexedDB selectively based on window property - #802
- Added
path
parameter toboxExists
anddeleteBoxFromDisk
methods - #776 - Added
flush
method to boxes - #852
- Don't loose track of box objects if init crashes - #846
- Adds default value support to hive_generator generated class adapters
- Fix regression where lists are no longer growable - #631
HiveObjectMixin
not assigning box to object - #618
BoxEvent
value isnull
when watching aLazyBox
- #592- Allow calling
.init()
multiple times, instead of throwing error Hive will print warning to console - Hive will warn developers when registering adapters for
dynamic
type
- Stable null-safety version
- Added
defaultValue
property to@HiveField()
annotation - #557
- Changed
meta
dependency version to^1.3.0-nullsafety
to support null-safety
- Migrate to null-safety - #521
- Update minimum Dart sdk constraint to 2.12.0-0.
- In order to generate null-safe code use hive_generator >= 0.9.0-nullsafety.0
- Timezone support for DateTime - #419
- Browser support for
BackendManager.boxExists(boxName, path)
- #451
- Edge browser support - #357
- Added
Hive.ignoreTypeId(typeId)
- #397
open(Lazy)Box
can potentially open a box twice - #345- Remove extra byte reservation in writeBoolLis - #398
- Fixed dependency issues and minor improvements
- Added docs to all public members
- Minor performance improvements
- When a database operation failed, subsequent operations would not be performed
- Fixed GitHub homepage path
- Minor performance improvements
- Allow more versions of
crypto
- ~1000% encryption / decryption performance improvement
- Added option to implement custom encryption algorithm
- Added
box.valuesBetween(startKey, endKey)
- Allow tree shaking to drop encryption engine if no encryption is used
Hive.deleteBoxFromDisk()
did not work for boxes with upper-case names
- Deprecated
encryptionKey
parameter. UseHive.openBox('name', encryptionCipher: HiveAesCipher(yourKey))
. - Dropped
pointycastle
dependency - Dropped
path
dependency
Use latest version of hive_generator
TypeAdapters
and@HiveType()
now require atypeId
Hive.registerAdapter()
does not need atypeId
anymore.- Removed
BinaryReader.readAsciiString()
- Removed
BinaryWriter.writeAsciiString()
- New documentation with tutorials and live code
box.clear()
resets auto increment counter
- Not calling
Hive.init()
results in better exception
- Removed the
Hive.path
getter - Removed
Hive.openBoxFromBytes()
(use thebytes
parameter ofHive.openBox()
instead) LazyBox
andBox
now have a common parent class:BoxBase
- Lazy boxes need to be opened using
Hive.openLazyBox()
- Open lazy boxes can be acquired using
Hive.lazyBox()
- Box name bug resolved (more information below)
- Support for relationships,
HiveLists
(see docs for details) - Support for inheritance
- Lazy boxes can now have a type argument
LazyBox<YourModel>
- Added method to delete boxes without opening them
Hive.deleteBoxFromDisk()
- Added
path
parameter to open boxes in a custom path - Improved documentation
HiveObjects
have not been initialized correctly in lazy boxes- Fixed bug where uppercase box name resulted in an uppercase filename
- Fixed compaction bug which caused corrupted boxes
- Fixed bug which did not allow the key
0xFFFFFFFF
- Fixed bug where not all
BoxEvent
s have been broadcasted
- Changed type of
encryptionKey
fromUint8List
toList<int>
Due to a bug in previous Hive versions, boxes whose name contains uppercase characters were stored in a file that also contains upper case characters (e.g. 'myBox' -> 'myBox.hive').
To avoid different behavior on case sensitive file systems, Hive should store files with lower case names. This bug has been resolved in version 1.2.0.
If your box name contains upper case characters, the new version will not find a box stored by an older version. Please rename the hive file manually in that case.
This also applies to the web version.
object.delete()
now throws exception if object is not stored in a box
- Fixed bug where
object.save()
would fail on subsequent calls
- Fixed bug that it was not possible to open typed boxes (
Box<E>
)
- Fixed bug that corrupted boxes were not detected
- Changed return type of
addAll()
fromList<int>
toIterable<int>
. - Removed the option to register
TypeAdapters
for a specific box. E.g.box.registerTypeAdapter()
. getAt()
,putAt()
,deleteAt()
andkeyAt()
no longer allow indices out of range.
- Added
HiveObject
- Boxes have now an optional type parameter
Box<E>
- Support opening boxes from assets
- Fixed bug which was caused by not awaiting write operations
- Fixed bug where custom compaction strategy was not applied
- Hive now locks box files while they are open to prevent concurrent access from multiple processes
- Improved performance of
putAll()
,deleteAll()
,add()
,addAll()
- Changed
values
parameter ofaddAll()
fromList
toIterable
- Improved documentation
- Preparation for queries
- First stable release
- Change
keys
parameter ofdeleteAll
fromList
toIterable
- Fixed bug in
BinaryWriter
- Fixed
Hive.init()
bug in browser - Fixed a bug with large lists or strings
- Improved box opening time in the browser
- Improved general write performance
- Improved docs
- Added integration tests
- Added
keyComparator
parameter for custom key order - Added
isEmpty
andisNotEmpty
getters to box - Added support for reading and writing subclasses
- Removed length limitation for Lists, Maps, and Strings
- Greatly improved performance of storing Uint8Lists in browser
- Removed CRC check in the browser (not needed)
- Improved documentation
- TypeIds are now allowed in the range of 0-223
- Fixed compaction
- Fixed writing longer Strings
- Breaking: Binary format changed
- Document all public APIs
- Fixed flutter_web error
- Allow different versions of the
path
package
- Added
BigInt
support - Added
compactionStrategy
parameter - Added automatic crash recovery
- Added
add()
andaddAll()
for auto-increment keys - Added
getAt()
,putAt()
anddeleteAt()
for working with indices - Support for int (32 bit unsigned) keys
- Non-lazy boxes now notify their listeners immediately about changes
- Bugfixes
- More tests
- Breaking: Open boxes with
openBox()
- Breaking: Writing
null
is no longer equivalent to deleting a key - Breaking: Temporarily removed support for transactions. New API design needed. Will be coming back in a future version.
- Breaking: Binary format changed
- Breaking: API changes
- Bugfix:
Hive['yourBox']
didn't work with uppercase box names
- Big step towards stable API
- Support for transactions
- Annotations for hive_generator
- Bugfixes
- Improved web support
- Breaking:
inMemory
->lazy
- Breaking: Binary format changed
- Support for dart2js
- Improved performance
- Added
inMemory
option - Breaking: Minor API changes
- Breaking: Changed Endianness to little
- Breaking: Removed Migrator
- Downgrade to
meta: ^1.1.6
to support flutter
- First release