diff --git a/cypher-aggregation/src/main/java/org/neo4j/gds/projection/AlphaCypherAggregation.java b/cypher-aggregation/src/main/java/org/neo4j/gds/projection/AlphaCypherAggregation.java index 1711c35311..41a130031d 100644 --- a/cypher-aggregation/src/main/java/org/neo4j/gds/projection/AlphaCypherAggregation.java +++ b/cypher-aggregation/src/main/java/org/neo4j/gds/projection/AlphaCypherAggregation.java @@ -19,6 +19,7 @@ */ package org.neo4j.gds.projection; +import org.neo4j.gds.annotation.CustomProcedure; import org.neo4j.gds.api.DatabaseId; import org.neo4j.gds.compat.GraphDatabaseApiProxy; import org.neo4j.gds.compat.Neo4jProxy; @@ -33,6 +34,9 @@ import org.neo4j.kernel.api.procedure.CallableUserAggregationFunction; import org.neo4j.kernel.api.procedure.Context; import org.neo4j.kernel.impl.api.KernelTransactions; +import org.neo4j.procedure.Name; +import org.neo4j.values.AnyValue; +import org.neo4j.values.storable.TextValue; import java.util.List; import java.util.Optional; @@ -80,6 +84,20 @@ public UserFunctionSignature signature() { ); } + // NOTE: keep in sync with `FUNCTION_NAME` and `signature` + @CustomProcedure(value = "gds.alpha.graph.project", namespace = CustomProcedure.Namespace.AGGREGATION_FUNCTION) + public AggregationResult procedureSyntax( + @Name("graphName") TextValue graphName, + @Name("sourceNode") AnyValue sourceNode, + @Name("targetNode") AnyValue targetNode, + @Name("nodesConfig") AnyValue nodesConfig, + @Name("relationshipConfig") AnyValue relationshipConfig, + @Name("configuration") AnyValue config + ) { + throw new UnsupportedOperationException("This method is only used to document the procedure syntax."); + } + + @Override public UserAggregationReducer createReducer(Context ctx) throws ProcedureException { var databaseService = ctx.graphDatabaseAPI(); diff --git a/cypher-aggregation/src/main/java/org/neo4j/gds/projection/CypherAggregation.java b/cypher-aggregation/src/main/java/org/neo4j/gds/projection/CypherAggregation.java index e2aee0f229..cdd17f27f9 100644 --- a/cypher-aggregation/src/main/java/org/neo4j/gds/projection/CypherAggregation.java +++ b/cypher-aggregation/src/main/java/org/neo4j/gds/projection/CypherAggregation.java @@ -19,6 +19,7 @@ */ package org.neo4j.gds.projection; +import org.neo4j.gds.annotation.CustomProcedure; import org.neo4j.gds.api.DatabaseId; import org.neo4j.gds.compat.GraphDatabaseApiProxy; import org.neo4j.gds.compat.Neo4jProxy; @@ -33,6 +34,9 @@ import org.neo4j.kernel.api.procedure.CallableUserAggregationFunction; import org.neo4j.kernel.api.procedure.Context; import org.neo4j.kernel.impl.api.KernelTransactions; +import org.neo4j.procedure.Name; +import org.neo4j.values.AnyValue; +import org.neo4j.values.storable.TextValue; import java.util.List; import java.util.Optional; @@ -80,6 +84,18 @@ public UserFunctionSignature signature() { ); } + // NOTE: keep in sync with `FUNCTION_NAME` and `signature` + @CustomProcedure(value = "gds.graph.project", namespace = CustomProcedure.Namespace.AGGREGATION_FUNCTION) + public AggregationResult procedureSyntax( + @Name("graphName") TextValue graphName, + @Name("sourceNode") AnyValue sourceNode, + @Name("targetNode") AnyValue targetNode, + @Name("dataConfig") AnyValue dataConfig, + @Name("configuration") AnyValue config + ) { + throw new UnsupportedOperationException("This method is only used to document the procedure syntax."); + } + @Override public UserAggregationReducer createReducer(Context ctx) throws ProcedureException { var databaseService = ctx.graphDatabaseAPI();