Allow to discover available fields for a document
fbilhaut opened this issue · 5 comments
fbilhaut commented
Currently one can only access the values of fields using Get(), requiring prior knowledge of available field names.
Given the schema-less nature of Clover this feature would be helpful in many ways.
Two possible options (non exclusive) :
- access to a copy or read-only version of the internal map
- method to list available fields (including sub-documents, ex. ["a", "b", "b.x", "b.y"...], for that matter having "b" standing alone is questionable)
ostafen commented
Hi, @fbilhaut, I think both methods would be useful. Do you want to provide a PR for this?
fbilhaut commented
Hi, @fbilhaut, I think both methods would be useful. Do you want to provide a PR for this?
I'll do (I registered this issue "for the records", according to our discussion via email)
fbilhaut commented
@ostafen BTW what do you think about including "standalone" the names of fields containing sub-documents ? I mean "b" in the example above is redundant, just wondering...
ostafen commented
Yes, I agree
fbilhaut commented
Done