MythTV  master
Classes | Macros | Typedefs | Functions
mythdbcon.h File Reference
#include <QSqlDatabase>
#include <QSqlRecord>
#include <QSqlError>
#include <QVariant>
#include <QSqlQuery>
#include <QRegExp>
#include <QDateTime>
#include <QMutex>
#include <QList>
#include "mythbaseexp.h"
#include "mythdbparams.h"
Include dependency graph for mythdbcon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MSqlDatabase
 QSqlDatabase wrapper, used by MSqlQuery. Do not use directly. More...
 
class  MDBManager
 DB connection pool, used by MSqlQuery. Do not use directly. More...
 
struct  MSqlQueryInfo
 MSqlDatabase Info, used by MSqlQuery. Do not use directly. More...
 
class  MSqlQuery
 QSqlQuery wrapper that fetches a DB connection from the connection pool. More...
 

Macros

#define REUSE_CONNECTION   1
 

Typedefs

using MSqlBindings = QMap< QString, QVariant >
 typedef for a map of string -> string bindings for generic queries. More...
 

Functions

MBASE_PUBLIC bool TestDatabase (const QString &dbHostName, const QString &dbUserName, QString dbPassword, QString dbName="mythconverg", int dbPort=3306)
 
MBASE_PUBLIC void MSqlAddMoreBindings (MSqlBindings &output, MSqlBindings &addfrom)
 Add the entries in addfrom to the map in output. More...
 
MBASE_PUBLIC void MSqlEscapeAsAQuery (QString &query, MSqlBindings &bindings)
 Given a partial query string and a bindings object, escape the string. More...
 

Macro Definition Documentation

◆ REUSE_CONNECTION

#define REUSE_CONNECTION   1

Definition at line 17 of file mythdbcon.h.

Typedef Documentation

◆ MSqlBindings

using MSqlBindings = QMap<QString, QVariant>

typedef for a map of string -> string bindings for generic queries.

Definition at line 98 of file mythdbcon.h.

Function Documentation

◆ TestDatabase()

MBASE_PUBLIC bool TestDatabase ( const QString &  dbHostName,
const QString &  dbUserName,
QString  dbPassword,
QString  dbName = "mythconverg",
int  dbPort = 3306 
)

Definition at line 37 of file mythdbcon.cpp.

Referenced by Myth::TestDBSettings().

◆ MSqlAddMoreBindings()

MBASE_PUBLIC void MSqlAddMoreBindings ( MSqlBindings output,
MSqlBindings addfrom 
)

Add the entries in addfrom to the map in output.

Definition at line 906 of file mythdbcon.cpp.

Referenced by ProgLister::FillItemList().

◆ MSqlEscapeAsAQuery()

MBASE_PUBLIC void MSqlEscapeAsAQuery ( QString &  query,
MSqlBindings bindings 
)

Given a partial query string and a bindings object, escape the string.

Definition at line 927 of file mythdbcon.cpp.

Referenced by PhrasePopup::recordClicked(), and PowerSearchPopup::recordClicked().