All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.couchbase.client.java.query.DefaultN1qlQueryRow Maven / Gradle / Ivy

There is a newer version: 3.7.7
Show newest version
package com.couchbase.client.java.query;

import com.couchbase.client.java.document.json.JsonObject;
import com.couchbase.client.java.error.TranscodingException;

public class DefaultN1qlQueryRow implements N1qlQueryRow {


    private final AsyncN1qlQueryRow asyncRow;

    public DefaultN1qlQueryRow(AsyncN1qlQueryRow asyncRow) {
        this.asyncRow = asyncRow;
    }

    @Override
    public byte[] byteValue() {
        return asyncRow.byteValue();
    }

    /**
     * Return the {@link JsonObject} representation of the JSON corresponding to this row.
     * The {@link JsonObject} is lazily created from {@link #byteValue()} the first time it is requested.
     *
     * @return the JsonObject representation of the value.
     * @throws TranscodingException if the lazy deserialization couldn't be performed due to a Jackson error.
     */
    @Override
    public JsonObject value() {
        return asyncRow.value();
    }

    @Override
    public String toString() {
        return value().toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy