Skip to content

Commit 5f9f919

Browse files
author
a-brandt
committed
2 parents 97a36ed + 52a25c9 commit 5f9f919

File tree

8 files changed

+18
-16
lines changed

8 files changed

+18
-16
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ To add the driver to your project with maven, add the following code to your pom
2626
<dependency>
2727
<groupId>com.arangodb</groupId>
2828
<artifactId>arangodb-java-driver</artifactId>
29-
<version>2.5.7</version>
29+
<version>2.6.8</version>
3030
</dependency>
3131
....
3232
</dependencies>
3333
```
3434

35-
If you want to test with a snapshot version (e.g. 2.5.8-SNAPSHOT), add the staging repository of oss.sonatype.org to your pom.xml:
35+
If you want to test with a snapshot version (e.g. 2.6.9-SNAPSHOT), add the staging repository of oss.sonatype.org to your pom.xml:
3636

3737
```XML
3838
<repositories>
@@ -430,4 +430,6 @@ see 2.4.4
430430
* createEdge takes graphName but needs database name
431431
* ArangoDB 2.6 support
432432

433+
## since 2.6.8
434+
* fixed GRAPH_EDGES() 2.6-incompatibility
433435

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.arangodb</groupId>
66
<artifactId>arangodb-java-driver</artifactId>
7-
<version>2.5.8-SNAPSHOT</version>
7+
<version>2.6.9-SNAPSHOT</version>
88
<inceptionYear>2012</inceptionYear>
99
<packaging>jar</packaging>
1010

