Git Product home page Git Product logo

albertoventurini / graphdb-intellij-plugin Goto Github PK

View Code? Open in Web Editor NEW
49.0 2.0 13.0 8.88 MB

Graph database plugin for the IntelliJ Platform

Home Page: https://plugins.jetbrains.com/plugin/20417-graph-database

License: Apache License 2.0

Java 97.35% HTML 0.02% Lex 1.44% Shell 0.03% Cypher 1.15%
cypher cypher-query cypher-query-language graph-database graph-databases intellij intellij-idea intellij-plugin neo4j neo4j-database

graphdb-intellij-plugin's People

Contributors

a06kin avatar albertoventurini avatar barsatm avatar buzdin avatar carovel avatar disolovyov avatar dwitry avatar ex3m1024 avatar fylmtm avatar gdalecka avatar greyko avatar kostik1002 avatar metaur avatar nikarh avatar robertsluksa avatar robsdedude avatar roemu avatar rusbob avatar sergejskovtuns avatar skibish avatar vorago avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

graphdb-intellij-plugin's Issues

Add language injections for Neo4j Java Driver

First off, big thanks for forking this and making so many improvements. I had also forked the project and was working through the painful process of fixing issues. I see you have got quite a bit further along than me so I will contribute my efforts to this repo instead.

In my fork I had started adding language injections for the Java driver eg .

    <injection language="Cypher" injector-id="java">
        <display-name>Neo4j - Bolt Java Driver (org.neo4j.driver)</display-name>
        <place>
            <![CDATA[
            psiParameter().ofMethod(0, psiMethod().withName("run")
                    .withParameters("java.lang.String")
                    .definedInClass("org.neo4j.driver.QueryRunner"))
            ]]>
        </place>
    </injection>

It would be nice to also add injections for other languages such as JavaScript and Go

Improvements to function completion with namespaces

Function name completion with namespaces doesn't work well. I suspect namespaces are erroneously parsed as PropertyLookups (to be verified). After a dot, the completion provider starts afresh with a new list of suggestions, which don't account for the namespace part that is already typed.

Without namespaces, function completion works as expected:

Screenshot 2022-12-26 at 06 53 35

When a dot is typed, function completion starts afresh:

Screenshot 2022-12-26 at 06 53 49

Result: a part of the namespace is inserted twice:

Screenshot 2022-12-26 at 06 54 12

Remove unneeded hardcoded functions

In modern versions of Neo4j, the SHOW FUNCTIONS command returns both built-in and user-defined functions. Therefore, this command returns several functions that were previously hardcoded into the plugin (e.g. round.)

The language/cypher/src/main/resources/com/albertoventurini/graphdbplugin/language/cypher/documentation/database/built-in/functions package contains several hardcoded functions, most of which are not necessary anymore. Some still appear to be necessary though, e.g. shortestPath and allShortestPaths, because they are not returned by SHOW FUNCTIONS.

Additionally, the parser processes some of these built-in functions at the AST level, e.g. all and any. This is not needed anymore, as those are also returned by SHOW FUNCTIONS.

We should remove any unneeded hardcoded functions.

IDEA 2022.02 NPE

java.lang.NullPointerException: Cannot invoke "com.intellij.notification.NotificationGroup.createNotification(String, String, com.intellij.notification.NotificationType)" because "group" is null
at com.albertoventurini.graphdbplugin.jetbrains.component.updater.PluginUpdateActivity.showNotification(PluginUpdateActivity.java:45)
at com.albertoventurini.graphdbplugin.jetbrains.component.updater.PluginUpdateActivity.runActivity(PluginUpdateActivity.java:35)
at com.intellij.ide.startup.impl.StartupManagerImplKt.runStartupActivity(StartupManagerImpl.kt:511)
at com.intellij.ide.startup.impl.StartupManagerImplKt.access$runStartupActivity(StartupManagerImpl.kt:1)
at com.intellij.ide.startup.impl.StartupManagerImpl.runActivityAndMeasureDuration(StartupManagerImpl.kt:305)
at com.intellij.ide.startup.impl.StartupManagerImpl.runActivityAndMeasureDuration$default(StartupManagerImpl.kt:296)
at com.intellij.ide.startup.impl.StartupManagerImpl$Companion$addActivityEpListener$1$extensionAdded$1$1.run(StartupManagerImpl.kt:82)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:365)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:343)
at com.intellij.ide.startup.impl.StartupManagerImpl$Companion$addActivityEpListener$1$extensionAdded$1.run(StartupManagerImpl.kt:81)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)

