Adds latest migration results
This commit is contained in:
829 files changed
+35074
-70886
No files matched your search
@@ -13,7 +13,10 @@
|
||||
#include <QtCore/QJsonValue>
|
||||
|
||||
#include "ngldb_logger.h"
|
||||
|
||||
#ifdef PostgreSQL_FOUND
|
||||
#include <libpq-fe.h>
|
||||
#endif
|
||||
|
||||
static QString getSqlErrorString(const QSqlError &error)
|
||||
{
|
||||
@@ -251,21 +254,17 @@ QString NSqlQuery::sqlstate()
|
||||
{
|
||||
const QVariant resultHandle = this->result()->handle();
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef PostgreSQL_FOUND
|
||||
if (resultHandle.isValid() && (qstrcmp(resultHandle.typeName(), "PGresult*") == 0))
|
||||
{
|
||||
|
||||
const PGresult *pgresHandle = *static_cast<const PGresult * const *>(resultHandle.data());
|
||||
|
||||
if (pgresHandle != nullptr)
|
||||
{
|
||||
|
||||
return QString::fromLocal8Bit(PQresultErrorField(pgresHandle, PG_DIAG_SQLSTATE));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return QStringLiteral("58000");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user