Skip to content

Commit dbee9a7

Browse files
authored
[DE-331] multi document operations from raw data (#450)
* RawData * addded API methods to handle multi documents from raw data * test fixes * sync implementation * async implementation
1 parent 112b565 commit dbee9a7

16 files changed

+801
-264
lines changed

src/main/java/com/arangodb/ArangoCollection.java

Lines changed: 133 additions & 47 deletions
Large diffs are not rendered by default.

src/main/java/com/arangodb/ArangoDatabase.java

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
245245
* @param query An AQL query string
246246
* @param bindVars key/value pairs defining the variables to bind the query to
247247
* @param options Additional options that will be passed to the query API, can be null
248-
* @param type The type of the result (POJO, {@link com.arangodb.util.RawJson} or
249-
* {@link com.arangodb.util.RawBytes})
248+
* @param type The type of the result (POJO or {@link com.arangodb.util.RawData})
250249
* @return cursor of the results
251250
* @see
252251
* <a href="https://www.arangodb.com/docs/stable/http/aql-query-cursor-accessing-cursors.html#create-cursor">API
@@ -260,8 +259,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
260259
*
261260
* @param query An AQL query string
262261
* @param options Additional options that will be passed to the query API, can be null
263-
* @param type The type of the result (POJO, {@link com.arangodb.util.RawJson} or
264-
* {@link com.arangodb.util.RawBytes})
262+
* @param type The type of the result (POJO or {@link com.arangodb.util.RawData})
265263
* @return cursor of the results
266264
* @see
267265
* <a href="https://www.arangodb.com/docs/stable/http/aql-query-cursor-accessing-cursors.html#create-cursor">API
@@ -275,8 +273,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
275273
*
276274
* @param query An AQL query string
277275
* @param bindVars key/value pairs defining the variables to bind the query to
278-
* @param type The type of the result (POJO, {@link com.arangodb.util.RawJson} or
279-
* {@link com.arangodb.util.RawBytes})
276+
* @param type The type of the result (POJO or {@link com.arangodb.util.RawData})
280277
* @return cursor of the results
281278
* @see
282279
* <a href="https://www.arangodb.com/docs/stable/http/aql-query-cursor-accessing-cursors.html#create-cursor">API
@@ -289,8 +286,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
289286
* result list.
290287
*
291288
* @param query An AQL query string
292-
* @param type The type of the result (POJO, {@link com.arangodb.util.RawJson} or
293-
* {@link com.arangodb.util.RawBytes})
289+
* @param type The type of the result (POJO or {@link com.arangodb.util.RawData})
294290
* @return cursor of the results
295291
* @see
296292
* <a href="https://www.arangodb.com/docs/stable/http/aql-query-cursor-accessing-cursors.html#create-cursor">API
@@ -302,8 +298,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
302298
* Return an cursor from the given cursor-ID if still existing
303299
*
304300
* @param cursorId The ID of the cursor
305-
* @param type The type of the result (POJO, {@link com.arangodb.util.RawJson} or
306-
* {@link com.arangodb.util.RawBytes})
301+
* @param type The type of the result (POJO or {@link com.arangodb.util.RawData})
307302
* @return cursor of the results
308303
* @see <a href=
309304
* "https://www.arangodb.com/docs/stable/http/aql-query-cursor-accessing-cursors
@@ -508,8 +503,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
508503
* Performs a server-side transaction and returns its return value.
509504
*
510505
* @param action A String evaluating to a JavaScript function to be executed on the server.
511-
* @param type The type of the result (POJO, {@link com.arangodb.util.RawJson} or
512-
* {@link com.arangodb.util.RawBytes})
506+
* @param type The type of the result (POJO or {@link com.arangodb.util.RawData})
513507
* @param options Additional options, can be null
514508
* @return the result of the transaction if it succeeded
515509
* @see <a href="https://www.arangodb.com/docs/stable/http/transaction-js-transaction.html#execute-transaction">API
@@ -586,8 +580,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
586580
* Reads a single document
587581
*
588582
* @param id The id of the document
589-
* @param type The type of the document (POJO, {@link com.arangodb.util.RawJson} or
590-
* {@link com.arangodb.util.RawBytes})
583+
* @param type The type of the document (POJO or {@link com.arangodb.util.RawData})
591584
* @return the document identified by the id
592585
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#read-document">API
593586
* Documentation</a>
@@ -598,8 +591,7 @@ public interface ArangoDatabase extends ArangoSerdeAccessor {
598591
* Reads a single document
599592
*
600593
* @param id The id of the document
601-
* @param type The type of the document (POJO, {@link com.arangodb.util.RawJson} or
602-
* {@link com.arangodb.util.RawBytes})
594+
* @param type The type of the document (POJO or {@link com.arangodb.util.RawData})
603595
* @param options Additional options, can be null
604596
* @return the document identified by the id
605597
* @see <a href="https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#read-document">API

src/main/java/com/arangodb/ArangoEdgeCollection.java

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
4949
/**
5050
* Creates a new edge in the collection
5151
*
52-
* @param value A representation of a single edge (POJO, {@link com.arangodb.util.RawJson} or
53-
* {@link com.arangodb.util.RawBytes})
52+
* @param value A representation of a single edge (POJO or {@link com.arangodb.util.RawData})
5453
* @return information about the edge
5554
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#create-an-edge">API Documentation</a>
5655
*/
@@ -59,8 +58,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
5958
/**
6059
* Creates a new edge in the collection
6160
*
62-
* @param value A representation of a single edge (POJO, {@link com.arangodb.util.RawJson} or
63-
* {@link com.arangodb.util.RawBytes})
61+
* @param value A representation of a single edge (POJO or {@link com.arangodb.util.RawData})
6462
* @param options Additional options, can be null
6563
* @return information about the edge
6664
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#create-an-edge">API Documentation</a>
@@ -71,8 +69,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
7169
* Fetches an existing edge
7270
*
7371
* @param key The key of the edge
74-
* @param type The type of the edge-document (POJO, {@link com.arangodb.util.RawJson} or
75-
* {@link com.arangodb.util.RawBytes})
72+
* @param type The type of the edge-document (POJO or {@link com.arangodb.util.RawData})
7673
* @return the edge identified by the key
7774
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#get-an-edge">API Documentation</a>
7875
*/
@@ -82,8 +79,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
8279
* Fetches an existing edge
8380
*
8481
* @param key The key of the edge
85-
* @param type The type of the edge-document (POJO, {@link com.arangodb.util.RawJson} or
86-
* {@link com.arangodb.util.RawBytes})
82+
* @param type The type of the edge-document (POJO or {@link com.arangodb.util.RawData})
8783
* @param options Additional options, can be null
8884
* @return the edge identified by the key
8985
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#get-an-edge">API Documentation</a>
@@ -95,8 +91,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
9591
* violated
9692
*
9793
* @param key The key of the edge
98-
* @param value A representation of a single edge (POJO, {@link com.arangodb.util.RawJson} or
99-
* {@link com.arangodb.util.RawBytes})
94+
* @param value A representation of a single edge (POJO or {@link com.arangodb.util.RawData})
10095
* @return information about the edge
10196
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#replace-an-edge">API Documentation</a>
10297
*/
@@ -107,8 +102,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
107102
* violated
108103
*
109104
* @param key The key of the edge
110-
* @param value A representation of a single edge (POJO, {@link com.arangodb.util.RawJson} or
111-
* {@link com.arangodb.util.RawBytes})
105+
* @param value A representation of a single edge (POJO or {@link com.arangodb.util.RawData})
112106
* @param options Additional options, can be null
113107
* @return information about the edge
114108
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#replace-an-edge">API Documentation</a>
@@ -121,8 +115,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
121115
* do not yet exist, and overwritten in the existing document if they do exist there.
122116
*
123117
* @param key The key of the edge
124-
* @param value A representation of a single edge (POJO, {@link com.arangodb.util.RawJson} or
125-
* {@link com.arangodb.util.RawBytes})
118+
* @param value A representation of a single edge (POJO or {@link com.arangodb.util.RawData})
126119
* @return information about the edge
127120
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#modify-an-edge">API Documentation</a>
128121
*/
@@ -134,8 +127,7 @@ public interface ArangoEdgeCollection extends ArangoSerdeAccessor {
134127
* do not yet exist, and overwritten in the existing document if they do exist there.
135128
*
136129
* @param key The key of the edge
137-
* @param value A representation of a single edge (POJO, {@link com.arangodb.util.RawJson} or
138-
* {@link com.arangodb.util.RawBytes})
130+
* @param value A representation of a single edge (POJO or {@link com.arangodb.util.RawData})
139131
* @param options Additional options, can be null
140132
* @return information about the edge
141133
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-edges.html#modify-an-edge">API Documentation</a>

src/main/java/com/arangodb/ArangoVertexCollection.java

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
5858
/**
5959
* Creates a new vertex in the collection
6060
*
61-
* @param value A representation of a single vertex (POJO, {@link com.arangodb.util.RawJson} or
62-
* {@link com.arangodb.util.RawBytes})
61+
* @param value A representation of a single vertex (POJO or {@link com.arangodb.util.RawData})
6362
* @return information about the vertex
6463
* @see
6564
* <a href="https://www.arangodb.com/docs/stable/http/gharial-vertices.html#create-a-vertex">API Documentation</a>
@@ -69,8 +68,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
6968
/**
7069
* Creates a new vertex in the collection
7170
*
72-
* @param value A representation of a single vertex (POJO, {@link com.arangodb.util.RawJson} or
73-
* {@link com.arangodb.util.RawBytes})
71+
* @param value A representation of a single vertex (POJO or {@link com.arangodb.util.RawData})
7472
* @param options Additional options, can be null
7573
* @return information about the vertex
7674
* @see
@@ -82,8 +80,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
8280
* Retrieves the vertex document with the given {@code key} from the collection.
8381
*
8482
* @param key The key of the vertex
85-
* @param type The type of the vertex-document (POJO, {@link com.arangodb.util.RawJson} or
86-
* {@link com.arangodb.util.RawBytes})
83+
* @param type The type of the vertex-document (POJO or {@link com.arangodb.util.RawData})
8784
* @return the vertex identified by the key
8885
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-vertices.html#get-a-vertex">API Documentation</a>
8986
*/
@@ -93,8 +90,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
9390
* Retrieves the vertex document with the given {@code key} from the collection.
9491
*
9592
* @param key The key of the vertex
96-
* @param type The type of the vertex-document (POJO, {@link com.arangodb.util.RawJson} or
97-
* {@link com.arangodb.util.RawBytes})
93+
* @param type The type of the vertex-document (POJO or {@link com.arangodb.util.RawData})
9894
* @param options Additional options, can be null
9995
* @return the vertex identified by the key
10096
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-vertices.html#get-a-vertex">API Documentation</a>
@@ -106,8 +102,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
106102
* violated
107103
*
108104
* @param key The key of the vertex
109-
* @param value A representation of a single vertex (POJO, {@link com.arangodb.util.RawJson} or
110-
* {@link com.arangodb.util.RawBytes})
105+
* @param value A representation of a single vertex (POJO or {@link com.arangodb.util.RawData})
111106
* @return information about the vertex
112107
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-vertices.html#replace-a-vertex">API
113108
* Documentation</a>
@@ -119,8 +114,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
119114
* violated
120115
*
121116
* @param key The key of the vertex
122-
* @param value A representation of a single vertex (POJO, {@link com.arangodb.util.RawJson} or
123-
* {@link com.arangodb.util.RawBytes})
117+
* @param value A representation of a single vertex (POJO or {@link com.arangodb.util.RawData})
124118
* @param options Additional options, can be null
125119
* @return information about the vertex
126120
* @see <a href="https://www.arangodb.com/docs/stable/http/gharial-vertices.html#replace-a-vertex">API
@@ -134,8 +128,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
134128
* do not yet exist, and overwritten in the existing document if they do exist there.
135129
*
136130
* @param key The key of the vertex
137-
* @param value A representation of a single vertex (POJO, {@link com.arangodb.util.RawJson} or
138-
* {@link com.arangodb.util.RawBytes})
131+
* @param value A representation of a single vertex (POJO or {@link com.arangodb.util.RawData})
139132
* @return information about the vertex
140133
* @see
141134
* <a href="https://www.arangodb.com/docs/stable/http/gharial-vertices.html#modify-a-vertex">API Documentation</a>
@@ -148,8 +141,7 @@ public interface ArangoVertexCollection extends ArangoSerdeAccessor {
148141
* do not yet exist, and overwritten in the existing document if they do exist there.
149142
*
150143
* @param key The key of the vertex
151-
* @param value A representation of a single vertex (POJO, {@link com.arangodb.util.RawJson} or
152-
* {@link com.arangodb.util.RawBytes})
144+
* @param value A representation of a single vertex (POJO or {@link com.arangodb.util.RawData})
153145
* @param options Additional options, can be null
154146
* @return information about the vertex
155147
* @see

0 commit comments

Comments
 (0)