MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MSqlDatabase Class Reference

QSqlDatabase wrapper, used by MSqlQuery. Do not use directly. More...

#include <libmythbase/mythdbcon.h>

Collaboration diagram for MSqlDatabase:
[legend]

Public Member Functions

 MSqlDatabase (QString name, QString driver="QMYSQL")
 
 ~MSqlDatabase (void)
 
bool OpenDatabase (bool skipdb=false)
 
void SetDBParams (const DatabaseParams &params)
 

Private Member Functions

bool isOpen (void)
 
bool KickDatabase (void)
 
QString GetConnectionName (void) const
 
QSqlDatabase db (void) const
 
bool Reconnect (void)
 
void InitSessionVars (void)
 

Private Attributes

QString m_name
 
QString m_driver
 
QSqlDatabase m_db
 
QDateTime m_lastDBKick
 
DatabaseParams m_dbparms
 

Friends

class MDBManager
 
class MSqlQuery
 

Detailed Description

QSqlDatabase wrapper, used by MSqlQuery. Do not use directly.

Definition at line 25 of file mythdbcon.h.

Constructor & Destructor Documentation

◆ MSqlDatabase()

MSqlDatabase::MSqlDatabase ( QString  name,
QString  driver = "QMYSQL" 
)
explicit

Definition at line 84 of file mythdbcon.cpp.

◆ ~MSqlDatabase()

MSqlDatabase::~MSqlDatabase ( void  )

Definition at line 109 of file mythdbcon.cpp.

Member Function Documentation

◆ OpenDatabase()

bool MSqlDatabase::OpenDatabase ( bool  skipdb = false)

Definition at line 132 of file mythdbcon.cpp.

Referenced by MDBManager::popConnection().

◆ SetDBParams()

void MSqlDatabase::SetDBParams ( const DatabaseParams params)
inline

Definition at line 34 of file mythdbcon.h.

◆ isOpen()

bool MSqlDatabase::isOpen ( void  )
private

Definition at line 122 of file mythdbcon.cpp.

Referenced by MSqlQuery::exec(), MSqlQuery::prepare(), and MSqlQuery::testDBConnection().

◆ KickDatabase()

bool MSqlDatabase::KickDatabase ( void  )
private

Definition at line 254 of file mythdbcon.cpp.

Referenced by MSqlQuery::ChannelCon(), MSqlQuery::InitCon(), and MSqlQuery::SchedCon().

◆ GetConnectionName()

QString MSqlDatabase::GetConnectionName ( void  ) const
inlineprivate

Definition at line 40 of file mythdbcon.h.

◆ db()

QSqlDatabase MSqlDatabase::db ( void  ) const
inlineprivate

Definition at line 41 of file mythdbcon.h.

Referenced by MSqlQuery::ChannelCon(), MSqlQuery::InitCon(), and MSqlQuery::SchedCon().

◆ Reconnect()

bool MSqlDatabase::Reconnect ( void  )
private

Definition at line 264 of file mythdbcon.cpp.

Referenced by MSqlQuery::Reconnect().

◆ InitSessionVars()

void MSqlDatabase::InitSessionVars ( void  )
private

Definition at line 279 of file mythdbcon.cpp.

Referenced by OpenDatabase(), and Reconnect().

Friends And Related Function Documentation

◆ MDBManager

friend class MDBManager
friend

Definition at line 27 of file mythdbcon.h.

◆ MSqlQuery

friend class MSqlQuery
friend

Definition at line 28 of file mythdbcon.h.

Member Data Documentation

◆ m_name

QString MSqlDatabase::m_name
private

◆ m_driver

QString MSqlDatabase::m_driver
private

Definition at line 47 of file mythdbcon.h.

Referenced by MSqlDatabase().

◆ m_db

QSqlDatabase MSqlDatabase::m_db
private

◆ m_lastDBKick

QDateTime MSqlDatabase::m_lastDBKick
private

◆ m_dbparms

DatabaseParams MSqlDatabase::m_dbparms
private

Definition at line 50 of file mythdbcon.h.

Referenced by OpenDatabase(), and SetDBParams().


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