Skip to content

Commit 02dbbb2

Browse files
author
Mark
committed
update docu
1 parent e251615 commit 02dbbb2

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/aql.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@ E.g. get all Simpsons aged 3 or older in ascending order:
2323

2424
ArangoCursor<MyObject> cursor = db.query(query, bindVars, null, MyObject.class);
2525

26-
cursor.forEachRemaining(obj -> {
26+
for(; cursor.hasNext;) {
27+
MyObject obj = cursor.next();
2728
System.out.println(obj.getName());
28-
});
29+
}
2930
```
3031

3132
or return the AQL result as VelocyPack:
3233

3334
``` Java
3435
ArangoCursor<VPackSlice> cursor = db.query(query, bindVars, null, VPackSlice.class);
3536

36-
cursor.forEachRemaining(obj -> {
37+
for(; cursor.hasNext;) {
38+
VPackSlice obj = cursor.next();
3739
System.out.println(obj.get("name").getAsString());
38-
});
40+
}
3941
```

docs/basic_operations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,28 +98,28 @@ E.g. in the previous example the object was stored as follows:
9898

9999
## read document by key (as JavaBean)
100100
``` Java
101-
MyObject document = arangoDB.db("myDatabase").collection("myCollection").getDocument(myObject.getKey, MyObject.class).get();
101+
MyObject document = arangoDB.db("myDatabase").collection("myCollection").getDocument(myObject.getKey, MyObject.class);
102102
document.getName();
103103
document.getAge();
104104

105105
```
106106

107107
## read document (as VelocyPack)
108108
``` Java
109-
VPackSlice document = arangoDB.db("myDatabase").collection("myCollection").getDocument(myObject.getKey, VPackSlice.class).get();
109+
VPackSlice document = arangoDB.db("myDatabase").collection("myCollection").getDocument(myObject.getKey, VPackSlice.class);
110110
document.get("name").getAsString();
111111
document.get("age").getAsInt();
112112

113113
```
114114

115115
## read document (as Json)
116116
``` Java
117-
arangoDB.db("myDatabase").collection("myCollection").getDocument(myObject.getKey, String.class).get();
117+
arangoDB.db("myDatabase").collection("myCollection").getDocument(myObject.getKey, String.class);
118118

119119
```
120120

121121
## read document by id
122122
``` Java
123-
arangoDB.db("myDatabase").getDocument("myCollection/myKey", MyObject.class).get();
123+
arangoDB.db("myDatabase").getDocument("myCollection/myKey", MyObject.class);
124124

125125
```

0 commit comments

Comments
 (0)