Class AnalyticsResult

java.lang.Object
com.couchbase.client.java.analytics.AnalyticsResult

public class AnalyticsResult extends Object
The result of an analytics query, including rows and associated metadata.
Since:
3.0.0
  • Method Details

    • rowsAs

      public <T> List<T> rowsAs(Class<T> target)
      Returns all rows, converted into instances of the target class.
      Type Parameters:
      T - the generic type to cast the rows into.
      Parameters:
      target - the target class to deserialize into.
      Returns:
      the Rows as a list of the generic target type.
      Throws:
      DecodingFailureException - if any row could not be successfully deserialized.
    • rowsAs

      public <T> List<T> rowsAs(TypeRef<T> target)
      Returns all rows, converted into instances of the target type.
      Type Parameters:
      T - the generic type to cast the rows into.
      Parameters:
      target - the target type to deserialize into.
      Returns:
      the Rows as a list of the generic target type.
      Throws:
      DecodingFailureException - if any row could not be successfully deserialized.
    • rowsAsObject

      public List<JsonObject> rowsAsObject()
      Returns all rows, converted into JsonObjects.
      Returns:
      the Rows as a list of JsonObjects.
      Throws:
      DecodingFailureException - if any row could not be successfully deserialized.
    • metaData

      public AnalyticsMetaData metaData()
      Returns the AnalyticsMetaData giving access to the additional metadata associated with this analytics query.
      Returns:
      the analytics metadata.
    • toString

      public String toString()
      Overrides:
      toString in class Object