aql-intellij-plugin icon indicating copy to clipboard operation
aql-intellij-plugin copied to clipboard

Execute AQL from context menu

Open konsultaner opened this issue 6 years ago • 3 comments

I have a query that produces an error and I wanted to execute it with the plugin. The query does not execute. Nothing happens. Then I found out that the database was not connected correctly, but it still does not execute or tries to execute anything. the code looks a bit like this:

String query = "FOR u IN " + myCollectionName(User.class) + "\n RETURN u"

konsultaner avatar Dec 10 '18 14:12 konsultaner

I don't think that will work in current version, what's worse, I thought that I enabled it for *.aql files only, all file or selected part of the query (so, disabled for java file context etc)

So far only "simple" statements should work, e.g something like: FOR doc in X FILTER doc.name =@someParamName RETURN DOC. You'll get popup to fill in the parameter,

I need to look into resolving of things like in your case (myCollectionName(User.class) ), hopefully there will be no problem resolving those contexts. I am working on improvements for query execution (table results, parameter handling) and also looking into rendering of graph results.

machak avatar Dec 10 '18 14:12 machak

I've never looked into intellij plugin development, but it seems logical that this kind of expressions are only executable at debug time. Maybe there is a some way to check if the code is in debug state.

konsultaner avatar Dec 10 '18 16:12 konsultaner

@machak I couldn't undesrtand why it wasn't doing anything when I'd select Execute AQL query. After reading your comment I realized that it will not work for Kotlin files because you only enabled it for *.aql files only. Can you enable it for Kotlin as well in the next version. AlsoI suggest mentioning that it will only work in a specific context in the plugin description.

vovahost avatar Mar 03 '20 23:03 vovahost