TrinityCore
Loading...
Searching...
No Matches
WorldDatabaseConnection Class Reference

#include <WorldDatabase.h>

+ Inheritance diagram for WorldDatabaseConnection:

Public Types

typedef WorldDatabaseStatements Statements
 

Public Member Functions

 WorldDatabaseConnection (MySQLConnectionInfo &connInfo)
 
 WorldDatabaseConnection (ProducerConsumerQueue< SQLOperation * > *q, MySQLConnectionInfo &connInfo)
 
 ~WorldDatabaseConnection ()
 
void DoPrepareStatements () override
 
- Public Member Functions inherited from MySQLConnection
 MySQLConnection (MySQLConnectionInfo &connInfo)
 
 MySQLConnection (ProducerConsumerQueue< SQLOperation * > *queue, MySQLConnectionInfo &connInfo)
 Constructor for synchronous connections.
 
virtual ~MySQLConnection ()
 Constructor for asynchronous connections.
 
virtual uint32 Open ()
 
void Close ()
 
bool PrepareStatements ()
 
bool Execute (char const *sql)
 
bool Execute (PreparedStatementBase *stmt)
 
ResultSet * Query (char const *sql)
 
PreparedResultSet * Query (PreparedStatementBase *stmt)
 
bool _Query (char const *sql, MySQLResult **pResult, MySQLField **pFields, uint64 *pRowCount, uint32 *pFieldCount)
 
bool _Query (PreparedStatementBase *stmt, MySQLPreparedStatement **mysqlStmt, MySQLResult **pResult, uint64 *pRowCount, uint32 *pFieldCount)
 
void BeginTransaction ()
 
void RollbackTransaction ()
 
void CommitTransaction ()
 
int ExecuteTransaction (std::shared_ptr< TransactionBase > transaction)
 
size_t EscapeString (char *to, const char *from, size_t length)
 
void Ping ()
 
uint32 GetLastError ()
 

Additional Inherited Members

- Protected Types inherited from MySQLConnection
typedef std::vector< std::unique_ptr< MySQLPreparedStatement > > PreparedStatementContainer
 
- Protected Member Functions inherited from MySQLConnection
bool LockIfReady ()
 
void Unlock ()
 Called by parent databasepool. Will let other threads access this connection.
 
uint32 GetServerVersion () const
 
MySQLPreparedStatement * GetPreparedStatement (uint32 index)
 
void PrepareStatement (uint32 index, std::string const &sql, ConnectionFlags flags)
 
- Protected Attributes inherited from MySQLConnection
PreparedStatementContainer m_stmts
 
bool m_reconnecting
 PreparedStatements storage.
 
bool m_prepareError
 Are we reconnecting?
 

Detailed Description

Definition at line 107 of file WorldDatabase.h.

Member Typedef Documentation

◆ Statements

Constructor & Destructor Documentation

◆ WorldDatabaseConnection() [1/2]

WorldDatabaseConnection::WorldDatabaseConnection ( MySQLConnectionInfo &  connInfo)

Definition at line 99 of file WorldDatabase.cpp.

◆ WorldDatabaseConnection() [2/2]

WorldDatabaseConnection::WorldDatabaseConnection ( ProducerConsumerQueue< SQLOperation * > *  q,
MySQLConnectionInfo &  connInfo 
)

Definition at line 103 of file WorldDatabase.cpp.

◆ ~WorldDatabaseConnection()

WorldDatabaseConnection::~WorldDatabaseConnection ( )

Definition at line 107 of file WorldDatabase.cpp.

Member Function Documentation

◆ DoPrepareStatements()

void WorldDatabaseConnection::DoPrepareStatements ( )
overridevirtual

Implements MySQLConnection.

Definition at line 21 of file WorldDatabase.cpp.

