libdballe  9.11
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
dballe::impl::msg::CursorData Struct Reference
Inheritance diagram for dballe::impl::msg::CursorData:
dballe::impl::CursorData dballe::CursorData dballe::Cursor

Public Member Functions

 CursorData (const impl::Message &msg, bool merged=false)
 
bool has_value () const override
 Check if the cursor points to a valid value. More...
 
int remaining () const override
 Get the number of rows still to be fetched. More...
 
bool next () override
 Get a new item from the results of a query. More...
 
void discard () override
 Discard the results that have not been read yet.
 
void enq (Enq &enq) const override
 
DBStation get_station () const override
 Get the whole station data in a single call.
 
wreport::Varcode get_varcode () const override
 Get the variable code.
 
wreport::Var get_var () const override
 Get the variable.
 
Level get_level () const override
 Get the level.
 
Trange get_trange () const override
 Get the time range.
 
Datetime get_datetime () const override
 Get the datetime.
 

Static Public Member Functions

static std::shared_ptr< CursorDatadowncast (std::shared_ptr< dballe::CursorData > c)
 Downcast a unique_ptr pointer.
 
- Static Public Member Functions inherited from dballe::impl::CursorData
static std::shared_ptr< CursorDatadowncast (std::shared_ptr< dballe::CursorData > c)
 Downcast a shared_ptr pointer.
 
static std::shared_ptr< CursorDatamake_empty ()
 Create a CursorData iterating on no results.
 

Public Attributes

dballe::DBStation station
 
Datetime datetime
 
std::vector< CursorDataRowrows
 
std::vector< CursorDataRow >::const_iterator cur
 
bool at_start = true
 

Member Function Documentation

◆ has_value()

bool dballe::impl::msg::CursorData::has_value ( ) const
inlineoverridevirtual

Check if the cursor points to a valid value.

Returns
true if the cursor points to a valid accessible value, false if next() has not been called yet, or if at the end of iteration (i.e. next() returned false)

Implements dballe::Cursor.

◆ next()

bool dballe::impl::msg::CursorData::next ( )
inlineoverridevirtual

Get a new item from the results of a query.

Returns
true if a new record has been read, false if there is no more data to read

Implements dballe::Cursor.

◆ remaining()

int dballe::impl::msg::CursorData::remaining ( ) const
inlineoverridevirtual

Get the number of rows still to be fetched.

Returns
The number of rows still to be queried. The value is undefined if no query has been successfully peformed yet using this cursor.

Implements dballe::Cursor.


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