Upgrading hive 0.2 to 0.3
Breaking0.2.0 → 0.3.0+1Breaking2New2Changed2Fixed2
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- The old inMemory setting is now called lazy, so existing code using inMemory must be updated.
- Data stored in the old binary format is not compatible with this version.
Must act 2 items need code or config changes
What you must change
Breaking2
Renames the
inMemory option to lazy.inMemorylazyChanges the binary storage format.
API changes
Generated by DepDelta from published Dart source. Not mixed with prose notes.
- removed:
ctor HiveError.corrupted(String boxName, String message) - removed:
field BoxEvent.deleted: final bool - removed:
method BinaryReader.readBytes(int bytes): Uint8List - removed:
method BinaryWriter.writeBytes(List<int> bytes): void - removed:
method Box.allKeys(): Iterable<String> - changed:
class HiveError → class HiveError extends Error - changed:
ctor BoxEvent(this.key, this.value, this.deleted) → ctor BoxEvent(this.key, this.value) - changed:
method Box.close({bool compact = …}): Future<void> → method Box.close(): Future<void> - changed:
method Box.delete(String key): Future<bool> → method Box.delete(String key): Future<void> - changed:
method Box.deleteAll(Iterable<String> keys): Future<List<bool>> → method Box.deleteAll(Iterable<String> keys): Future<void> - changed:
method Box.operator [](String key): Future<dynamic> → method Box.operator [](String key): dynamic - changed:
method HiveInterface.box( String name, { List<int> encryptionKey, bool inMemory = …, }): Future<Box> → method HiveInterface.box( String name, { List<int> encryptionKey, bool lazy = …, }): Future<Box> - changed:
method HiveInterface.close({bool compact = …}): Future → method HiveInterface.close(): Future - added:
class HiveField - added:
class HiveType - added:
ctor HiveField(this.index) - added:
ctor HiveType({this.adapterName}) - added:
field HiveField.index: final int - added:
field HiveType.adapterName: final String - added:
get Box.keys: Iterable<String> - added:
get Box.name: String - added:
get BoxEvent.deleted: bool - added:
method BinaryReader.readByteList([int length]): Uint8List - added:
method BinaryWriter.writeByteList(List<int> bytes, {bool writeLength = …}): void - added:
method Box.transaction(Future Function(Box box) transaction): Future<void> - added:
method BoxEvent.operator ==(dynamic other): bool - added:
method HiveInterface.operator [](String name): Box