Skip to content

Commit

Permalink
Fix up Kernel changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gem-neo4j committed Sep 24, 2024
1 parent 03e6f68 commit 4b87e6e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.neo4j.internal.kernel.api.Read;
import org.neo4j.internal.kernel.api.TokenRead;
import org.neo4j.kernel.api.KernelTransaction;
import org.neo4j.token.api.TokenConstants;

public class DatabaseSubGraph implements SubGraph {
private final Transaction transaction;
Expand Down Expand Up @@ -147,18 +148,18 @@ public long countsForNode(Label label) {
@Override
public long countsForRelationship(RelationshipType type, Label end) {
return read.countsForRelationship(
TokenRead.ANY_LABEL, tokenRead.relationshipType(type.name()), tokenRead.nodeLabel(end.name()));
TokenConstants.ANY_LABEL, tokenRead.relationshipType(type.name()), tokenRead.nodeLabel(end.name()));
}

@Override
public long countsForRelationship(Label start, RelationshipType type) {
return read.countsForRelationship(
tokenRead.nodeLabel(start.name()), tokenRead.relationshipType(type.name()), TokenRead.ANY_LABEL);
tokenRead.nodeLabel(start.name()), tokenRead.relationshipType(type.name()), TokenConstants.ANY_LABEL);
}

@Override
public long countsForRelationship(RelationshipType type) {
return read.countsForRelationship(
TokenRead.ANY_LABEL, tokenRead.relationshipType(type.name()), TokenRead.ANY_LABEL);
TokenConstants.ANY_LABEL, tokenRead.relationshipType(type.name()), TokenConstants.ANY_LABEL);
}
}
4 changes: 2 additions & 2 deletions core/src/main/java/apoc/meta/Meta.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import static apoc.util.MapUtil.map;
import static java.lang.String.format;
import static org.neo4j.internal.kernel.api.TokenRead.ANY_LABEL;
import static org.neo4j.internal.kernel.api.TokenRead.ANY_RELATIONSHIP_TYPE;
import static org.neo4j.token.api.TokenConstants.ANY_LABEL;
import static org.neo4j.token.api.TokenConstants.ANY_RELATIONSHIP_TYPE;

import apoc.export.util.NodesAndRelsSubGraph;
import apoc.result.GraphResult;
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/apoc/stats/DegreeDistribution.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
*/
package apoc.stats;

import static org.neo4j.internal.kernel.api.TokenRead.ANY_LABEL;
import static org.neo4j.internal.kernel.api.TokenRead.ANY_RELATIONSHIP_TYPE;

import apoc.Pools;
import apoc.path.RelationshipTypeAndDirections;
import apoc.util.kernel.MultiThreadedGlobalGraphOperations;
Expand All @@ -44,6 +41,9 @@
import org.neo4j.procedure.Procedure;
import org.neo4j.token.api.NamedToken;

import static org.neo4j.token.api.TokenConstants.ANY_LABEL;
import static org.neo4j.token.api.TokenConstants.ANY_RELATIONSHIP_TYPE;

/**
* @author mh
* @since 07.08.17
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/apoc/stats/DegreeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
*/
package apoc.stats;

import static org.neo4j.internal.kernel.api.TokenRead.ANY_RELATIONSHIP_TYPE;

import org.neo4j.graphdb.Direction;
import org.neo4j.internal.kernel.api.NodeCursor;
import org.neo4j.internal.kernel.api.helpers.Nodes;

import static org.neo4j.token.api.TokenConstants.ANY_RELATIONSHIP_TYPE;

public class DegreeUtil {

public static int degree(NodeCursor nodeCursor, int relType, Direction direction) {
Expand Down

0 comments on commit 4b87e6e

Please sign in to comment.