Go to the documentation of this file.
11 query.
prepare(
"SELECT name FROM newssites WHERE name = :NAME ;");
18 return query.
size() > 0;
23 if (!site)
return false;
30 const QString &icon,
const QString &category,
37 query.
prepare(
"INSERT INTO newssites (name,category,url,ico,podcast,updated) "
38 " VALUES( :NAME, :CATEGORY, :URL, :ICON, :PODCAST, 0);");
54 if (!site)
return false;
62 query.
prepare(
"DELETE FROM newssites WHERE name = :NAME ;");
bool isActive(void) const
QSqlQuery wrapper that fetches a DB connection from the connection pool.
bool findInDB(const QString &name)
bool insertInDB(NewsSiteItem *site)
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
bool removeFromDB(NewsSiteItem *site)
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void DBError(const QString &where, const MSqlQuery &query)
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
int numRowsAffected() const
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.