Fix tests

At the moment, running ./gradlew clean check fails with build errors.

When data sources are refreshed, there should be a busy indicator (spinner)

At the moment, when data sources are refreshed, there is no visual feedback that the refresh is in progress.

This is not an issue if only local data sources are defined, because the refresh completes in a short time. However, for remote data sources such as Aura, the refresh might take longer and the user doesn't have a feedback that something is happening.

Add a busy indicator (e.g. a spinner) somewhere (e.g. next to each data source that is refreshing) to indicate that refresh is in progress.

:auto ... call {} in transactions of ... rows -- not recognized

These structures are not recognized

// soc-feature
:auto load csv with headers from 'file:///RATED_FEATURE.csv' as r
CALL {
with *
match (soc:SOC {soc: trim(r.SOC)})
match (feature:Feature {code: trim(r.FEATURE_CODE)})
merge (soc)<-[:PART_OF]-(feature)
} IN TRANSACTIONS OF 10000 ROWS;

Снимок экрана 2023-01-24 в 12 48 38

Please accept those?

Don't require IDE restart

Modern IntelliJ plugins don't require a full IDE restart. It should be possible to support it from this plugin as well.

Feature Request: Inject Format Variables for Query

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")
    val ADD_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.

Error: it is a service, use getService instead of getComponent when trying to execute a cypher query

When trying to execute a cypher query file from the project file tree (via right-click > Graph Database File Actions > Execute All), the attached error is thrown. The cypher statements in the file are not executed.

RubyMine 2022.3.2
Build #RM-223.8617.48, built on January 24, 2023
Runtime version: 17.0.5+1-b653.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 16000M
Cores: 16
Non-Bundled Plugins:
com.intellij.ideolog (203.0.30.0)
com.intellij.properties (223.7571.117)
de.docs_as_co.intellij.plugin.diagramsnet (0.2.0)
XPathView (223.7571.112)
com.albertoventurini.jetbrains.graphdbplugin (0.5.0)
ru.adelf.idea.dotenv (2022.3)

java.lang.Throwable: class com.albertoventurini.graphdbplugin.jetbrains.component.datasource.DataSourcesComponent it is a service, use getService instead of getComponent
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
	at com.intellij.serviceContainer.ComponentManagerImpl.getComponent(ComponentManagerImpl.kt:605)
	at com.albertoventurini.graphdbplugin.jetbrains.actions.execute.ExecuteAllAction.actionPerformed(ExecuteAllAction.java:61)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:327)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:306)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:350)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:306)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$5(ActionMenuItem.java:296)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:226)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:289)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:64)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$4(ActionMenuItem.java:111)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:526)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:558)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392)
	at java.desktop/java.awt.Component.processEvent(Component.java:6413)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:909)
	at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:831)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:753)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$5(IdeEventQueue.java:437)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:436)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:615)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:434)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:838)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:480)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Syntax highlight in JS/TS string literals

Hello Alberto.

First let me say Thank You for forking this plugin 🙏 I wish you enough time, energy and interest to support it!

I imagine you have a lot of tasks to finish before you can even review our proposals... but still, if you don't mind, I'd like to add one.


It would be great to have syntax highlight not only in .cypher files but in .js / .ts as well. In realistically large projects some queries are inevitably dynamic (DRY):

import {FetchTaskLabel} from "../Graph"

export const MATCH_TASKS = (label: FetchTaskLabel) => `
  MATCH (u:User)-[:NEEDS]->(t:${label})
  WITH u, collect(t) AS ts
  WHERE NOT u.login IN $exceptLogins
  AND size(ts) = 1
  UNWIND ts AS t
  RETURN u, t
  SKIP $skip
  LIMIT $limit
`

This particular query can't really be stored in query.cypher, only in query.ts.


In GraphQL world this is solved by adding gql tags which often do nothing except signaling the syntax to the parser:

import {gql} from "graphql-request"

// Below query is properly highlighted in WebStorm (in case a corresponding plugin is installed)
export const FETCH_FOLLOWERS_PAGE = gql`
  query ($login: String!, $limit: Int!, $cursor: String) {
    user(login: $login) {
      followers(first: $limit, after: $cursor) {
        nodes {
          login
        }
        pageInfo {
          endCursor
          hasNextPage
        }
        totalCount
      }
    }
  }
`

I imagine you could eventually publish a library with no-op cypher tag.