References CONNECTION_ASYNC, CONNECTION_SYNCH, MySQLConnection::m_reconnecting, MySQLConnection::m_stmts, MAX_WORLDDATABASE_STATEMENTS, MySQLConnection::PrepareStatement(), WORLD_DEL_CREATURE, WORLD_DEL_CREATURE_ADDON, WORLD_DEL_DISABLES, WORLD_DEL_EVENT_GAMEOBJECT, WORLD_DEL_GAME_EVENT_CREATURE, WORLD_DEL_GAME_EVENT_MODEL_EQUIP, WORLD_DEL_GAME_TELE, WORLD_DEL_GAMEOBJECT, WORLD_DEL_GAMEOBJECT_ADDON, WORLD_DEL_GRAVEYARD_ZONE, WORLD_DEL_LINKED_RESPAWN, WORLD_DEL_LINKED_RESPAWN_MASTER, WORLD_DEL_NPC_VENDOR, WORLD_DEL_SPAWNGROUP_MEMBER, WORLD_DEL_WAYPOINT_DATA, WORLD_DEL_WAYPOINT_SCRIPT, WORLD_INS_CREATURE, WORLD_INS_CREATURE_ADDON, WORLD_INS_CREATURE_FORMATION, WORLD_INS_DISABLES, WORLD_INS_GAME_TELE, WORLD_INS_GAMEOBJECT, WORLD_INS_GRAVEYARD_ZONE, WORLD_INS_NPC_VENDOR, WORLD_INS_WAYPOINT_DATA, WORLD_INS_WAYPOINT_SCRIPT, WORLD_REP_LINKED_RESPAWN, WORLD_SEL_COMMANDS, WORLD_SEL_CREATURE_ADDON_BY_GUID, WORLD_SEL_CREATURE_BY_ID, WORLD_SEL_CREATURE_NEAREST, WORLD_SEL_CREATURE_TEMPLATE, WORLD_SEL_CREATURE_TEXT, WORLD_SEL_DISABLES, WORLD_SEL_GAMEOBJECT_NEAREST, WORLD_SEL_ITEM_TEMPLATE_BY_NAME, WORLD_SEL_ITEM_TEMPLATE_LOCALE_BY_NAME, WORLD_SEL_NPC_VENDOR_REF, WORLD_SEL_SMART_SCRIPTS, WORLD_SEL_WAYPOINT_DATA_ACTION, WORLD_SEL_WAYPOINT_DATA_ALL_BY_WPGUID, WORLD_SEL_WAYPOINT_DATA_BY_ID, WORLD_SEL_WAYPOINT_DATA_BY_POS, WORLD_SEL_WAYPOINT_DATA_BY_WPGUID, WORLD_SEL_WAYPOINT_DATA_MAX_ID, WORLD_SEL_WAYPOINT_DATA_MAX_POINT, WORLD_SEL_WAYPOINT_DATA_POS_BY_ID, WORLD_SEL_WAYPOINT_DATA_POS_FIRST_BY_ID, WORLD_SEL_WAYPOINT_DATA_POS_LAST_BY_ID, WORLD_SEL_WAYPOINT_DATA_WPGUID_BY_ID, WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, WORLD_SEL_WAYPOINT_SCRIPTS_MAX_ID, WORLD_UPD_CREATURE_ADDON_PATH, WORLD_UPD_CREATURE_FACTION, WORLD_UPD_CREATURE_MOVEMENT_TYPE, WORLD_UPD_CREATURE_NPCFLAG, WORLD_UPD_CREATURE_POSITION, WORLD_UPD_CREATURE_SPAWN_TIME_SECS, WORLD_UPD_CREATURE_WANDER_DISTANCE, WORLD_UPD_CREATURE_ZONE_AREA_DATA, WORLD_UPD_GAMEOBJECT_ZONE_AREA_DATA, WORLD_UPD_WAYPOINT_DATA_ALL_WPGUID, WORLD_UPD_WAYPOINT_DATA_POINT, WORLD_UPD_WAYPOINT_DATA_POSITION, WORLD_UPD_WAYPOINT_DATA_WPGUID, WORLD_UPD_WAYPOINT_SCRIPT_ID, WORLD_UPD_WAYPOINT_SCRIPT_O, WORLD_UPD_WAYPOINT_SCRIPT_X, WORLD_UPD_WAYPOINT_SCRIPT_Y, and WORLD_UPD_WAYPOINT_SCRIPT_Z.


The documentation for this class was generated from the following files: