Skip to content

Commit b39e114

Browse files
committed
docs: update arangodb documentation
Signed-off-by: Otavio Santana <[email protected]>
1 parent c536ba2 commit b39e114

File tree

1 file changed

+41
-26
lines changed

1 file changed

+41
-26
lines changed

jnosql-arangodb/src/main/java/org/eclipse/jnosql/databases/arangodb/mapping/ArangoDBTemplate.java

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,63 @@
2020

2121
import java.util.Map;
2222
import java.util.stream.Stream;
23-
2423
/**
25-
* A {@link JNoSQLDocumentTemplate} to arangoDB
24+
* A template specialization for ArangoDB that includes capabilities for executing ArangoDB query language, AQL.
25+
* This template extends {@link JNoSQLDocumentTemplate} and provides methods for executing AQL queries with various
26+
* options.
2627
*/
2728
public interface ArangoDBTemplate extends JNoSQLDocumentTemplate {
2829

2930
/**
30-
* Executes ArangoDB query language, AQL.
31-
* <p>FOR u IN users FILTER u.status == @status RETURN u </p>
31+
* Executes an ArangoDB query using the ArangoDB Query Language (AQL).
32+
*
33+
* <p>Example query: {@code FOR u IN users FILTER u.status == @status RETURN u}</p>
34+
*
35+
* <p>The conversion from the query result to entities will happen at the Eclipse JNoSQL side.
36+
* It will utilize and consider all the annotations supported by Eclipse JNoSQL.</p>
3237
*
33-
* @param <T> entity class
34-
* @param query the query
35-
* @param params the named queries
36-
* @return the query result
37-
* @throws NullPointerException when either query or params are null
38+
* @param <T> the entity class
39+
* @param query the AQL query
40+
* @param params the named parameters for the query
41+
* @return a {@link Stream} of entities representing the query result
42+
* @throws NullPointerException when either the query or params are null
3843
*/
3944
<T> Stream<T> aql(String query, Map<String, Object> params);
4045

4146
/**
42-
* Executes ArangoDB query language, AQL.
43-
* <p>FOR u IN users FILTER u.status == @status RETURN u </p>
47+
* Executes an ArangoDB query using the ArangoDB Query Language (AQL).
48+
*
49+
* <p>Example query: {@code FOR u IN users FILTER u.status == @status RETURN u}</p>
50+
*
51+
* <p>The serialization of the query result will happen at the ArangoDB side using
52+
* {@link com.arangodb.ArangoDatabase#query(String, Class)}. This serialization does not have any converter support
53+
* at the mapper side,
54+
* thus it will ignore any annotations that Eclipse JNoSQL has.</p>
4455
*
45-
* @param query the query
46-
* @param params named query
47-
* @param type The type of the result
48-
* @param <T> the type
49-
* @return the query result
50-
* @throws NullPointerException when either query or params are null
56+
* @param query the AQL query
57+
* @param params the named parameters for the query
58+
* @param type the type of the result
59+
* @param <T> the type
60+
* @return a {@link Stream} of the specified type representing the query result
61+
* @throws NullPointerException when either the query or params are null
5162
*/
5263
<T> Stream<T> aql(String query, Map<String, Object> params, Class<T> type);
5364

5465
/**
55-
* Executes ArangoDB query language, AQL.
56-
* <p>FOR u IN users FILTER u.status == @status RETURN u </p>
66+
* Executes an ArangoDB query using the ArangoDB Query Language (AQL) with an empty parameter map.
5767
*
58-
* @param query the query
59-
* @param type The type of the result
60-
* @param <T> the type
61-
* @return the query result
62-
* @throws NullPointerException when either query or values are null
68+
* <p>Example query: {@code FOR u IN users FILTER u.status == @status RETURN u}</p>
69+
*
70+
* <p>The serialization of the query result will happen at the ArangoDB side using
71+
* {@link com.arangodb.ArangoDatabase#query(String, Class)}. This serialization does not have any converter support
72+
* at the mapper side,
73+
* thus it will ignore any annotations that Eclipse JNoSQL has.</p>
74+
*
75+
* @param query the AQL query
76+
* @param type the type of the result
77+
* @param <T> the type
78+
* @return a {@link Stream} of the specified type representing the query result
79+
* @throws NullPointerException when either the query or type are null
6380
*/
6481
<T> Stream<T> aql(String query, Class<T> type);
65-
66-
6782
}

0 commit comments

Comments
 (0)