Class QueryRow

java.lang.Object
com.couchbase.client.java.query.QueryRow

@Volatile public final class QueryRow extends Object
One row of a SQL++ query result.
See Also:
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    QueryRow(byte[] content, JsonSerializer deserializer)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    byte[]
    Returns the raw content of the row, exactly as it was received from the server.
    <T> T
    contentAs(TypeRef<T> type)
    Returns the content of the row deserialized as an instance of the specified type, or null if the row content is a literal null.
    <T> T
    contentAs(Class<T> type)
    Returns the content of the row deserialized as an instance of the specified type, or null if the row's content is a literal null.
    Returns the content of the row deserialized as a JsonObject, or null if the row content is a literal null.
     

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details Link icon

  • Method Details Link icon

    • bytes Link icon

      public byte[] bytes()
      Returns the raw content of the row, exactly as it was received from the server.

      This method returns the same array each time it is called.

    • contentAsObject Link icon

      public JsonObject contentAsObject()
      Returns the content of the row deserialized as a JsonObject, or null if the row content is a literal null.
      Throws:
      DecodingFailureException - if the row could not be deserialized into an instance of the specified type.
    • contentAs Link icon

      public <T> T contentAs(Class<T> type)
      Returns the content of the row deserialized as an instance of the specified type, or null if the row's content is a literal null.
      Throws:
      DecodingFailureException - if the row could not be deserialized into an instance of the specified type.
    • contentAs Link icon

      public <T> T contentAs(TypeRef<T> type)
      Returns the content of the row deserialized as an instance of the specified type, or null if the row content is a literal null.
      Throws:
      DecodingFailureException - if the row could not be deserialized into an instance of the specified type.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object