isar / isar/hive

Storing a SplayTreeMap

Open
#545 0 comments 1 reaction 0 assignees View on GitHub
question
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

What would be the most appropriate way to store a SplayTreeMap within Hive? One cannot create a type id for it, as the internal binary_reader/writer_impl classes would treat as a 'standard' map. Consequently, whilst it would be written ok, it would not be read back into a SplayTreeMap. The two approaches I see are: 1. an adapter to create a SplayTreeMap from the contents read by Hive; or 2. a wrapper class holding the SplayTreeMap so that a Type Adapter (TypeAdapter) could be used.

Given that SplayTreeMap is a dart:collection class, it might be nice if it was handled 'natively' by Hive?

Thoughts?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.