Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include "qsql_psql_p.h"
#include <qcoreapplication.h>
#include <qvariant.h>
#include <qdatetime.h>
#include <qloggingcategory.h>
#include <qregularexpression.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
#include <qsqlrecord.h>
#include <qsqlquery.h>
#include <qsocketnotifier.h>
#include <qstringlist.h>
#include <qlocale.h>
#include <QtSql/private/qsqlresult_p.h>
#include <QtSql/private/qsqldriver_p.h>
#include <QtCore/private/qlocale_tools_p.h>
#include <queue>
#include <libpq-fe.h>
#include <pg_config.h>
#include <cmath>
#include "moc_qsql_psql_p.cpp"
Go to the source code of this file.
Classes | |
class | QPSQLResult |
class | QPSQLDriverPrivate |
class | QPSQLResultPrivate |
Macros | |
#define | QBOOLOID 16 |
#define | QINT8OID 20 |
#define | QINT2OID 21 |
#define | QINT4OID 23 |
#define | QNUMERICOID 1700 |
#define | QFLOAT4OID 700 |
#define | QFLOAT8OID 701 |
#define | QABSTIMEOID 702 |
#define | QRELTIMEOID 703 |
#define | QDATEOID 1082 |
#define | QTIMEOID 1083 |
#define | QTIMETZOID 1266 |
#define | QTIMESTAMPOID 1114 |
#define | QTIMESTAMPTZOID 1184 |
#define | QOIDOID 2278 |
#define | QBYTEAOID 17 |
#define | QREGPROCOID 24 |
#define | QXIDOID 28 |
#define | QCIDOID 29 |
#define | QBITOID 1560 |
#define | QVARBITOID 1562 |
#define | VARHDRSZ 4 |
Typedefs | |
typedef int | StatementId |
Functions | |
template<typename T > | |
void | PQfreemem (T *t, int=0) |
static QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcPsql, "qt.sql.postgresql") using namespace Qt void | qPQfreemem (void *buffer) |
static QSqlError | qMakeError (const QString &err, QSqlError::ErrorType type, const QPSQLDriverPrivate *p, PGresult *result=nullptr) |
static QMetaType | qDecodePSQLType (int t) |
static QString | qCreateParamString (const QList< QVariant > &boundValues, const QSqlDriver *driver) |
QString | qMakePreparedStmtId () |
static QPSQLDriver::Protocol | qMakePSQLVersion (int vMaj, int vMin) |
static QPSQLDriver::Protocol | qFindPSQLVersion (const QString &versionString) |
static QString | qQuote (QString s) |
static void | qSplitTableName (QString &tablename, QString &schema) |
template<class FloatType > | |
void | assignSpecialPsqlFloatValue (FloatType val, QString *target) |
Variables | |
static constexpr int | PGRES_SINGLE_TUPLE = 9 |
static constexpr StatementId | InvalidStatementId = 0 |
#define QABSTIMEOID 702 |
Definition at line 38 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QBITOID 1560 |
Definition at line 51 of file qsql_psql.cpp.
Referenced by QPSQLResult::record().
#define QBOOLOID 16 |
Definition at line 31 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QBYTEAOID 17 |
Definition at line 46 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QCIDOID 29 |
Definition at line 49 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QDATEOID 1082 |
Definition at line 40 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QFLOAT4OID 700 |
Definition at line 36 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QFLOAT8OID 701 |
Definition at line 37 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QINT2OID 21 |
Definition at line 33 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QINT4OID 23 |
Definition at line 34 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QINT8OID 20 |
Definition at line 32 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QNUMERICOID 1700 |
Definition at line 35 of file qsql_psql.cpp.
Referenced by QPSQLResult::data(), qDecodePSQLType(), and QPSQLResult::record().
#define QOIDOID 2278 |
Definition at line 45 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QREGPROCOID 24 |
Definition at line 47 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QRELTIMEOID 703 |
Definition at line 39 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QTIMEOID 1083 |
Definition at line 41 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QTIMESTAMPOID 1114 |
Definition at line 43 of file qsql_psql.cpp.
Referenced by qDecodePSQLType(), and QPSQLResult::record().
#define QTIMESTAMPTZOID 1184 |
Definition at line 44 of file qsql_psql.cpp.
Referenced by qDecodePSQLType(), and QPSQLResult::record().
#define QTIMETZOID 1266 |
Definition at line 42 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define QVARBITOID 1562 |
Definition at line 52 of file qsql_psql.cpp.
Referenced by QPSQLResult::record().
#define QXIDOID 28 |
Definition at line 48 of file qsql_psql.cpp.
Referenced by qDecodePSQLType().
#define VARHDRSZ 4 |
Definition at line 54 of file qsql_psql.cpp.
Referenced by QPSQLResult::record().
typedef int StatementId |
Definition at line 83 of file qsql_psql.cpp.
|
inline |
Definition at line 1435 of file qsql_psql.cpp.
References qIsInf(), qIsNaN(), and QStringLiteral.
Referenced by QPSQLDriver::formatValue().
|
inline |
Definition at line 59 of file qsql_psql.cpp.
Referenced by qPQfreemem().
|
static |
Definition at line 814 of file qsql_psql.cpp.
References QSqlDriver::formatValue(), QSqlResultPrivate::isVariantNull(), and QSqlField::setMetaType().
Referenced by QPSQLResult::exec().
|
static |
Definition at line 335 of file qsql_psql.cpp.
References QABSTIMEOID, QBOOLOID, QBYTEAOID, QCIDOID, QDATEOID, QFLOAT4OID, QFLOAT8OID, QINT2OID, QINT4OID, QINT8OID, QNUMERICOID, QOIDOID, QREGPROCOID, QRELTIMEOID, QTIMEOID, QTIMESTAMPOID, QTIMESTAMPTZOID, QTIMETZOID, QXIDOID, and QMetaType::UnknownType.
Referenced by QPSQLResult::data(), QPSQLDriver::primaryIndex(), QPSQLResult::record(), and QPSQLDriver::record().
|
static |
Definition at line 1032 of file qsql_psql.cpp.
References match(), qMakePSQLVersion(), QStringLiteral, rx(), and QPSQLDriver::VersionUnknown.
Referenced by QPSQLDriverPrivate::getPSQLVersion().
|
static |
Definition at line 275 of file qsql_psql.cpp.
References QString::fromLatin1(), and QString::fromUtf8().
Referenced by QPSQLResult::exec(), QPSQLResult::fetchNext(), QPSQLResult::prepare(), QPSQLResultPrivate::processResults(), and QPSQLResult::reset().
QString qMakePreparedStmtId | ( | ) |
Definition at line 834 of file qsql_psql.cpp.
References QString::number(), Q_BASIC_ATOMIC_INITIALIZER, and QStringLiteral.
Referenced by QPSQLResult::prepare().
|
static |
Definition at line 963 of file qsql_psql.cpp.
References QPSQLDriver::UnknownLaterVersion, QPSQLDriver::Version10, QPSQLDriver::Version11, QPSQLDriver::Version12, QPSQLDriver::Version6, QPSQLDriver::Version7, QPSQLDriver::Version7_1, QPSQLDriver::Version7_3, QPSQLDriver::Version7_4, QPSQLDriver::Version8, QPSQLDriver::Version8_1, QPSQLDriver::Version8_2, QPSQLDriver::Version8_3, QPSQLDriver::Version8_4, QPSQLDriver::Version9, QPSQLDriver::Version9_1, QPSQLDriver::Version9_2, QPSQLDriver::Version9_3, QPSQLDriver::Version9_4, QPSQLDriver::Version9_5, QPSQLDriver::Version9_6, and QPSQLDriver::VersionUnknown.
Referenced by qFindPSQLVersion().
|
inlinestatic |
Definition at line 73 of file qsql_psql.cpp.
References PQfreemem().
Referenced by QPSQLResult::data(), and QPSQLDriver::formatValue().
Definition at line 1155 of file qsql_psql.cpp.
Referenced by QPSQLDriver::open().
Definition at line 1328 of file qsql_psql.cpp.
References dot().
Referenced by QPSQLDriver::primaryIndex(), and QPSQLDriver::record().
|
staticconstexpr |
Definition at line 84 of file qsql_psql.cpp.
Referenced by QPSQLResult::cleanup(), QPSQLResult::exec(), QPSQLDriverPrivate::exec(), QPSQLDriverPrivate::finishQuery(), QPSQLResult::reset(), and QPSQLDriverPrivate::sendQuery().
|
staticconstexpr |
Definition at line 80 of file qsql_psql.cpp.
Referenced by QPSQLResult::fetchNext(), QPSQLResult::nextResult(), and QPSQLResultPrivate::processResults().