Go to the documentation of this file.
23 QString sql =
"TRUNCATE eit_cache;";
25 LOG(VB_GENERAL, LOG_DEBUG,
26 QString(
"Truncating EIT cache"));
34 sql =
"DELETE FROM program WHERE chanid IN ("
35 "SELECT chanid FROM channel "
36 "WHERE deleted IS NULL AND "
37 " useonairguide = 1 AND "
39 "SELECT sourceid FROM videosource WHERE useeit=1";
42 sql +=
" AND sourceid = :SOURCEID";
50 LOG(VB_GENERAL, LOG_DEBUG,
51 QString(
"Deleting program entries from EIT."));
59 sql =
"DELETE FROM programrating WHERE chanid IN ("
60 "SELECT chanid FROM channel "
61 "WHERE deleted IS NULL AND "
62 " useonairguide = 1 AND "
64 "SELECT sourceid FROM videosource WHERE useeit=1";
67 sql +=
" AND sourceid = :SOURCEID";
75 LOG(VB_GENERAL, LOG_DEBUG,
76 QString(
"Deleting program rating entries from EIT."));
84 sql =
"DELETE FROM credits WHERE chanid IN ("
85 "SELECT chanid FROM channel "
86 "WHERE deleted IS NULL AND "
87 " useonairguide = 1 AND "
89 "SELECT sourceid FROM videosource WHERE useeit=1";
92 sql +=
" AND sourceid = :SOURCEID";
100 LOG(VB_GENERAL, LOG_DEBUG,
101 QString(
"Deleting credits from EIT."));
109 sql =
"DELETE FROM programgenres WHERE chanid IN ("
110 "SELECT chanid FROM channel "
111 "WHERE deleted IS NULL AND "
112 " useonairguide = 1 AND "
114 "SELECT sourceid FROM videosource WHERE useeit=1";
117 sql +=
" AND sourceid = :SOURCEID";
125 LOG(VB_GENERAL, LOG_DEBUG,
126 QString(
"Deleting program genre entries from EIT."));
QSqlQuery wrapper that fetches a DB connection from the connection pool.
MythCommFlagCommandLineParser cmdline
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
@ GENERIC_EXIT_OK
Exited with no error.
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void DBError(const QString &where, const MSqlQuery &query)
static int ClearEIT(const MythUtilCommandLineParser &cmdline)
bool isConnected(void) const
Only updated once during object creation.
QMap< QString, UtilFunc > UtilMap
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
void registerEITUtils(UtilMap &utilMap)
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
@ GENERIC_EXIT_NOT_OK
Exited with error.
int toInt(const QString &key) const
Returns stored QVariant as an integer, falling to default if not provided.
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.