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:
Fred Gleason 2019-08-21 14:51:46 -04:00
parent b9722a3be7
commit 602373c3e2
3 changed files with 16 additions and 0 deletions

View File

@ -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.

View File

@ -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;

View File

@ -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);