OpenASIP  2.0
Public Member Functions | Static Public Attributes | List of all members
RelationalDBQueryResult Class Referenceabstract

#include <RelationalDBQueryResult.hh>

Inheritance diagram for RelationalDBQueryResult:
Inheritance graph
Collaboration diagram for RelationalDBQueryResult:
Collaboration graph

Public Member Functions

virtual ~RelationalDBQueryResult ()
 
virtual int columns () const
 
virtual int column (const std::string &name) const
 
virtual std::string columnName (std::size_t columnIndex) const
 
virtual const DataObjectdata (std::size_t column) const =0
 
virtual const DataObjectdata (const std::string &name) const
 
virtual bool hasNext ()=0
 
virtual bool next ()=0
 
virtual void bindInt (unsigned int position, int value)
 
virtual void bindString (unsigned int position, const std::string &value)
 
virtual void reset ()
 

Static Public Attributes

static const int UNKNOWN_INDEX = -1
 

Detailed Description

Classes that implement this interface can be used as relational database query result handles.

Definition at line 46 of file RelationalDBQueryResult.hh.

Constructor & Destructor Documentation

◆ ~RelationalDBQueryResult()

RelationalDBQueryResult::~RelationalDBQueryResult ( )
virtual

Destructor.

Definition at line 43 of file RelationalDBQueryResult.cc.

43  {
44 }

Member Function Documentation

◆ bindInt()

void RelationalDBQueryResult::bindInt ( unsigned int  position,
int  value 
)
virtual

Binds int type variable to a prepared sql statement.

Reimplemented in SQLiteQueryResult.

Definition at line 146 of file RelationalDBQueryResult.cc.

146  {
147  return;
148 }

Referenced by HDB::HDBManager::createCostEstimatioDataIdsQuery().

◆ bindString()

void RelationalDBQueryResult::bindString ( unsigned int  position,
const std::string &  value 
)
virtual

Binds string type variable to a prepared sql statement.

Reimplemented in SQLiteQueryResult.

Definition at line 154 of file RelationalDBQueryResult.cc.

155  {
156  return;
157 }

Referenced by HDB::HDBManager::createCostEstimatioDataIdsQuery().

◆ column()

int RelationalDBQueryResult::column ( const std::string &  name) const
virtual

◆ columnName()

std::string RelationalDBQueryResult::columnName ( std::size_t  columnIndex) const
virtual

Returns the name (title) of a column in the result set.

Parameters
columnIndexIndex of the column of which title interested.
Returns
Title. Empty string if unknown (if not supported by the driver or index out of bounds).

Reimplemented in SQLiteQueryResult.

Definition at line 81 of file RelationalDBQueryResult.cc.

81  {
82  return "";
83 }

Referenced by column().

◆ columns()

int RelationalDBQueryResult::columns ( ) const
virtual

Returns the number of columns in the result set.

Returns
Number of columns, UNKNOWN_INDEX if unknown (if not supported by the driver).

Reimplemented in SQLiteQueryResult.

Definition at line 53 of file RelationalDBQueryResult.cc.

53  {
54  return UNKNOWN_INDEX;
55 }

References UNKNOWN_INDEX.

Referenced by column().

◆ data() [1/2]

const DataObject & RelationalDBQueryResult::data ( const std::string &  name) const
virtual

Returns the data of a column in the current row in the result set.

Parameters
nameName of the column of which data to return.
Returns
The data. Returns NullDataObject if the column cannot be found. Also returns NullDataObject in case the feature is not supported by the database implementation.

Reimplemented in SQLiteQueryResult.

Definition at line 110 of file RelationalDBQueryResult.cc.

110  {
111 
112  int columnIndex = column(name);
113  if (columnIndex != UNKNOWN_INDEX) {
114  return data(columnIndex);
115  }
116 
117  return NullDataObject::instance();
118 }

References column(), data(), NullDataObject::instance(), and UNKNOWN_INDEX.

Here is the call graph for this function:

◆ data() [2/2]

const DataObject & RelationalDBQueryResult::data ( std::size_t  column) const
pure virtual

Returns the data of a column in the current row in the result set.

Returns a DataObject with isNull() set in case the value from DB is NULL.

