Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to discover available fields for a document #64

Closed
fbilhaut opened this issue Jun 28, 2022 · 5 comments
Closed

Allow to discover available fields for a document #64

fbilhaut opened this issue Jun 28, 2022 · 5 comments

Comments

@fbilhaut
Copy link

fbilhaut commented Jun 28, 2022

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
Copy link
Owner

ostafen commented Jun 28, 2022

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

@fbilhaut
Copy link
Author

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
Copy link
Author

fbilhaut commented Jun 28, 2022

@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
Copy link
Owner

ostafen commented Jun 28, 2022

Yes, I agree

@fbilhaut
Copy link
Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants