libdballe 9.14
dballe::db::v7::cursor::Data Struct Reference

CursorData implementation. More...

#include <cursor.h>

Inheritance diagram for dballe::db::v7::cursor::Data:
dballe::db::v7::cursor::LevTrBase< Data > dballe::db::v7::cursor::Base< Data >

Public Member Functions

 Data (DataQueryBuilder &qb, bool with_attributes)
std::shared_ptr< dballe::db::Transactionget_transaction () const override
Datetime get_datetime () const override
wreport::Varcode get_varcode () const override
wreport::Var get_var () const override
int attr_reference_id () const override
Level get_level () const override
Trange get_trange () const override
void query_attrs (std::function< void(std::unique_ptr< wreport::Var >)> dest, bool force_read) override
void remove () override
void enq (impl::Enq &enq) const override
Public Member Functions inherited from dballe::db::v7::cursor::LevTrBase< Data >
bool next () override
void discard () override
Public Member Functions inherited from dballe::db::v7::cursor::Base< Data >
 Base (std::shared_ptr< v7::Transaction > tr)
int remaining () const override
bool has_value () const override
bool next () override
void discard () override
dballe::DBStation get_station () const override
unsigned test_iterate (FILE *dump=0) override
 Iterate the cursor until the end, returning the number of items.
const Row & row () const

Public Attributes

bool with_attributes
Public Attributes inherited from dballe::db::v7::cursor::Base< Data >
std::shared_ptr< v7::Transactiontr
 Database to operate on.
std::deque< Row > results
 Storage for the raw database results.
bool at_start
 True if we are at the start of the iteration.

Protected Member Functions

bool add_to_best_results (const dballe::DBStation &station, int id_levtr, const Datetime &datetime, int id_data, std::unique_ptr< wreport::Var > var)
 Append or replace the last result according to priority.
bool add_to_last_results (const dballe::DBStation &station, int id_levtr, const Datetime &datetime, int id_data, std::unique_ptr< wreport::Var > var)
 Append or replace the last result according to datetime.
void load (Tracer<> &trc, const DataQueryBuilder &qb)
void load_best (Tracer<> &trc, const DataQueryBuilder &qb)
void load_last (Tracer<> &trc, const DataQueryBuilder &qb)
Protected Member Functions inherited from dballe::db::v7::cursor::LevTrBase< Data >
const LevTrEntryget_levtr () const
Protected Member Functions inherited from dballe::db::v7::cursor::Base< Data >
int get_priority () const

Protected Attributes

int insert_cur_prio
Protected Attributes inherited from dballe::db::v7::cursor::LevTrBase< Data >
const LevTrEntrylevtr

Friends

std::shared_ptr< dballe::CursorDatarun_data_query (Tracer<> &trc, std::shared_ptr< v7::Transaction > tr, const core::Query &query, bool explain)

Additional Inherited Members

Public Types inherited from dballe::db::v7::cursor::Base< Data >
typedef ImplTraits< Data >::Row Row
typedef ImplTraits< Data >::Interface Interface
Static Public Member Functions inherited from dballe::db::v7::cursor::Base< Data >
static std::shared_ptr< Datadowncast (std::shared_ptr< Interface > c)

Detailed Description

CursorData implementation.

Member Function Documentation

◆ add_to_best_results()

bool dballe::db::v7::cursor::Data::add_to_best_results ( const dballe::DBStation & station,
int id_levtr,
const Datetime & datetime,
int id_data,
std::unique_ptr< wreport::Var > var )
protected

Append or replace the last result according to priority.

Returns false if the value has been ignored.

◆ add_to_last_results()

bool dballe::db::v7::cursor::Data::add_to_last_results ( const dballe::DBStation & station,
int id_levtr,
const Datetime & datetime,
int id_data,
std::unique_ptr< wreport::Var > var )
protected

Append or replace the last result according to datetime.

Returns false if the value has been ignored.

References dballe::db::v7::cursor::Base< Data >::tr.


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