Closed SergeyRim closed 10 months ago
This would be super helpful. I am in a similar situation as @SergeyRim where I would like to use this with the Firestore grafana plugin.
@SergeyRim It would be clean to select document Id using __name__
column. I'll add that support.
For example, below query selects document id:
select __name__ from ...
would that work?
@pgollangi Thank you for your hard work and plans to add this functionallity.
It would be nice if __name__
will be also returned in "select * from...
" since sometimes it's important to get all the fields including __name__
in one select.
Thanks.
@SergeyRim implicitly selecting ID on *
selection will eliminate the ability to exclude ID on selecting *
. People may not want to see random generated document ID on selecting all fields.
While on-demand inclusion of ID using __name__
column would suffice both the scenarios.
I can add a global option to fireql
programmable API interface to select ID in all select queries run with it, but that wouldn't be useful for queries running Grafana plugin.
Thoughts?
@pgollangi if the query select __name__, * from ...
will works, it will be the best solution I suppose.
Thank you.
Ofcourse yes, you can do that.
Thank you so much for adding this @pgollangi!
@pgollangi Can the grafana Firestore plugin be updated? Or how can upgrade it manually with the latest changes in FireQL?
I need to release the plugin update with latest FireQL which will by reviewed by Grafana team. Once the plugin update is approved by Grafana team, it will be available for everyone on Grafana instances to upgrade.
They generally take up to 2 days to approve a plugin update.
I'm going to submit the Grafana plugin update today.
@pgollangi much appreciated
A new version of Grafana plugin submitted which includes this change. https://github.com/pgollangi/firestore-grafana-datasource/releases/tag/v0.2.6
Please give it a star and share if you think FireQL
and Grafana Plugin is useful to you!
Thanks!
Is your feature request related to a problem? Please describe. Want be able to get Document ID with SELECT query
Describe the solution you'd like A FireSQL library provided an option to to obtain the document IDs when doing a SELECT * query with parameter: "includeId: true" // To include Document ID as "_ name _" field Will be good to have the same functionality with FireQL.
Additional context Really need this feature to use with Firestore grafana plugin.