import cypher from "cypher-tag" // (s: string) => string

// Now parser knows the string below is a CYPHER code
export const QUERY = cypher`
   ...
`

Sorry if you don't use TS/JS yourself, it's just our JS-centrism in play.

Missing level of indentations an sub-queries and where clauses

Hey, thanks for the plugin!

I've noticed that sub queries and where clauses, do not get correctly intended. (at least in my opinion).

Example:

MATCH (subject:User)
	WHERE (subject.id = $subjectId) OR (subject.openId = $subjectId)
CALL {
WITH subject
CALL apoc.path.expandConfig(subject, {relationshipFilter: 'IS_IN',
									  labelFilter:        '/User',
									  uniqueness:         'NODE_GLOBAL'}) YIELD path

WITH nodes(path) AS nodes
UNWIND nodes AS n

WITH n
	WHERE
	(n.id = $userId) AND
	'User' IN labels(n)

RETURN n AS s
UNION
WITH subject
RETURN subject AS s
}
WITH s
	WHERE s.id = $userId
RETURN s

imo it should look like this:

MATCH (subject:User)
	WHERE (subject.id = $subjectId) OR (subject.openId = $subjectId)
CALL {
	WITH subject
	CALL apoc.path.expandConfig(subject, {
		relationshipFilter: 'IS_IN', 
		labelFilter:        '/User',
		uniqueness:         'NODE_GLOBAL'
	}) YIELD path


	WITH nodes(path) AS nodes
	UNWIND nodes AS n

	WITH n
		WHERE
			(n.id = $userId) AND
			'User' IN labels(n)

	RETURN n AS s
	UNION
	WITH subject
	RETURN subject AS s
}
WITH s
	WHERE s.id = $userId
RETURN s

(not sure on the apoc, call, no strong opinion there). The CALL {...} expresson and the WHERE expression should add an intendation imo

`where` can be inside match

Please accept where inside:

MATCH p0=(field:Field where not (field.name =~ '.*_ind'))
--(fs:FeatureSelector)
--(feature:Feature)
-[r:CONFIGURED_IN {value: 'ACC_FREEMIUM'}]
-(:Parameter {name:'ACID'})
match shortestPath((:SwitchControlTriggered)-[*]-(field))
match (feature)-[]-(soc:SOC)
return distinct *;

Снимок экрана 2023-01-24 в 14 10 16

CREATE INDEX = error

CREATE INDEX FieldPK IF NOT EXISTS FOR (field:Field) ON (field.name);

Causes error. Maybe it is not hard to change grammar to accept these?

Снимок экрана 2023-01-24 в 11 10 43

(Thanks for FANTASTIC plugin!)

Support neo4j+s connections

When I attempt to connect to a remote AuraDB instance, the connection fails. A NullPointerException is thrown, with the following stack trace (excerpt):

Exception in background execution error handler:

java.lang.NullPointerException: Cannot invoke "java.lang.Throwable.toString()" because the return value of "org.apache.commons.lang.exception.ExceptionUtils.getCause(java.lang.Throwable)" is null
	at com.albertoventurini.graphdbplugin.jetbrains.ui.datasource.interactions.DataSourceDialog.connectionFailed(DataSourceDialog.java:133)
	at com.albertoventurini.graphdbplugin.jetbrains.ui.datasource.interactions.DataSourceDialog.lambda$validateConnection$1(DataSourceDialog.java:92)
	at com.albertoventurini.graphdbplugin.jetbrains.services.ExecutorServiceImpl.lambda$runInBackground$1(ExecutorServiceImpl.java:35)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)

The plugin should support neo4j+s connections.

CREATE CONSTRAINT is not supported

1. CREATE CONSTRAINT queries are highlighted as errors.

Example of query:
CREATE CONSTRAINT FOR (user:User) REQUIRE user.id IS UNIQUE;
Error message:
<any cypher option>, <create index>, <delete>, <reading clause>, BEGIN, CALL, COMMIT, CREATE, DROP, FOREACH, MERGE, REMOVE, RETURN, SET or WITH expected, got 'CREATE'
Screenshot:
image

2. When I try to execute CREATE CONSTRAINT queries, an error is shown

