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 <mythdbcon.h>

Collaboration diagram for MSqlDatabase:
Collaboration graph
[legend]

Public Member Functions

 MSqlDatabase (const QString &name)
 
 ~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
 
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 26 of file mythdbcon.h.

Constructor & Destructor Documentation

◆ MSqlDatabase()

MSqlDatabase::MSqlDatabase ( const QString &  name)
explicit

Definition at line 76 of file mythdbcon.cpp.

◆ ~MSqlDatabase()

MSqlDatabase::~MSqlDatabase ( void  )

Definition at line 99 of file mythdbcon.cpp.

Member Function Documentation

◆ OpenDatabase()

bool MSqlDatabase::OpenDatabase ( bool  skipdb = false)

Definition at line 122 of file mythdbcon.cpp.

Referenced by MDBManager::popConnection(), and TestDatabase().

◆ SetDBParams()

void MSqlDatabase::SetDBParams ( const DatabaseParams params)
inline

Definition at line 35 of file mythdbcon.h.

Referenced by TestDatabase().

◆ isOpen()

bool MSqlDatabase::isOpen ( void  )
private

◆ KickDatabase()

bool MSqlDatabase::KickDatabase ( void  )
private

Definition at line 243 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 253 of file mythdbcon.cpp.

Referenced by MSqlQuery::Reconnect().

◆ InitSessionVars()

void MSqlDatabase::InitSessionVars ( void  )
private

Definition at line 268 of file mythdbcon.cpp.

Referenced by OpenDatabase(), and Reconnect().

Friends And Related Function Documentation

◆ MDBManager

friend class MDBManager
friend

Definition at line 28 of file mythdbcon.h.

◆ MSqlQuery

friend class MSqlQuery
friend

Definition at line 29 of file mythdbcon.h.

Member Data Documentation

◆ m_name

QString MSqlDatabase::m_name
private

◆ m_db

QSqlDatabase MSqlDatabase::m_db
private

◆ m_lastDBKick

QDateTime MSqlDatabase::m_lastDBKick
private

◆ m_dbparms

DatabaseParams MSqlDatabase::m_dbparms
private

Definition at line 49 of file mythdbcon.h.

Referenced by OpenDatabase(), and SetDBParams().


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