mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
463 lines
No EOL
12 KiB
C++
463 lines
No EOL
12 KiB
C++
// AUTOGENERATED file, created by the tool generate_stub.py, don't edit!
|
|
// If you want to add your own functionality, instead edit the stubDatabase_custom.h file.
|
|
|
|
#include "common/Database.h"
|
|
#include "stubDatabase_custom.h"
|
|
|
|
#ifndef STUB_COMMON_DATABASE_H
|
|
#define STUB_COMMON_DATABASE_H
|
|
|
|
|
|
|
|
#ifndef STUB_Database_Database
|
|
//#define STUB_Database_Database
|
|
Database::Database()
|
|
: m_connection(nullptr)
|
|
{
|
|
|
|
}
|
|
#endif //STUB_Database_Database
|
|
|
|
#ifndef STUB_Database_Database_DTOR
|
|
//#define STUB_Database_Database_DTOR
|
|
Database::~Database()
|
|
{
|
|
|
|
}
|
|
#endif //STUB_Database_Database_DTOR
|
|
|
|
#ifndef STUB_Database_tuplesOk
|
|
//#define STUB_Database_tuplesOk
|
|
bool Database::tuplesOk()
|
|
{
|
|
return false;
|
|
}
|
|
#endif //STUB_Database_tuplesOk
|
|
|
|
#ifndef STUB_Database_commandOk
|
|
//#define STUB_Database_commandOk
|
|
int Database::commandOk()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_commandOk
|
|
|
|
#ifndef STUB_Database_decodeObject
|
|
//#define STUB_Database_decodeObject
|
|
int Database::decodeObject(const std::string & data, Atlas::Objects::Root &)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_decodeObject
|
|
|
|
#ifndef STUB_Database_decodeMessage
|
|
//#define STUB_Database_decodeMessage
|
|
int Database::decodeMessage(const std::string & data, Atlas::Message::MapType &)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_decodeMessage
|
|
|
|
#ifndef STUB_Database_encodeObject
|
|
//#define STUB_Database_encodeObject
|
|
int Database::encodeObject(const Atlas::Message::MapType &, std::string &)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_encodeObject
|
|
|
|
#ifndef STUB_Database_putObject
|
|
//#define STUB_Database_putObject
|
|
int Database::putObject(const std::string & table, const std::string & key, const Atlas::Message::MapType & object, const StringVector & values )
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_putObject
|
|
|
|
#ifndef STUB_Database_getObject
|
|
//#define STUB_Database_getObject
|
|
int Database::getObject(const std::string & table, const std::string & key, Atlas::Message::MapType &)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_getObject
|
|
|
|
#ifndef STUB_Database_updateObject
|
|
//#define STUB_Database_updateObject
|
|
int Database::updateObject(const std::string & table, const std::string & key, const Atlas::Message::MapType&)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_updateObject
|
|
|
|
#ifndef STUB_Database_delObject
|
|
//#define STUB_Database_delObject
|
|
int Database::delObject(const std::string &, const std::string & key)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_delObject
|
|
|
|
#ifndef STUB_Database_hasKey
|
|
//#define STUB_Database_hasKey
|
|
bool Database::hasKey(const std::string &, const std::string & key)
|
|
{
|
|
return false;
|
|
}
|
|
#endif //STUB_Database_hasKey
|
|
|
|
#ifndef STUB_Database_getTable
|
|
//#define STUB_Database_getTable
|
|
int Database::getTable(const std::string & table, std::map<std::string, Atlas::Objects::Root> &)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_getTable
|
|
|
|
#ifndef STUB_Database_clearTable
|
|
//#define STUB_Database_clearTable
|
|
int Database::clearTable(const std::string & table)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_clearTable
|
|
|
|
#ifndef STUB_Database_reportError
|
|
//#define STUB_Database_reportError
|
|
void Database::reportError()
|
|
{
|
|
|
|
}
|
|
#endif //STUB_Database_reportError
|
|
|
|
#ifndef STUB_Database_connect
|
|
//#define STUB_Database_connect
|
|
int Database::connect(const std::string & context, std::string & error_msg)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_connect
|
|
|
|
#ifndef STUB_Database_instance
|
|
//#define STUB_Database_instance
|
|
Database* Database::instance()
|
|
{
|
|
return nullptr;
|
|
}
|
|
#endif //STUB_Database_instance
|
|
|
|
#ifndef STUB_Database_cleanup
|
|
//#define STUB_Database_cleanup
|
|
void Database::cleanup()
|
|
{
|
|
|
|
}
|
|
#endif //STUB_Database_cleanup
|
|
|
|
#ifndef STUB_Database_initConnection
|
|
//#define STUB_Database_initConnection
|
|
int Database::initConnection()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_initConnection
|
|
|
|
#ifndef STUB_Database_createInstanceDatabase
|
|
//#define STUB_Database_createInstanceDatabase
|
|
int Database::createInstanceDatabase()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_createInstanceDatabase
|
|
|
|
#ifndef STUB_Database_initRule
|
|
//#define STUB_Database_initRule
|
|
int Database::initRule(bool createTables )
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_initRule
|
|
|
|
#ifndef STUB_Database_shutdownConnection
|
|
//#define STUB_Database_shutdownConnection
|
|
void Database::shutdownConnection()
|
|
{
|
|
|
|
}
|
|
#endif //STUB_Database_shutdownConnection
|
|
|
|
#ifndef STUB_Database_runSimpleSelectQuery
|
|
//#define STUB_Database_runSimpleSelectQuery
|
|
const DatabaseResult Database::runSimpleSelectQuery(const std::string & query)
|
|
{
|
|
return *static_cast<const DatabaseResult*>(nullptr);
|
|
}
|
|
#endif //STUB_Database_runSimpleSelectQuery
|
|
|
|
#ifndef STUB_Database_runCommandQuery
|
|
//#define STUB_Database_runCommandQuery
|
|
int Database::runCommandQuery(const std::string & query)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_runCommandQuery
|
|
|
|
#ifndef STUB_Database_registerRelation
|
|
//#define STUB_Database_registerRelation
|
|
int Database::registerRelation(std::string & tablename, const std::string & sourcetable, const std::string & targettable, RelationType kind )
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_registerRelation
|
|
|
|
#ifndef STUB_Database_selectRelation
|
|
//#define STUB_Database_selectRelation
|
|
const DatabaseResult Database::selectRelation(const std::string & name, const std::string & id)
|
|
{
|
|
return *static_cast<const DatabaseResult*>(nullptr);
|
|
}
|
|
#endif //STUB_Database_selectRelation
|
|
|
|
#ifndef STUB_Database_createRelationRow
|
|
//#define STUB_Database_createRelationRow
|
|
int Database::createRelationRow(const std::string & name, const std::string & id, const std::string & other)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_createRelationRow
|
|
|
|
#ifndef STUB_Database_removeRelationRow
|
|
//#define STUB_Database_removeRelationRow
|
|
int Database::removeRelationRow(const std::string & name, const std::string & id)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_removeRelationRow
|
|
|
|
#ifndef STUB_Database_removeRelationRowByOther
|
|
//#define STUB_Database_removeRelationRowByOther
|
|
int Database::removeRelationRowByOther(const std::string & name, const std::string & other)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_removeRelationRowByOther
|
|
|
|
#ifndef STUB_Database_registerSimpleTable
|
|
//#define STUB_Database_registerSimpleTable
|
|
int Database::registerSimpleTable(const std::string & name, const Atlas::Message::MapType & row)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_registerSimpleTable
|
|
|
|
#ifndef STUB_Database_selectSimpleRow
|
|
//#define STUB_Database_selectSimpleRow
|
|
const DatabaseResult Database::selectSimpleRow(const std::string & name, const std::string & id)
|
|
{
|
|
return *static_cast<const DatabaseResult*>(nullptr);
|
|
}
|
|
#endif //STUB_Database_selectSimpleRow
|
|
|
|
#ifndef STUB_Database_selectSimpleRowBy
|
|
//#define STUB_Database_selectSimpleRowBy
|
|
const DatabaseResult Database::selectSimpleRowBy(const std::string & name, const std::string & column, const std::string & value)
|
|
{
|
|
return *static_cast<const DatabaseResult*>(nullptr);
|
|
}
|
|
#endif //STUB_Database_selectSimpleRowBy
|
|
|
|
#ifndef STUB_Database_createSimpleRow
|
|
//#define STUB_Database_createSimpleRow
|
|
int Database::createSimpleRow(const std::string & name, const std::string & id, const std::string & columns, const std::string & values)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_createSimpleRow
|
|
|
|
#ifndef STUB_Database_updateSimpleRow
|
|
//#define STUB_Database_updateSimpleRow
|
|
int Database::updateSimpleRow(const std::string & name, const std::string & key, const std::string & value, const std::string & columns)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_updateSimpleRow
|
|
|
|
#ifndef STUB_Database_registerEntityIdGenerator
|
|
//#define STUB_Database_registerEntityIdGenerator
|
|
int Database::registerEntityIdGenerator()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_registerEntityIdGenerator
|
|
|
|
#ifndef STUB_Database_newId
|
|
//#define STUB_Database_newId
|
|
long Database::newId(std::string & id)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_newId
|
|
|
|
#ifndef STUB_Database_registerEntityTable
|
|
//#define STUB_Database_registerEntityTable
|
|
int Database::registerEntityTable(const std::map<std::string, int> & chunks)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_registerEntityTable
|
|
|
|
#ifndef STUB_Database_insertEntity
|
|
//#define STUB_Database_insertEntity
|
|
int Database::insertEntity(const std::string & id, const std::string & loc, const std::string & type, int seq, const std::string & value)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_insertEntity
|
|
|
|
#ifndef STUB_Database_updateEntityWithoutLoc
|
|
//#define STUB_Database_updateEntityWithoutLoc
|
|
int Database::updateEntityWithoutLoc(const std::string & id, int seq, const std::string & location_data)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_updateEntityWithoutLoc
|
|
|
|
#ifndef STUB_Database_updateEntity
|
|
//#define STUB_Database_updateEntity
|
|
int Database::updateEntity(const std::string & id, int seq, const std::string & location_data, const std::string & location_entity_id)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_updateEntity
|
|
|
|
#ifndef STUB_Database_selectEntities
|
|
//#define STUB_Database_selectEntities
|
|
const DatabaseResult Database::selectEntities(const std::string & loc)
|
|
{
|
|
return *static_cast<const DatabaseResult*>(nullptr);
|
|
}
|
|
#endif //STUB_Database_selectEntities
|
|
|
|
#ifndef STUB_Database_dropEntity
|
|
//#define STUB_Database_dropEntity
|
|
int Database::dropEntity(long id)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_dropEntity
|
|
|
|
#ifndef STUB_Database_registerPropertyTable
|
|
//#define STUB_Database_registerPropertyTable
|
|
int Database::registerPropertyTable()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_registerPropertyTable
|
|
|
|
#ifndef STUB_Database_insertProperties
|
|
//#define STUB_Database_insertProperties
|
|
int Database::insertProperties(const std::string & id, const KeyValues & tuples)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_insertProperties
|
|
|
|
#ifndef STUB_Database_selectProperties
|
|
//#define STUB_Database_selectProperties
|
|
const DatabaseResult Database::selectProperties(const std::string & loc)
|
|
{
|
|
return *static_cast<const DatabaseResult*>(nullptr);
|
|
}
|
|
#endif //STUB_Database_selectProperties
|
|
|
|
#ifndef STUB_Database_updateProperties
|
|
//#define STUB_Database_updateProperties
|
|
int Database::updateProperties(const std::string & id, const KeyValues & tuples)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_updateProperties
|
|
|
|
#ifndef STUB_Database_registerThoughtsTable
|
|
//#define STUB_Database_registerThoughtsTable
|
|
int Database::registerThoughtsTable()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_registerThoughtsTable
|
|
|
|
#ifndef STUB_Database_selectThoughts
|
|
//#define STUB_Database_selectThoughts
|
|
const DatabaseResult Database::selectThoughts(const std::string & loc)
|
|
{
|
|
return *static_cast<const DatabaseResult*>(nullptr);
|
|
}
|
|
#endif //STUB_Database_selectThoughts
|
|
|
|
#ifndef STUB_Database_replaceThoughts
|
|
//#define STUB_Database_replaceThoughts
|
|
int Database::replaceThoughts(const std::string & id, const std::vector<std::string>& thoughts)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_replaceThoughts
|
|
|
|
#ifndef STUB_Database_queryResult
|
|
//#define STUB_Database_queryResult
|
|
void Database::queryResult(ExecStatusType)
|
|
{
|
|
|
|
}
|
|
#endif //STUB_Database_queryResult
|
|
|
|
#ifndef STUB_Database_queryComplete
|
|
//#define STUB_Database_queryComplete
|
|
void Database::queryComplete()
|
|
{
|
|
|
|
}
|
|
#endif //STUB_Database_queryComplete
|
|
|
|
#ifndef STUB_Database_launchNewQuery
|
|
//#define STUB_Database_launchNewQuery
|
|
int Database::launchNewQuery()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_launchNewQuery
|
|
|
|
#ifndef STUB_Database_scheduleCommand
|
|
//#define STUB_Database_scheduleCommand
|
|
int Database::scheduleCommand(const std::string & query)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_scheduleCommand
|
|
|
|
#ifndef STUB_Database_clearPendingQuery
|
|
//#define STUB_Database_clearPendingQuery
|
|
int Database::clearPendingQuery()
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_clearPendingQuery
|
|
|
|
#ifndef STUB_Database_runMaintainance
|
|
//#define STUB_Database_runMaintainance
|
|
int Database::runMaintainance(int command )
|
|
{
|
|
return 0;
|
|
}
|
|
#endif //STUB_Database_runMaintainance
|
|
|
|
|
|
#ifndef STUB_DatabaseResult_field
|
|
//#define STUB_DatabaseResult_field
|
|
const char* DatabaseResult::field(const char * column, int row ) const
|
|
{
|
|
return nullptr;
|
|
}
|
|
#endif //STUB_DatabaseResult_field
|
|
|
|
|
|
#endif |