Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
992c3ca
preview CI
rashtao Mar 19, 2020
0b4f404
Insert-Update (#336)
rashtao Mar 24, 2020
4f0a9e1
satellite graphs (#337)
rashtao Mar 24, 2020
ba7a162
schema validation (#339)
rashtao Mar 24, 2020
8e61624
added peakMemoryUsage aql stats
rashtao Mar 20, 2020
4c76631
v6.7.0_PREVIEW_3.7.0-alpha.2_0
rashtao Mar 24, 2020
597b007
Merge branch 'master' into preview
rashtao Apr 2, 2020
74c7561
renamed collection validation to schema
rashtao Apr 16, 2020
8f74095
bugfix validation error response code
rashtao Apr 17, 2020
4b507ce
Merge branch 'master' into preview
rashtao May 19, 2020
d7bf6dc
overwriteMode conflict and ignore
rashtao May 19, 2020
262568f
primarySortCompression
rashtao May 19, 2020
99c3c9a
ArangoSearchProperties storedValues
rashtao May 19, 2020
f7adff3
check db version in ArangoSearchTest
rashtao May 19, 2020
b007c94
added keepNull & mergeObjects parameters for insert-update document
rashtao May 20, 2020
b33f14f
disjoint smart graphs
rashtao May 20, 2020
489accd
docker images matrix upd
rashtao May 20, 2020
599fdd3
bugfix getAndClearSlowQueries test
rashtao May 20, 2020
15f0181
Revert "added keepNull & mergeObjects parameters for insert-update do…
rashtao May 22, 2020
9f2420c
ChangeLog.md upd
rashtao May 22, 2020
d7714a9
ChangeLog.md upd
rashtao May 22, 2020
f2f26d9
added mergeObjects parameters for insert-update document
rashtao May 22, 2020
40693f6
v6.7.0_PREVIEW_3.7.1-alpha.1
rashtao May 22, 2020
b40b24a
gh actions debug containers on tests failure
rashtao May 25, 2020
c57080b
fixed async tests
rashtao Jun 29, 2020
1285877
Merge branch 'master' into preview
rashtao Jun 30, 2020
b36e0ef
javadoc upd
rashtao Jun 30, 2020
c3bf2d5
javadoc upd
rashtao Jun 30, 2020
04578bb
test matrix upd
rashtao Jun 30, 2020
e97d2f5
Merge branch 'master' into preview
rashtao Jul 1, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
disjoint smart graphs
  • Loading branch information
rashtao committed May 20, 2020
commit b33f14f7d4758af190f9bf45616e038f8c67f1f8
5 changes: 5 additions & 0 deletions src/main/java/com/arangodb/entity/GraphEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class GraphEntity implements Entity {
private Collection<EdgeDefinition> edgeDefinitions;
private Collection<String> orphanCollections;
private Boolean isSmart;
private Boolean isDisjoint;
private Integer numberOfShards;
private String smartGraphAttribute;
private ReplicationFactor replicationFactor;
Expand All @@ -57,6 +58,10 @@ public Boolean getIsSmart() {
return isSmart;
}

public Boolean getIsDisjoint() {
return isDisjoint;
}

public Integer getNumberOfShards() {
return numberOfShards;
}
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/com/arangodb/model/GraphCreateOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ public GraphCreateOptions isSmart(final Boolean isSmart) {
return this;
}

public Boolean getIsDisjoint() {
return getOptions().getIsDisjoint();
}

public GraphCreateOptions isDisjoint(final Boolean isDisjoint) {
getOptions().setIsDisjoint(isDisjoint);
return this;
}

public Integer getReplicationFactor() {
return getOptions().replicationFactor.getReplicationFactor();
}
Expand Down Expand Up @@ -187,6 +196,7 @@ public static class SmartOptions {
private Integer minReplicationFactor;
private Integer numberOfShards;
private String smartGraphAttribute;
private Boolean isDisjoint;

public SmartOptions() {
super();
Expand Down Expand Up @@ -233,6 +243,14 @@ public void setSmartGraphAttribute(final String smartGraphAttribute) {
this.smartGraphAttribute = smartGraphAttribute;
}

public Boolean getIsDisjoint() {
return isDisjoint;
}

public void setIsDisjoint(final Boolean isDisjoint) {
this.isDisjoint = isDisjoint;
}

}

}
24 changes: 22 additions & 2 deletions src/test/java/com/arangodb/ArangoGraphTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
import com.arangodb.entity.EdgeDefinition;
import com.arangodb.entity.GraphEntity;
import com.arangodb.model.GraphCreateOptions;
import org.junit.*;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

Expand All @@ -33,7 +34,6 @@
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;

import static org.junit.Assume.assumeTrue;

/**
Expand Down Expand Up @@ -277,6 +277,26 @@ public void smartGraph() {
assertThat(g.getNumberOfShards(), is(2));
}

@Test
public void disjointSmartGraph() {
assumeTrue(isEnterprise());
assumeTrue(isCluster());
assumeTrue((isAtLeastVersion(3, 7)));

final Collection<EdgeDefinition> edgeDefinitions = new ArrayList<>();
edgeDefinitions.add(new EdgeDefinition().collection("smartGraph-edge-" + rnd()).from("smartGraph-vertex-" + rnd()).to("smartGraph-vertex-" + rnd()));

String graphId = GRAPH_NAME + rnd();
final GraphEntity g = db.createGraph(graphId, edgeDefinitions, new GraphCreateOptions()
.isSmart(true).isDisjoint(true).smartGraphAttribute("test").numberOfShards(2));

assertThat(g, is(notNullValue()));
assertThat(g.getIsSmart(), is(true));
assertThat(g.getIsDisjoint(), is(true));
assertThat(g.getSmartGraphAttribute(), is("test"));
assertThat(g.getNumberOfShards(), is(2));
}

@Test
public void drop() {
final String edgeCollection = "edge_" + rnd();
Expand Down