Skip to content

Commit ef994c0

Browse files
committed
Rename capabilities from isBackedByDatabase to canWriteToDatabase
Ref neo-technology/graph-analytics#5339 (comment)
1 parent 5247932 commit ef994c0

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

core/src/main/java/org/neo4j/gds/config/WriteConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ default void validateGraphIsSuitableForWrite(
5252
@SuppressWarnings("unused") Collection<NodeLabel> selectedLabels,
5353
@SuppressWarnings("unused") Collection<RelationshipType> selectedRelationshipTypes
5454
) {
55-
if (!graphStore.capabilities().isBackedByDatabase()) {
55+
if (!graphStore.capabilities().canWriteToDatabase()) {
5656
throw new IllegalArgumentException("The provided graph does not support `write` execution mode.");
5757
}
5858
}

core/src/main/java/org/neo4j/gds/core/loading/Capabilities.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121

2222
public interface Capabilities {
2323

24-
boolean isBackedByDatabase();
24+
boolean canWriteToDatabase();
2525
}

core/src/test/java/org/neo4j/gds/core/loading/GraphStoreCapabilitiesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void gdlGraphIsBackedByDatabase() {
3636
.build()
3737
.build();
3838
var capabilities = graphStore.capabilities();
39-
assertThat(capabilities.isBackedByDatabase()).isTrue();
39+
assertThat(capabilities.canWriteToDatabase()).isTrue();
4040
}
4141

4242
@Test
@@ -48,6 +48,6 @@ void neo4jGraphIsBackedByDatabase() {
4848
.graphStore();
4949

5050
var capabilities = graphStore.capabilities();
51-
assertThat(capabilities.isBackedByDatabase()).isTrue();
51+
assertThat(capabilities.canWriteToDatabase()).isTrue();
5252
}
5353
}

cypher/cypher-core/src/main/java/org/neo4j/gds/core/cypher/CypherGraphStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void registerStateVisitor(StateVisitor stateVisitor) {
6060

6161
@Override
6262
public Capabilities capabilities() {
63-
return ImmutableStaticCapabilities.builder().from(super.capabilities()).isBackedByDatabase(false).build();
63+
return ImmutableStaticCapabilities.builder().from(super.capabilities()).canWriteToDatabase(false).build();
6464
}
6565

6666
@Override

0 commit comments

Comments
 (0)