mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-04-09 14:33:28 +02:00
2019-08-21 Fred Gleason <fredg@paravelsystems.com>
* Added code to dump the parent query to STDERR when an invalid 'RDSqlQuery::value()' is requested.
This commit is contained in:
parent
b9722a3be7
commit
602373c3e2
@ -18932,3 +18932,6 @@
|
||||
* Removed the '--log-directory=' switch from rdimport(1).
|
||||
* Added an 'ID' column to the list of dropbox configurations in the
|
||||
'Rivendell Dropbox Configurations; dialog in rdadmin(1).
|
||||
2019-08-21 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added code to dump the parent query to STDERR when an invalid
|
||||
'RDSqlQuery::value()' is requested.
|
||||
|
12
lib/rddb.cpp
12
lib/rddb.cpp
@ -95,6 +95,18 @@ int RDSqlQuery::columns() const
|
||||
}
|
||||
|
||||
|
||||
QVariant RDSqlQuery::value(int index) const
|
||||
{
|
||||
QVariant ret=QSqlQuery::value(index);
|
||||
|
||||
if(!ret.isValid()) {
|
||||
fprintf(stderr,"for query: %s\n\n",(const char *)executedQuery().toUtf8());
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
QVariant RDSqlQuery::run(const QString &sql,bool *ok)
|
||||
{
|
||||
QVariant ret;
|
||||
|
@ -33,6 +33,7 @@ class RDSqlQuery : public QSqlQuery
|
||||
public:
|
||||
RDSqlQuery(const QString &query = QString::null,bool reconnect=true);
|
||||
int columns() const;
|
||||
QVariant value(int index) const;
|
||||
static QVariant run(const QString &sql,bool *ok=NULL);
|
||||
static bool apply(const QString &sql,QString *err_msg=NULL);
|
||||
static int rows(const QString &sql);
|
||||
|
Loading…
x
Reference in New Issue
Block a user