mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-28 16:23:50 +01: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:
@@ -18932,3 +18932,6 @@
|
|||||||
* Removed the '--log-directory=' switch from rdimport(1).
|
* Removed the '--log-directory=' switch from rdimport(1).
|
||||||
* Added an 'ID' column to the list of dropbox configurations in the
|
* Added an 'ID' column to the list of dropbox configurations in the
|
||||||
'Rivendell Dropbox Configurations; dialog in rdadmin(1).
|
'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 RDSqlQuery::run(const QString &sql,bool *ok)
|
||||||
{
|
{
|
||||||
QVariant ret;
|
QVariant ret;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ class RDSqlQuery : public QSqlQuery
|
|||||||
public:
|
public:
|
||||||
RDSqlQuery(const QString &query = QString::null,bool reconnect=true);
|
RDSqlQuery(const QString &query = QString::null,bool reconnect=true);
|
||||||
int columns() const;
|
int columns() const;
|
||||||
|
QVariant value(int index) const;
|
||||||
static QVariant run(const QString &sql,bool *ok=NULL);
|
static QVariant run(const QString &sql,bool *ok=NULL);
|
||||||
static bool apply(const QString &sql,QString *err_msg=NULL);
|
static bool apply(const QString &sql,QString *err_msg=NULL);
|
||||||
static int rows(const QString &sql);
|
static int rows(const QString &sql);
|
||||||
|
|||||||
Reference in New Issue
Block a user