loremipsumdonec / vscode-elasticdeveloper

MIT License
25 stars 22 forks source link

Run single query from a file containing many queries #5

Open michaelsogos opened 5 years ago

michaelsogos commented 5 years ago

Dear @Crasnam

Very nice extension ๐Ÿ˜„

A missing feature is to allow to run a single query in a .esquery file containing many queries.

E.g.: we have a helper file which contains generic queries (about 15) and to us not make sense to create a file for each of them, but to keep this "helpers" together.

Do you think is it possible?

loremipsumdonec commented 5 years ago

Hi @michaelsogos, I think I understand what you want. You want the ability to expand an esquery file and be able to run an individual query that occurs in the selected file.

Do not think it's possible to add this functionality to "Explorer view". I have looked a little at "Outline view", but then you have to have the file open for that to be visible. Which is not a good solution. Iโ€™m not sure if it is possible to add a command to a "DocumentSymbol" in Outline view.

But it is possible for me to implement this functionality to the "Elasticsearch Explorer view" so that it can also show all queries that exists in the current workspace. I guess thatโ€™s a good start.

I will test and implement a solution and then we will see if that solves your problem ๐Ÿ˜Š

Best regards Crasnam

michaelsogos commented 5 years ago

@crasnam

It sounds good. Let me know๐Ÿ˜Š

nickchomey commented 2 years ago

I also think this would be very useful - specifically just with the ability to run whichever query the cursor is currently in, like Kibana. We can click run query above it, but a command that can be mapped to a keyboard shortcut would be super useful