OpenASIP
2.0
|
#include <RelationalDBConnection.hh>
Public Member Functions | |
virtual | ~RelationalDBConnection () |
virtual int | updateQuery (const std::string &queryString)=0 |
virtual void | DDLQuery (const std::string &queryString)=0 |
virtual RelationalDBQueryResult * | query (const std::string &queryString, bool init=true)=0 |
virtual void | beginTransaction ()=0 |
virtual void | rollback ()=0 |
virtual void | commit ()=0 |
virtual RowID | lastInsertRowID ()=0 |
virtual int | version ()=0 |
virtual void | updateVersion (int version)=0 |
virtual bool | tableExistsInDB (const std::string &tableName)=0 |
virtual int | rowCountInTable (const std::string &tableName)=0 |
Classes that implement this interface can be used as relational database connection handles.
Definition at line 48 of file RelationalDBConnection.hh.
|
virtual |
|
pure virtual |
Starts a new database transaction.
Also ends the possible previous transaction successfully (commit).
RelationalDBException | In case a database error occured. |
Implemented in SQLiteConnection.
Definition at line 92 of file RelationalDBConnection.cc.
Referenced by DSDBManager::addApplication(), DSDBManager::addArchitecture(), DSDBManager::addConfiguration(), HDB::HDBManager::addCostFunctionPlugin(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUImplementation(), DSDBManager::addImplementation(), HDB::HDBManager::addRFImplementation(), ExecutionTrace::open(), DSDBManager::removeApplication(), DSDBManager::removeConfiguration(), HDB::HDBManager::removeCostFunctionPlugin(), HDB::HDBManager::removeFUArchitecture(), HDB::HDBManager::removeFUImplementation(), and HDB::HDBManager::removeRFImplementation().
|
pure virtual |
Ends the current database transaction successfully and commits all the changes in the transaction to the database.
RelationalDBException | In case a database error occured. |
Implemented in SQLiteConnection.
Definition at line 110 of file RelationalDBConnection.cc.
Referenced by DSDBManager::addApplication(), DSDBManager::addArchitecture(), DSDBManager::addConfiguration(), HDB::HDBManager::addCostFunctionPlugin(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUImplementation(), DSDBManager::addImplementation(), HDB::HDBManager::addRFImplementation(), DSDBManager::removeApplication(), DSDBManager::removeConfiguration(), HDB::HDBManager::removeCostFunctionPlugin(), HDB::HDBManager::removeFUArchitecture(), HDB::HDBManager::removeFUImplementation(), HDB::HDBManager::removeRFImplementation(), and ExecutionTrace::~ExecutionTrace().
|
pure virtual |
Performs a SQL Data Definition Language query, that is a query that may change the structure of the database (CREATE TABLE, etc.).
Does not autocommit the changes in case the update is in the middle of transaction.
queryString | The query string. |
RelationalDBException | In case a database error occured. |
Implemented in SQLiteConnection.
Definition at line 69 of file RelationalDBConnection.cc.
Referenced by HDB::HDBManager::addRFImplementation(), HDB::HDBManager::createNew(), DSDBManager::createNew(), HDB::HDBManager::HDBManager(), and ExecutionTrace::initialize().
|
pure virtual |
Implemented in SQLiteConnection.
Referenced by DSDBManager::addApplication(), DSDBManager::addArchitecture(), HDB::HDBManager::addBusCostEstimationData(), HDB::HDBManager::addBusEntry(), DSDBManager::addConfiguration(), HDB::HDBManager::addCostEstimationData(), HDB::HDBManager::addCostFunctionPlugin(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUCostEstimationData(), HDB::HDBManager::addFUEntry(), HDB::HDBManager::addFUImplementation(), DSDBManager::addImplementation(), HDB::HDBManager::addOperationImplementation(), HDB::HDBManager::addOperationImplementationResource(), HDB::HDBManager::addRFArchitecture(), HDB::HDBManager::addRFCostEstimationData(), HDB::HDBManager::addRFEntry(), HDB::HDBManager::addRFImplementation(), HDB::HDBManager::addSocketCostEstimationData(), and HDB::HDBManager::addSocketEntry().
|
pure virtual |
Performs a data retrieval query (SELECT).
queryString | The query string. |
RelationalDBException | In case a database error occured. |
Implemented in SQLiteConnection.
Definition at line 80 of file RelationalDBConnection.cc.
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::CachedHDBManager::costEstimationDataIDs(), 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(), HDB::HDBManager::hasRFEntry(), HDB::HDBManager::hasSocketEntry(), DSDBManager::implementationString(), ExecutionTrace::instructionExecutions(), DSDBManager::isUnschedulable(), 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(), ExecutionTrace::simulatedCycleCount(), HDB::HDBManager::socketCostEstimationData(), HDB::HDBManager::socketCostEstimationDataIDs(), HDB::HDBManager::socketCostEstimationDataList(), HDB::HDBManager::socketEntryIDs(), and ExecutionTrace::socketWriteCount().
|
pure virtual |
Ends the current database transaction unsuccessfully and rollbacks all the changes the queries in the transaction would have done.
RelationalDBException | In case a database error occured. |
Implemented in SQLiteConnection.
Definition at line 101 of file RelationalDBConnection.cc.
Referenced by DSDBManager::addApplication(), DSDBManager::addArchitecture(), DSDBManager::addConfiguration(), HDB::HDBManager::addCostFunctionPlugin(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUImplementation(), DSDBManager::addImplementation(), HDB::HDBManager::addRFImplementation(), DSDBManager::removeApplication(), DSDBManager::removeConfiguration(), HDB::HDBManager::removeCostFunctionPlugin(), HDB::HDBManager::removeFUArchitecture(), HDB::HDBManager::removeFUImplementation(), and HDB::HDBManager::removeRFImplementation().
|
pure virtual |
Return number of entries in the given table.
tableName | Name of the table. |
RelationalDBException | In case a database error occurred, call was made in the middle of an active transaction or the table does not exists. |
Implemented in SQLiteConnection.
Definition at line 136 of file RelationalDBConnection.cc.
|
pure virtual |
Checks if database has given table by name.
tableName | Name of the table |
RelationalDBException | In case a database error occurred or call was made in the middle of an active transaction. |
Implemented in SQLiteConnection.
Definition at line 122 of file RelationalDBConnection.cc.
Referenced by HDB::HDBManager::addRFExternalPortsToImplementation(), HDB::HDBManager::addRFImplementation(), HDB::HDBManager::addRFParametersToImplementation(), HDB::HDBManager::OperationImplementationByID(), and HDB::HDBManager::removeRFImplementation().
|
pure virtual |
Performs a query that changes the database (UPDATE/INSERT/DELETE).
Does not autocommit the changes in case the update is in the middle of transaction.
queryString | The query string. |
RelationalDBException | In case a database error occured. |
Implemented in SQLiteConnection.
Definition at line 54 of file RelationalDBConnection.cc.
Referenced by DSDBManager::addApplication(), DSDBManager::addArchitecture(), HDB::HDBManager::addBlockImplementationFileToHDB(), HDB::HDBManager::addBooleanColumn(), ExecutionTrace::addBusActivity(), HDB::HDBManager::addBusCostEstimationData(), HDB::HDBManager::addBusEntry(), ExecutionTrace::addBusWriteCount(), ExecutionTrace::addConcurrentRegisterFileAccessCount(), DSDBManager::addConfiguration(), HDB::HDBManager::addCostEstimationData(), HDB::HDBManager::addCostFunctionPlugin(), DSDBManager::addCycleCount(), DSDBManager::addEnergyEstimate(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUCostEstimationData(), HDB::HDBManager::addFUEntry(), HDB::HDBManager::addFUImplementation(), ExecutionTrace::addFunctionUnitOperationTriggerCount(), DSDBManager::addImplementation(), ExecutionTrace::addInstructionExecution(), ExecutionTrace::addInstructionExecutionCount(), HDB::HDBManager::addOperationImplementation(), HDB::HDBManager::addOperationImplementationResource(), ExecutionTrace::addProcedureAddressRange(), ExecutionTrace::addRegisterAccessCount(), HDB::HDBManager::addRFArchitecture(), HDB::HDBManager::addRFCostEstimationData(), HDB::HDBManager::addRFEntry(), HDB::HDBManager::addRFImplementation(), HDB::HDBManager::addSocketCostEstimationData(), HDB::HDBManager::addSocketEntry(), ExecutionTrace::addSocketWriteCount(), HDB::HDBManager::HDBManager(), ExecutionTrace::initialize(), HDB::HDBManager::insertFileFormats(), HDB::HDBManager::modifyCostEstimationData(), HDB::HDBManager::modifyCostFunctionPlugin(), DSDBManager::removeApplication(), HDB::HDBManager::removeBusEntry(), DSDBManager::removeConfiguration(), HDB::HDBManager::removeCostEstimationData(), HDB::HDBManager::removeCostFunctionPlugin(), HDB::HDBManager::removeFUArchitecture(), HDB::HDBManager::removeFUEntry(), HDB::HDBManager::removeFUImplementation(), HDB::HDBManager::removeOperationImplementation(), HDB::HDBManager::removeOperationImplementationResource(), HDB::HDBManager::removeRFArchitecture(), HDB::HDBManager::removeRFEntry(), HDB::HDBManager::removeRFImplementation(), HDB::HDBManager::removeSocketEntry(), HDB::HDBManager::setArchitectureForFU(), HDB::HDBManager::setArchitectureForRF(), DSDBManager::setAreaEstimate(), HDB::HDBManager::setCostFunctionPluginForFU(), HDB::HDBManager::setCostFunctionPluginForRF(), DSDBManager::setLongestPathDelayEstimate(), ExecutionTrace::setSimulatedCycleCount(), DSDBManager::setUnschedulable(), HDB::HDBManager::unsetArchitectureForFU(), HDB::HDBManager::unsetArchitectureForRF(), HDB::HDBManager::unsetCostFunctionPluginForFU(), and HDB::HDBManager::unsetCostFunctionPluginForRF().
|
pure virtual |
Set database version number.
version | New database version. |
Implemented in SQLiteConnection.
Definition at line 156 of file RelationalDBConnection.cc.
References version().
Referenced by HDB::HDBManager::HDBManager().
|
pure virtual |
Return database version number.
Implemented in SQLiteConnection.
Definition at line 146 of file RelationalDBConnection.cc.
Referenced by HDB::HDBManager::HDBManager(), and updateVersion().