Provide a way to inspect available collections
Closed this issue · 0 comments
Kittyfisto commented
It should be possible to provide a list of available collections, even when they cannot be interacted with because their types are (currently) unavailable.
Example code:
var db = Database.Open("database", ...);
foreach (var collection in Database.Collections)
{
Console.WriteLine(collection.Name);
}
It should expose collections via the IReadOnlyCollection
interface. A special implementation could be provided in case they key and/or value type are unknown / incompatible.
The following properties are of interest:
- name
- key type name
- key type (if available)
- value type name
- value type (if available)
- reason for not being available (e.g. KeyTypeUnavailable, ValueTypeIncompatible, etc...)