Parameters
columnIndexIndex of the column of which data to return.
Returns
The data. Returns NullDataObject if the index is out of bounds.

Implemented in SQLiteQueryResult.

Definition at line 96 of file RelationalDBQueryResult.cc.

96  {
97  return NullDataObject::instance();
98 }

References NullDataObject::instance().

Referenced by HDB::HDBManager::addBlockImplementationFiles(), HDB::HDBManager::addDataPortsToImplementation(), HDB::HDBManager::addFUExternalPortsToImplementation(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addFUParametersToImplementation(), HDB::HDBManager::addOpcodesToImplementation(), HDB::HDBManager::addOperationPipelinesToFUArchitecture(), HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), InstructionExecution::address(), HDB::HDBManager::addRFExternalPortsToImplementation(), HDB::HDBManager::addRFParametersToImplementation(), DSDBManager::applicationCostEstimatesByConf(), DSDBManager::applicationCount(), DSDBManager::applicationIDs(), DSDBManager::applicationPath(), DSDBManager::archConfigurationIDs(), DSDBManager::architectureId(), DSDBManager::architectureIDs(), DSDBManager::architectureString(), DSDBManager::areaEstimate(), HDB::HDBManager::blockSourceFile(), HDB::HDBManager::busCostEstimationData(), HDB::HDBManager::busCostEstimationDataIDs(), HDB::HDBManager::busCostEstimationDataList(), HDB::HDBManager::busEntryIDs(), ExecutionTrace::busWriteCount(), DSDBManager::configuration(), DSDBManager::configurationId(), DSDBManager::configurationIDs(), HDB::HDBManager::costEstimationData(), HDB::HDBManager::costEstimationDataIDs(), HDB::HDBManager::costEstimationDataValue(), HDB::HDBManager::costFunctionPluginByID(), HDB::HDBManager::costFunctionPluginDataIDs(), HDB::HDBManager::costFunctionPluginIDs(), HDB::HDBManager::createCostFunctionOfFU(), HDB::HDBManager::createCostFunctionOfRF(), HDB::HDBManager::createImplementationOfFU(), HDB::HDBManager::createImplementationOfRF(), InstructionExecution::cycle(), DSDBManager::cycleCount(), data(), SQLiteQueryResult::data(), DSDBManager::energyEstimate(), HDB::HDBManager::fuArchitectureID(), HDB::HDBManager::fuArchitectureIDs(), HDB::HDBManager::fuArchitectureIDsByOperationSet(), HDB::HDBManager::fuByEntryID(), HDB::HDBManager::fuCostEstimationData(), HDB::HDBManager::fuCostEstimationDataIDs(), HDB::HDBManager::fuEntriesByArchitecture(), HDB::HDBManager::fuEntryHasArchitecture(), HDB::HDBManager::fuEntryIDOfImplementation(), HDB::HDBManager::fuEntryIDs(), ExecutionTrace::functionUnitOperationTriggerCounts(), HDB::HDBManager::hasColumn(), DSDBManager::implementationString(), DSDBManager::longestPathDelayEstimate(), HDB::HDBManager::OperationImplementationByID(), HDB::HDBManager::OperationImplementationIDs(), HDB::HDBManager::OperationImplementationResourceByID(), HDB::HDBManager::OperationImplementationResourceIDs(), DSDBManager::paretoSetConnectivityAndCycles(), ExecutionTrace::registerFileAccessCounts(), HDB::HDBManager::removeBusEntry(), HDB::HDBManager::removeFUEntry(), HDB::HDBManager::removeOperationImplementation(), HDB::HDBManager::removeOperationImplementationResource(), HDB::HDBManager::removeRFEntry(), HDB::HDBManager::removeSocketEntry(), HDB::HDBManager::resolveArchitecturePort(), HDB::HDBManager::rfArchitectureByID(), HDB::HDBManager::rfArchitectureID(), HDB::HDBManager::rfArchitectureIDs(), HDB::HDBManager::rfByEntryID(), HDB::HDBManager::rfCostEstimationData(), HDB::HDBManager::rfCostEstimationDataIDs(), HDB::HDBManager::rfEntriesByArchitecture(), HDB::HDBManager::rfEntryHasArchitecture(), HDB::HDBManager::rfEntryIDOfImplementation(), HDB::HDBManager::rfEntryIDs(), SQLiteConnection::rowCountInTable(), ExecutionTrace::simulatedCycleCount(), HDB::HDBManager::socketCostEstimationData(), HDB::HDBManager::socketCostEstimationDataIDs(), HDB::HDBManager::socketCostEstimationDataList(), HDB::HDBManager::socketEntryIDs(), ExecutionTrace::socketWriteCount(), SQLiteConnection::tableExistsInDB(), and SQLiteConnection::version().

Here is the call graph for this function:

◆ hasNext()

bool RelationalDBQueryResult::hasNext ( )
pure virtual

Queries if the result set contains more rows.

Returns
True if there are more rows that can be accessed with next().

Implemented in SQLiteQueryResult.

Definition at line 126 of file RelationalDBQueryResult.cc.

126  {
127  return false;
128 }

Referenced by HDB::HDBManager::addBlockImplementationFiles(), HDB::HDBManager::addDataPortsToImplementation(), HDB::HDBManager::addFUExternalPortsToImplementation(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addFUParametersToImplementation(), HDB::HDBManager::addOpcodesToImplementation(), HDB::HDBManager::addOperationPipelinesToFUArchitecture(), HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), HDB::HDBManager::addRFExternalPortsToImplementation(), HDB::HDBManager::addRFParametersToImplementation(), DSDBManager::applicationCostEstimatesByConf(), DSDBManager::applicationCount(), DSDBManager::applicationIDs(), DSDBManager::applicationPath(), DSDBManager::archConfigurationIDs(), DSDBManager::architectureId(), DSDBManager::architectureIDs(), DSDBManager::architectureString(), DSDBManager::areaEstimate(), HDB::HDBManager::blockSourceFile(), HDB::HDBManager::busCostEstimationData(), HDB::HDBManager::busCostEstimationDataIDs(), HDB::HDBManager::busCostEstimationDataList(), HDB::HDBManager::busEntryIDs(), ExecutionTrace::busWriteCount(), HDB::HDBManager::canRemoveFUArchitecture(), HDB::HDBManager::canRemoveRFArchitecture(), DSDBManager::configuration(), DSDBManager::configurationId(), DSDBManager::configurationIDs(), HDB::HDBManager::containsFUArchitecture(), HDB::HDBManager::containsImplementationFile(), HDB::HDBManager::containsOperation(), HDB::HDBManager::containsRFArchitecture(), HDB::HDBManager::costEstimationData(), HDB::HDBManager::costEstimationDataIDs(), HDB::HDBManager::costEstimationDataValue(), HDB::HDBManager::costFunctionPluginByID(), HDB::HDBManager::costFunctionPluginDataIDs(), HDB::HDBManager::costFunctionPluginIDs(), HDB::HDBManager::createCostFunctionOfFU(), HDB::HDBManager::createCostFunctionOfRF(), HDB::HDBManager::createImplementationOfFU(), HDB::HDBManager::createImplementationOfRF(), DSDBManager::cycleCount(), DSDBManager::energyEstimate(), HDB::HDBManager::fuArchitectureID(), HDB::HDBManager::fuArchitectureIDs(), HDB::HDBManager::fuArchitectureIDsByOperationSet(), HDB::HDBManager::fuByEntryID(), HDB::HDBManager::fuCostEstimationData(), HDB::HDBManager::fuCostEstimationDataIDs(), HDB::HDBManager::fuEntriesByArchitecture(), HDB::HDBManager::fuEntryHasArchitecture(), HDB::HDBManager::fuEntryIDOfImplementation(), HDB::HDBManager::fuEntryIDs(), ExecutionTrace::functionUnitOperationTriggerCounts(), DSDBManager::hasApplication(), DSDBManager::hasArchitecture(), HDB::HDBManager::hasBusEntry(), HDB::HDBManager::hasColumn(), DSDBManager::hasConfiguration(), HDB::HDBManager::hasCostEstimationDataByID(), HDB::HDBManager::hasCostFunctionPluginByID(), DSDBManager::hasCycleCount(), DSDBManager::hasEnergyEstimate(), HDB::HDBManager::hasFUEntry(), DSDBManager::hasImplementation(), InstructionExecution::hasNext(), HDB::HDBManager::hasRFEntry(), HDB::HDBManager::hasSocketEntry(), DSDBManager::implementationString(), DSDBManager::isUnschedulable(), DSDBManager::longestPathDelayEstimate(), InstructionExecution::next(), HDB::HDBManager::OperationImplementationByID(), HDB::HDBManager::OperationImplementationIDs(), HDB::HDBManager::OperationImplementationResourceByID(), HDB::HDBManager::OperationImplementationResourceIDs(), DSDBManager::paretoSetConnectivityAndCycles(), ExecutionTrace::registerFileAccessCounts(), HDB::HDBManager::removeBusEntry(), HDB::HDBManager::removeFUEntry(), HDB::HDBManager::removeOperationImplementation(), HDB::HDBManager::removeOperationImplementationResource(), HDB::HDBManager::removeRFEntry(), HDB::HDBManager::removeSocketEntry(), HDB::HDBManager::resolveArchitecturePort(), HDB::HDBManager::rfArchitectureByID(), HDB::HDBManager::rfArchitectureID(), HDB::HDBManager::rfArchitectureIDs(), HDB::HDBManager::rfByEntryID(), HDB::HDBManager::rfCostEstimationData(), HDB::HDBManager::rfCostEstimationDataIDs(), HDB::HDBManager::rfEntriesByArchitecture(), HDB::HDBManager::rfEntryHasArchitecture(), HDB::HDBManager::rfEntryIDOfImplementation(), HDB::HDBManager::rfEntryIDs(), SQLiteConnection::rowCountInTable(), ExecutionTrace::simulatedCycleCount(), HDB::HDBManager::socketCostEstimationData(), HDB::HDBManager::socketCostEstimationDataIDs(), HDB::HDBManager::socketCostEstimationDataList(), HDB::HDBManager::socketEntryIDs(), ExecutionTrace::socketWriteCount(), SQLiteConnection::tableExistsInDB(), and SQLiteConnection::version().

◆ next()

bool RelationalDBQueryResult::next ( )
pure virtual

Advances the row cursor to next row in the result set.

In case the current row is the last row this method does nothing.

Returns
True if there are still more rows to fetch. *

Implemented in SQLiteQueryResult.

Definition at line 138 of file RelationalDBQueryResult.cc.

138  {
139  return false;
140 }

Referenced by HDB::HDBManager::addBlockImplementationFiles(), HDB::HDBManager::addDataPortsToImplementation(), HDB::HDBManager::addFUExternalPortsToImplementation(), HDB::HDBManager::addFUImplementation(), HDB::HDBManager::addFUParametersToImplementation(), HDB::HDBManager::addOpcodesToImplementation(), HDB::HDBManager::addOperationPipelinesToFUArchitecture(), HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), HDB::HDBManager::addRFExternalPortsToImplementation(), HDB::HDBManager::addRFParametersToImplementation(), DSDBManager::applicationCostEstimatesByConf(), DSDBManager::applicationCount(), DSDBManager::applicationIDs(), DSDBManager::applicationPath(), DSDBManager::archConfigurationIDs(), DSDBManager::architectureId(), DSDBManager::architectureIDs(), DSDBManager::architectureString(), DSDBManager::areaEstimate(), HDB::HDBManager::blockSourceFile(), HDB::HDBManager::busCostEstimationData(), HDB::HDBManager::busCostEstimationDataIDs(), HDB::HDBManager::busCostEstimationDataList(), HDB::HDBManager::busEntryIDs(), ExecutionTrace::busWriteCount(), DSDBManager::configuration(), DSDBManager::configurationId(), DSDBManager::configurationIDs(), HDB::HDBManager::costEstimationData(), HDB::HDBManager::costEstimationDataIDs(), HDB::HDBManager::costEstimationDataValue(), HDB::HDBManager::costFunctionPluginByID(), HDB::HDBManager::costFunctionPluginDataIDs(), HDB::HDBManager::costFunctionPluginIDs(), HDB::HDBManager::createCostFunctionOfFU(), HDB::HDBManager::createCostFunctionOfRF(), HDB::HDBManager::createImplementationOfFU(), HDB::HDBManager::createImplementationOfRF(), DSDBManager::cycleCount(), DSDBManager::energyEstimate(), HDB::HDBManager::fuArchitectureID(), HDB::HDBManager::fuArchitectureIDs(), HDB::HDBManager::fuArchitectureIDsByOperationSet(), HDB::HDBManager::fuByEntryID(), HDB::HDBManager::fuCostEstimationData(), HDB::HDBManager::fuCostEstimationDataIDs(), HDB::HDBManager::fuEntriesByArchitecture(), HDB::HDBManager::fuEntryHasArchitecture(), HDB::HDBManager::fuEntryIDOfImplementation(), HDB::HDBManager::fuEntryIDs(), ExecutionTrace::functionUnitOperationTriggerCounts(), HDB::HDBManager::hasBusEntry(), HDB::HDBManager::hasColumn(), HDB::HDBManager::hasCostEstimationDataByID(), HDB::HDBManager::hasCostFunctionPluginByID(), HDB::HDBManager::hasFUEntry(), HDB::HDBManager::hasRFEntry(), HDB::HDBManager::hasSocketEntry(), DSDBManager::implementationString(), DSDBManager::longestPathDelayEstimate(), InstructionExecution::next(), HDB::HDBManager::OperationImplementationByID(), HDB::HDBManager::OperationImplementationIDs(), HDB::HDBManager::OperationImplementationResourceByID(), HDB::HDBManager::OperationImplementationResourceIDs(), DSDBManager::paretoSetConnectivityAndCycles(), ExecutionTrace::registerFileAccessCounts(), HDB::HDBManager::removeBusEntry(), HDB::HDBManager::removeFUEntry(), HDB::HDBManager::removeOperationImplementation(), HDB::HDBManager::removeOperationImplementationResource(), HDB::HDBManager::removeRFEntry(), HDB::HDBManager::removeSocketEntry(), HDB::HDBManager::resolveArchitecturePort(), HDB::HDBManager::rfArchitectureByID(), HDB::HDBManager::rfArchitectureID(), HDB::HDBManager::rfArchitectureIDs(), HDB::HDBManager::rfByEntryID(), HDB::HDBManager::rfCostEstimationData(), HDB::HDBManager::rfCostEstimationDataIDs(), HDB::HDBManager::rfEntriesByArchitecture(), HDB::HDBManager::rfEntryHasArchitecture(), HDB::HDBManager::rfEntryIDOfImplementation(), HDB::HDBManager::rfEntryIDs(), SQLiteConnection::rowCountInTable(), ExecutionTrace::simulatedCycleCount(), HDB::HDBManager::socketCostEstimationData(), HDB::HDBManager::socketCostEstimationDataIDs(), HDB::HDBManager::socketCostEstimationDataList(), HDB::HDBManager::socketEntryIDs(), ExecutionTrace::socketWriteCount(), SQLiteConnection::tableExistsInDB(), and SQLiteConnection::version().

◆ reset()

void RelationalDBQueryResult::reset ( )
virtual

Resets s prepared sql statement.

Reimplemented in SQLiteQueryResult.

Definition at line 163 of file RelationalDBQueryResult.cc.

163  {
164  return;
165 }

Referenced by HDB::HDBManager::costEstimationDataIDs().

Member Data Documentation

◆ UNKNOWN_INDEX

const int RelationalDBQueryResult::UNKNOWN_INDEX = -1
static

The documentation for this class was generated from the following files:
RelationalDBQueryResult::data
virtual const DataObject & data(std::size_t column) const =0
Definition: RelationalDBQueryResult.cc:96
RelationalDBQueryResult::UNKNOWN_INDEX
static const int UNKNOWN_INDEX
Definition: RelationalDBQueryResult.hh:50
RelationalDBQueryResult::columnName
virtual std::string columnName(std::size_t columnIndex) const
Definition: RelationalDBQueryResult.cc:81
RelationalDBQueryResult::column
virtual int column(const std::string &name) const
Definition: RelationalDBQueryResult.cc:64
RelationalDBQueryResult::columns
virtual int columns() const
Definition: RelationalDBQueryResult.cc:53
NullDataObject::instance
static NullDataObject & instance()
Definition: DataObject.cc:542