You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using version 0.6.1 of this plugin. Thanks for supporting it!
I'm not sure if the language injection mentioned in #29 was already added or not, but I am able to annotate text strings in Kotlin to be recognized as Cypher and have the context menu items to Execute/Explain/Profile the Query (although, I think that is always available for any highlighted text).
I'm wondering if it might be possible to format the string with variables prior to being run. Variables are frequently used in database queries (Graph or SQL) to parameterize the query and reuse the query string for multiple queries. It would be helpful to be able to do this variable injection or provide parameters for a query when doing the Execute/Explain/Profile.
For example, given the Kotlin code below:
@Language("Cypher")
valADD_MOVIE=""" MERGE (movie:Movie {title: ${'$'}movieTitle}) WITH movie MATCH (actor:Actor) WHERE actor.name IN ${'$'}movieActorNames MERGE (actor)-[:ACTED_IN]->(movie)"""// ... elsewhere in the code ...// Official Neo4j Java Driver is used for Kotlin// The Query string is expected to have `$name` for parameter names, with values injected at runtime.// See https://neo4j.com/developer/java/
tx.run(
ADD_MOVIE,
Values.parameters(
"movieTitle", movie.title,
"movieActorNames", movite.actors.map { it.name }
)
I would like a context aware action to "Run with Parameters" that will prompt me for the parameters before running it against a configured database connection.
I'm willing to contribute a PR to add this, but don't really know where to start with adding this to the plugin. If I could get a pointer in the right direction, maybe I can make it happen.
The text was updated successfully, but these errors were encountered:
I'm using version 0.6.1 of this plugin. Thanks for supporting it!
I'm not sure if the language injection mentioned in #29 was already added or not, but I am able to annotate text strings in Kotlin to be recognized as Cypher and have the context menu items to Execute/Explain/Profile the Query (although, I think that is always available for any highlighted text).
I'm wondering if it might be possible to format the string with variables prior to being run. Variables are frequently used in database queries (Graph or SQL) to parameterize the query and reuse the query string for multiple queries. It would be helpful to be able to do this variable injection or provide parameters for a query when doing the Execute/Explain/Profile.
For example, given the Kotlin code below:
I would like a context aware action to "Run with Parameters" that will prompt me for the parameters before running it against a configured database connection.
I'm willing to contribute a PR to add this, but don't really know where to start with adding this to the plugin. If I could get a pointer in the right direction, maybe I can make it happen.
The text was updated successfully, but these errors were encountered: