All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | List of all members
Akumuli::ReadOperation Struct Referenceabstract

#include <server.h>

Inheritance diagram for Akumuli::ReadOperation:

Public Member Functions

virtual void start ()=0
virtual void append (const char *data, size_t data_size)=0
virtual aku_Status get_error ()=0
virtual std::tuple< size_t, bool > read_some (char *buf, size_t buf_size)=0
virtual void close ()=0

Detailed Description

Interface to query data.

Member Function Documentation

virtual void Akumuli::ReadOperation::append ( const char *  data,
size_t  data_size 
pure virtual

Append query data to cursor

Implemented in Akumuli::QueryResultsPooler.

virtual void Akumuli::ReadOperation::close ( )
pure virtual

Close cursor. Should be called after read operation was completed or interrupted.

Implemented in Akumuli::QueryResultsPooler.

virtual aku_Status Akumuli::ReadOperation::get_error ( )
pure virtual

Return error code or AKU_SUCCESS. This error code represent result of the query parsing and initial processing. It can indicate error in the query. Result of the call to this function shouldn't change while reading data. If error occurs during reading read_some method should throw an error.

Implemented in Akumuli::QueryResultsPooler.

virtual std::tuple<size_t, bool> Akumuli::ReadOperation::read_some ( char *  buf,
size_t  buf_size 
pure virtual

Read some data from cursor. This method should be called only if get_error have returned AKU_SUCCESS. If some error occured during read operation this method should throw. Method returns tuple (num_elements, is_done). If there is no more results, method returns (any, true) otherwise it returns (any, false). Number of elements can be 0, in this case if second tuple element is false client should call this method again.

Implemented in Akumuli::QueryResultsPooler.

virtual void Akumuli::ReadOperation::start ( )
pure virtual

Start query execution

Implemented in Akumuli::QueryResultsPooler.

The documentation for this struct was generated from the following file: