Interface ArangoDBTemplate

All Superinterfaces:
org.eclipse.jnosql.mapping.document.DocumentTemplate, org.eclipse.jnosql.mapping.semistructured.SemiStructuredTemplate, jakarta.nosql.Template

public interface ArangoDBTemplate extends org.eclipse.jnosql.mapping.document.DocumentTemplate
A specialized DocumentTemplate for ArangoDB, providing methods to execute queries using the ArangoDB Query Language (AQL). This template allows executing AQL queries with named parameters and supports result serialization either through Eclipse JNoSQL or directly via ArangoDB.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Stream<T>
    aql(String query, Class<T> type)
    Executes an ArangoDB query using AQL with an empty parameter map.
    <T> Stream<T>
    aql(String query, Map<String,Object> params)
    Executes an ArangoDB query using the ArangoDB Query Language (AQL).
    <T> Stream<T>
    aql(String query, Map<String,Object> params, Class<T> type)
    Executes an ArangoDB query using AQL with direct serialization via ArangoDB.

    Methods inherited from interface org.eclipse.jnosql.mapping.semistructured.SemiStructuredTemplate

    count, count, count, delete, deleteAll, exists, findAll, prepare, prepare, query, query, select, selectCursor, selectOffSet, singleResult, singleResult, singleResult

    Methods inherited from interface jakarta.nosql.Template

    delete, delete, find, insert, insert, insert, insert, select, update, update
  • Method Details

    • aql

      <T> Stream<T> aql(String query, Map<String,Object> params)
      Executes an ArangoDB query using the ArangoDB Query Language (AQL).

      Example query:

      
       FOR u IN users FILTER u.status == @status RETURN u
       

      The conversion of query results to entity objects is handled by Eclipse JNoSQL, applying all supported annotations.

      Type Parameters:
      T - the entity type
      Parameters:
      query - the AQL query string
      params - a map containing named parameters for the query
      Returns:
      a Stream of entities representing the query result
      Throws:
      NullPointerException - if query or params is null
    • aql

      <T> Stream<T> aql(String query, Map<String,Object> params, Class<T> type)
      Executes an ArangoDB query using AQL with direct serialization via ArangoDB.

      Example query:

      
       FOR u IN users FILTER u.status == @status RETURN u
       

      The serialization of query results is performed directly by ArangoDB using ArangoDatabase.query(String, Class), bypassing Eclipse JNoSQL converters. Consequently, annotations supported by Eclipse JNoSQL are ignored.

      Type Parameters:
      T - the expected result type
      Parameters:
      query - the AQL query string
      params - a map containing named parameters for the query
      type - the target class for result serialization
      Returns:
      a Stream of results of type T
      Throws:
      NullPointerException - if query, params, or type is null
    • aql

      <T> Stream<T> aql(String query, Class<T> type)
      Executes an ArangoDB query using AQL with an empty parameter map.

      Example query:

      
       FOR u IN users FILTER u.status == @status RETURN u
       

      The serialization of query results is performed directly by ArangoDB using ArangoDatabase.query(String, Class). This means that Eclipse JNoSQL annotations will not be considered.

      Type Parameters:
      T - the expected result type
      Parameters:
      query - the AQL query string
      type - the target class for result serialization
      Returns:
      a Stream of results of type T
      Throws:
      NullPointerException - if query or type is null