src/main/java/com/arangodb/ArangoDriver.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5073,7 +5073,7 @@ public <T> EdgeEntity<T> graphUpdateEdge(
50735073
public CursorEntity<PlainEdgeEntity> graphGetEdges(String graphName) throws ArangoException {
50745074

50755075
validateCollectionName(graphName);
5076-
String query = "for i in graph_edges(@graphName, null) return i";
5076+
String query = "for i in graph_edges(@graphName, null, { includeData: true }) return i";
50775077
Map<String, Object> bindVars = new MapBuilder().put("graphName", graphName).get();
50785078

50795079
CursorEntity<PlainEdgeEntity> result = this.executeQuery(query, bindVars, PlainEdgeEntity.class, true, 20);
@@ -5240,7 +5240,7 @@ public <T> CursorEntity<T> graphGetEdges(String graphName, Class<T> clazz, Strin
52405240
throws ArangoException {
52415241

52425242
validateCollectionName(graphName);
5243-
String query = "for i in graph_edges(@graphName, @vertexDocumentHandle) return i";
5243+
String query = "for i in graph_edges(@graphName, @vertexDocumentHandle, { includeData: true }) return i";
52445244
Map<String, Object> bindVars = new MapBuilder().put("graphName", graphName)
52455245
.put("vertexDocumentHandle", vertexDocumentHandle).get();
52465246

@@ -5282,7 +5282,7 @@ public <T> EdgeCursor<T> graphGetEdgeCursorByExample(String graphName, Class<T>
52825282
public <T> CursorEntity<T> graphGetEdgesByExampleObject(String graphName, Class<T> clazz, Object vertexExample)
52835283
throws ArangoException {
52845284
validateCollectionName(graphName);
5285-
String query = "for i in graph_edges(@graphName, @vertexExample) return i";
5285+
String query = "for i in graph_edges(@graphName, @vertexExample, { includeData: true }) return i";
52865286

52875287
Map<String, Object> bindVars = new MapBuilder().put("graphName", graphName).put("vertexExample", vertexExample)
52885288
.get();
@@ -5312,7 +5312,7 @@ public <T> CursorEntity<T> graphGetEdgesByExampleMap(
53125312
Class<T> clazz,
53135313
Map<String, Object> vertexExample) throws ArangoException {
53145314
validateCollectionName(graphName);
5315-
String query = "for i in graph_edges(@graphName, @vertexExample) return i";
5315+
String query = "for i in graph_edges(@graphName, @vertexExample, { includeData: true }) return i";
53165316

53175317
Map<String, Object> bindVars = new MapBuilder().put("graphName", graphName).put("vertexExample", vertexExample)
53185318
.get();
@@ -5322,7 +5322,7 @@ public <T> CursorEntity<T> graphGetEdgesByExampleMap(
53225322
return result;
53235323
}
53245324

5325-
public <V, E> ShortestPathEntity<V, E> graphGetShortesPath(
5325+
public <V, E> ShortestPathEntity<V, E> graphGetShortestPath(
53265326
String graphName,
53275327
Object startVertexExample,
53285328
Object endVertexExample,
@@ -5334,7 +5334,7 @@ public <V, E> ShortestPathEntity<V, E> graphGetShortesPath(
53345334
shortestPathOptions = new ShortestPathOptions();
53355335
}
53365336

5337-
return cursorDriver.getShortesPath(getDefaultDatabase(), graphName, startVertexExample, endVertexExample,
5337+
return cursorDriver.getShortestPath(getDefaultDatabase(), graphName, startVertexExample, endVertexExample,
53385338
shortestPathOptions, getDefaultAqlQueryOptions(), vertexClass, edgeClass);
53395339
}
53405340

src/main/java/com/arangodb/InternalCursorDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <T, S extends DocumentEntity<T>> DocumentCursorResult<T, S> executeBaseCursorQue
7171
* @return a ShortestPathEntity object
7272
* @throws ArangoException
7373
*/
74-
public <V, E> ShortestPathEntity<V, E> getShortesPath(
74+
public <V, E> ShortestPathEntity<V, E> getShortestPath(
7575
String database,
7676
String graphName,
7777
Object startVertexExample,

src/main/java/com/arangodb/entity/BaseDocument.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class BaseDocument extends BaseEntity implements DocumentHolder {
1414

1515
public static final String KEY = "_key";
1616

17-
public static final String ID = "_ID";
17+
public static final String ID = "_id";
1818

1919
public static final String FROM = "_from";
2020

src/main/java/com/arangodb/impl/InternalCursorDriverImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public <T> CursorResult<T> executeAqlQuery(
138138

139139
@SuppressWarnings("unchecked")
140140
@Override
141-
public <V, E> ShortestPathEntity<V, E> getShortesPath(
141+
public <V, E> ShortestPathEntity<V, E> getShortestPath(
142142
String database,
143143
String graphName,
144144
Object startVertexExample,

src/test/java/com/arangodb/ArangoDriverGraphEdgesGetCursorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public void edgesAqlTest() throws ArangoException {
308308
}
309309

310310
@Test
311-
public void shortesPathTest() throws ArangoException {
311+
public void shortestPathTest() throws ArangoException {
312312

313313
TestComplexEntity01 v1 = new TestComplexEntity01("Homer", "A Simpson", 38);
314314
TestComplexEntity01 v2 = new TestComplexEntity01("Marge", "A Simpson", 36);
@@ -323,7 +323,7 @@ public void shortesPathTest() throws ArangoException {
323323
shortestPathOptions.setDirection(Direction.OUTBOUND);
324324

325325
//
326-
ShortestPathEntity<TestComplexEntity01, TestComplexEntity02> entity = driver.graphGetShortesPath(GRAPH_NAME,
326+
ShortestPathEntity<TestComplexEntity01, TestComplexEntity02> entity = driver.graphGetShortestPath(GRAPH_NAME,
327327
vertex1.getDocumentHandle(), vertex2.getDocumentHandle(), shortestPathOptions, TestComplexEntity01.class,
328328
TestComplexEntity02.class);
329329

src/test/java/com/arangodb/example/GraphQueryExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ public static void main(String[] args) {
101101
}
102102

103103
// path A -> F
104-
ShortestPathEntity<Person, Knows> shortestPath = driver.graphGetShortesPath(GRAPH_NAME, new Person("A"),
104+
ShortestPathEntity<Person, Knows> shortestPath = driver.graphGetShortestPath(GRAPH_NAME, new Person("A"),
105105
new Person("F"), new ShortestPathOptions().setDirection(Direction.OUTBOUND), Person.class, Knows.class);
106106

107107
printShortestPath(shortestPath);
108108

109109
// path F -> A (empty result)
110-
shortestPath = driver.graphGetShortesPath(GRAPH_NAME, new Person("F"), new Person("A"),
110+
shortestPath = driver.graphGetShortestPath(GRAPH_NAME, new Person("F"), new Person("A"),
111111
new ShortestPathOptions().setDirection(Direction.OUTBOUND), Person.class, Knows.class);
112112

113113
printShortestPath(shortestPath);

0 commit comments

Comments
 (0)