Couchbase::View::Handle - Class for view query handles
This is a subclass of Couchbase::Document. It contains some view-specific information. The fields of this object will only contain meaningful values once the query has been completed (i.e. if calling
view_iterator, ensure the iterator has been exhausted).
The row object (nominally,
Couchbase::View::Row) is the object used to represent a single view row. This object is returned by the "next" method (when using an iterator) or as the element type of the "rows" arrayref (if using slurp mode). The row object contains the following fields
This is the key emitted as the first argument of the
This is the value emitted as the second argument of the
This is the document ID associated with the row. This will only be present if the
reduce function is not used in the query.
Valid only for geospatial views, contains the GeoJSON of the given result. Note that this is the geometry of the emitted item, and may be partially outside the
This special field contains a Couchbase::Document instance if the
include_docs option was set when the query was made. The document is fetched internally by the library for each row which has a valid "id" field present.
view_slurp documentation for more information on
Valid only in slurp mode.
Returns the rows for the query
Valid only in iterator mode.
Abort iteration. This means to stop fetching extra data from the network. There will likely still be extra data available from "next"
Returns the total amount of rows in the result set. This does not mean the amount of rows which will be returned via the iterator, but rather the server-side count of the the rows which matched the query parameters
Return the remaining JSON structure as a read-only hashref. Useful if you think the iterator is missing something.
Returns the HTTP status code for the operation, e.g
Returns extended (non-http, non-libcouchbase, non-memcached) error information. This is usually a hash converted from a JSON error response.