Skip to content

Commit 9bf57f4

Browse files
Fail gracefully when attempting to retrieve functions on older Neo4j instances (#51) (#53)
1 parent 0f49a4c commit 9bf57f4

File tree

1 file changed

+3
-2
lines changed
  • ui/jetbrains/src/main/java/com/albertoventurini/graphdbplugin/jetbrains/component/datasource/metadata/neo4j

1 file changed

+3
-2
lines changed

ui/jetbrains/src/main/java/com/albertoventurini/graphdbplugin/jetbrains/component/datasource/metadata/neo4j/Neo4jMetadataBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,20 @@ public DataSourceMetadata buildMetadata(DataSourceApi dataSource) {
5454
final List<Neo4jIndexMetadata> indexes = new ArrayList<>();
5555
final List<Neo4jProcedureMetadata> procedures = new ArrayList<>();
5656
final List<Neo4jConstraintMetadata> constraints = new ArrayList<>();
57+
final List<Neo4jFunctionMetadata> functions = new ArrayList<>();
5758

5859
try {
5960
indexes.addAll(getIndexes(db));
6061
procedures.addAll(getProcedures(db));
6162
constraints.addAll(getConstraints(db));
63+
functions.addAll(getFunctions(db));
6264
} catch (Exception e) {
63-
LOG.warn("Unable to load indexes, constraints and procedures from the current database. Please upgrade to Neo4j 4 or 5 to fix this.");
65+
LOG.warn("Unable to load indexes, constraints, procedures, or functions from the current database. Please upgrade to Neo4j 4.2+ to fix this.");
6466
}
6567

6668
final var propertyKeys = getPropertyKeys(db);
6769
final var labels = getLabels(db);
6870
final var relationshipTypes = getRelationshipTypes(db);
69-
final var functions = getFunctions(db);
7071

7172
return new Neo4jMetadata(
7273
functions,

0 commit comments

Comments
 (0)