ostafen / clover

A lightweight document-oriented NoSQL database written in pure Golang.
MIT License
666 stars 55 forks source link

Allow to discover available fields for a document #64

Closed fbilhaut closed 2 years ago

fbilhaut commented 2 years ago

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) :

ostafen commented 2 years ago

Hi, @fbilhaut, I think both methods would be useful. Do you want to provide a PR for this?

fbilhaut commented 2 years ago

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 2 years ago

@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 2 years ago

Yes, I agree

fbilhaut commented 2 years ago

Done