Package com.arangodb

Interface ArangoCursor<T>

    • Method Detail

      • getId

        String getId()
        Returns:
        id of temporary cursor created on the server
      • getType

        Class<T> getType()
        Returns:
        the type of the result elements
      • getCount

        Integer getCount()
        Returns:
        the total number of result documents available (only available if the query was executed with the count attribute set)
      • getStats

        CursorStats getStats()
        Returns:
        extra information about the query result. For data-modification queries, the stats will contain the number of modified documents and the number of documents that could not be modified due to an error (if ignoreErrors query option is specified)
      • isCached

        boolean isCached()
        Returns:
        indicating whether the query result was served from the query cache or not
      • asListRemaining

        List<T> asListRemaining()
        Returns:
        the remaining results as a List
      • isPotentialDirtyRead

        boolean isPotentialDirtyRead()
        Returns:
        true if the result is a potential dirty read
        Since:
        ArangoDB 3.10
      • getNextBatchId

        String getNextBatchId()
        Returns:
        The ID of the batch after the current one. The first batch has an ID of 1 and the value is incremented by 1 with every batch. Only set if the allowRetry query option is enabled.
        Since:
        ArangoDB 3.11
      • next

        T next()
        Returns the next element in the iteration.

        If the cursor allows retries (see AqlQueryOptions.allowRetry(Boolean)), then it is safe to retry invoking this method in case of I/O exceptions (which are actually thrown as ArangoDBException with cause IOException).

        If the cursor does not allow retries (default), then it is not safe to retry invoking this method in case of I/O exceptions, since the request to fetch the next batch is not idempotent (i.e. the cursor may advance multiple times on the server).

        Specified by:
        next in interface Iterator<T>
        Returns:
        the next element in the iteration
        Throws:
        NoSuchElementException - if the iteration has no more elements