Query is the same as before.
Error text:
Error occurred: Cypher query text should not be an empty string
Screenshot:
image
Error details (unfortunately only as screenshot, because the text in "Error details" window can't be copied):
image

Error after installation

I installed the plugin in PyCharm 2022.2.3 (Professional Edition) Build #PY-222.4345.23, built on October 10, 2022

And got this error right after closing the settings dialogue.

java.lang.NullPointerException: Cannot invoke "com.intellij.notification.NotificationGroup.createNotification(String, String, com.intellij.notification.NotificationType)" because "group" is null
	at com.albertoventurini.graphdbplugin.jetbrains.component.updater.PluginUpdateActivity.showNotification(PluginUpdateActivity.java:45)
	at com.albertoventurini.graphdbplugin.jetbrains.component.updater.PluginUpdateActivity.runActivity(PluginUpdateActivity.java:35)
	at com.intellij.ide.startup.impl.StartupManagerImplKt.runStartupActivity(StartupManagerImpl.kt:511)
	at com.intellij.ide.startup.impl.StartupManagerImplKt.access$runStartupActivity(StartupManagerImpl.kt:1)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runActivityAndMeasureDuration(StartupManagerImpl.kt:305)
	at com.intellij.ide.startup.impl.StartupManagerImpl.runActivityAndMeasureDuration$default(StartupManagerImpl.kt:296)
	at com.intellij.ide.startup.impl.StartupManagerImpl$Companion$addActivityEpListener$1$extensionAdded$1$1.run(StartupManagerImpl.kt:82)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:365)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:343)
	at com.intellij.ide.startup.impl.StartupManagerImpl$Companion$addActivityEpListener$1$extensionAdded$1.run(StartupManagerImpl.kt:81)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

After restarting the IDE the plugin works fine so far 🙌 thanks!

Metadata not display

Hello, @albertoventurini

Neo4j Version: 3.5.35
IDEA version: 2022.3.1
Plugin version: 0.4.0

When plugin update to the lastest version, the neo4j metadata is not display as normal, such as:
image

Index metadata should contain more information (e.g. label, properties...)

Neo4j supports various types of indexes (e.g. fulltext, lookup, point, range...) and each index type has certain metadata associated with it.

The plugin uses Neo4j's SHOW INDEXES command to retrieve index metadata, but only the name and the status metadata fields are rendered in the metadata tree:

Screenshot 2022-11-17 at 17 27 52

We should display all available metadata associated with each index, not just its name and status.

Rename notification group for update activity

The notification group for update activity (which is responsible for showing the pop up notification when a new version of the plugin is installed) has the same name as the legacy "Graph Database Support" plugin. This can create interference with the legacy plugin, if it's still installed.

The notification group should be renamed, to avoid clashes with the legacy plugin.

(Related to #15)

Support metadata from Neo4j 3.x

The queries to retrieve indices, constraints, and procedures have changed in recent versions of Neo4j.

At the moment, the plugin doesn't try to understand the version of the server it is talking to. It just tries to use the same queries for all servers. The queries that the plugin uses have been updated to the latest versions of Neo4j (recent 4.x versions and 5.x) but that broke compatibility with older versions, e.g. Neo4j 3.x.

The plugin should still be able to support the retrieval of indices, constraints, and procedures from older versions of Neo4j.

Related issue: #21

Retrieve functions correctly

At the moment, the plugin uses the old procedure CALL dbms.functions() to retrieve user-defined functions. This doesn't work on newer versions of Neo4j.

Definition of done:

  • replace CALL dbms.functions() with the modern equivalent, SHOW FUNCTIONS
  • remove the distinction between user-defined and built-in functions. They are equivalent. We might want to add a boolean attribute to distinguish between the two, but from the point of view of code completion, hints, syntax highlighting etc. they should be equivalent
  • ensure relevant tests are passing

Consider using checkstyle

Checkstyle was commented out in order to let the build pass. The project uses an old version of checkstyle which doesn't support Java 17 features.

Consider restoring checkstyle in the build, with an up-to-date checkstyle file which supports Java 17.

No releases since version 0.5.0

Great plugin!

There are no new releases since version 0.5.0, even though the code changed with new releases

I suspect the publish and release script is not running, this cause us to not be able to upgrade DataGrip

even when a fix has been merged:

Using apoc.export.csv.data is not supported

CALL apoc.export.csv.data(stripe, [], "xxxx.csv", {})
YIELD file, source, format, nodes, relationships, properties, time, rows, batchSize, batches, done, data
RETURN file, source, format, nodes, relationships, properties, time, rows, batchSize, batches, done, data;

The above returns syntax error on 'rows' as unexpected
When running executions ends at YIELD which is not allowed (sees RETURN as new query)

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.