19#include <QtSql/private/qsqlresult_p.h>
20#include <QtSql/private/qsqldriver_p.h>
21#include <QtCore/private/qlocale_tools_p.h>
35#define QNUMERICOID 1700
38#define QABSTIMEOID 702
39#define QRELTIMEOID 703
42#define QTIMETZOID 1266
43#define QTIMESTAMPOID 1114
44#define QTIMESTAMPTZOID 1184
52#define QVARBITOID 1562
71using namespace
Qt::StringLiterals;
79#if !defined PG_VERSION_NUM || PG_VERSION_NUM-0 < 90200
101 bool fetch(
int i)
override;
107 bool isNull(
int field)
override;
114 bool exec()
override;
154 QStringLiteral(
"SELECT pg_class.relname, pg_namespace.nspname FROM pg_class "
155 "LEFT JOIN pg_namespace ON (pg_class.relnamespace = pg_namespace.oid) "
156 "WHERE (pg_class.relkind = '") +
type +
158 "AND (pg_class.relname !~ '^pg_') "
159 "AND (pg_namespace.nspname != 'information_schema')");
162 QString schema =
t.value(1).toString();
163 if (schema.isEmpty() || schema ==
"public"_L1)
164 tl.append(
t.value(0).toString());
166 tl.append(
t.value(0).toString().prepend(u
'.').prepend(schema));
199#if defined PG_VERSION_NUM && PG_VERSION_NUM-0 >= 90200
214 qCWarning(lcPsql,
"QPSQLDriver::getResult: Query results lost - "
215 "probably discarded on executing another SQL query.");
278 const char *
s = PQerrorMessage(
p->connection);
296 if (
stmtId != drv_d_func()->currentStmtId) {
298 "Query results lost - probably discarded on executing "
303 int status = PQresultStatus(
result);
305 case PGRES_TUPLES_OK:
317 case PGRES_COMMAND_OK:
340 type = QMetaType::Bool;
343 type = QMetaType::LongLong;
351 type = QMetaType::Int;
356 type = QMetaType::Double;
361 type = QMetaType::QDate;
365 type = QMetaType::QTime;
369 type = QMetaType::QDateTime;
372 type = QMetaType::QByteArray;
375 type = QMetaType::QString;
387 if (PQresultStatus(
result) != PGRES_COMMAND_OK) {
408 if (
d->preparedQueriesEnabled && !
d->preparedStmtId.isNull())
409 d->deallocatePreparedStmt();
424 while (!
d->nextResultSets.empty()) {
425 PQclear(
d->nextResultSets.front());
426 d->nextResultSets.pop();
430 d->drv_d_func()->finishQuery(
d->stmtId);
435 d->canFetchMoreRows =
false;
453 while (
ok &&
i >
at())
458 if (
i >=
d->currentSize)
476 if (
d->result && PQntuples(
d->result) > 0) {
506 return fetch(
d->currentSize - 1);
515 const int currentRow =
at();
522 if (!
d->canFetchMoreRows)
525 d->result =
d->drv_d_func()->getResult(
d->stmtId);
529 d->canFetchMoreRows =
false;
532 int status = PQresultStatus(
d->result);
538 setAt(currentRow + 1);
540 case PGRES_TUPLES_OK:
543 d->canFetchMoreRows =
false;
548 d->canFetchMoreRows =
false;
553 if (currentRow + 1 >=
d->currentSize)
555 setAt(currentRow + 1);
568 if (
d->canFetchMoreRows) {
572 d->result =
d->drv_d_func()->getResult(
d->stmtId);
574 d->canFetchMoreRows =
false;
576 if (
d->result && PQresultStatus(
d->result) == PGRES_FATAL_ERROR)
577 return d->processResults();
582 d->result =
d->drv_d_func()->getResult(
d->stmtId);
583 return d->processResults();
589 if (!
d->nextResultSets.empty()) {
590 d->result =
d->nextResultSets.front();
591 d->nextResultSets.pop();
593 return d->processResults();
599 if (
i >= PQnfields(
d->result)) {
600 qCWarning(lcPsql,
"QPSQLResult::data: column %d out of range.",
i);
604 int ptype = PQftype(
d->result,
i);
606 if (PQgetisnull(
d->result, currentRow,
i))
608 const char *
val = PQgetvalue(
d->result, currentRow,
i);
610 case QMetaType::Bool:
612 case QMetaType::QString:
614 case QMetaType::LongLong:
621 case QMetaType::Double: {
648#if QT_CONFIG(datestring)
649 case QMetaType::QDate:
651 case QMetaType::QTime:
653 case QMetaType::QDateTime: {
655 if (!tzString.endsWith(u
'Z'))
656 tzString.append(u
'Z');
660 case QMetaType::QDate:
661 case QMetaType::QTime:
662 case QMetaType::QDateTime:
665 case QMetaType::QByteArray: {
667 unsigned char *
data = PQunescapeBytea(
reinterpret_cast<const unsigned char *
>(
val), &
len);
673 qCWarning(lcPsql,
"QPSQLResult::data: unhandled data type %d.",
type.id());
682 return PQgetisnull(
d->result, currentRow, field);
694 d->stmtId =
d->drv_d_func()->sendQuery(
query);
704 d->result =
d->drv_d_func()->getResult(
d->stmtId);
707 while (
PGresult *nextResultSet =
d->drv_d_func()->getResult(
d->stmtId))
708 d->nextResultSets.push(nextResultSet);
710 return d->processResults();
716 return d->currentSize;
722 const char *tuples = PQcmdTuples(
d->result);
735 Oid
id = PQoidValue(
d->result);
736 if (
id != InvalidOid)
749 int count = PQnfields(
d->result);
753 const int tableOid = PQftable(
d->result,
i);
759 auto &tableName =
d->drv_d_func()->oidToTable[tableOid];
760 if (tableName.isEmpty()) {
762 if (qry.exec(
QStringLiteral(
"SELECT relname FROM pg_class WHERE pg_class.oid = %1")
763 .
arg(tableOid)) && qry.next()) {
764 tableName = qry.value(0).toString();
767 f.setTableName(tableName);
771 int ptype = PQftype(
d->result,
i);
774 int len = PQfsize(
d->result,
i);
816 if (boundValues.isEmpty())
844 if (!
d->preparedQueriesEnabled)
849 if (!
d->preparedStmtId.isEmpty())
850 d->deallocatePreparedStmt();
857 if (PQresultStatus(
result) != PGRES_COMMAND_OK) {
861 d->preparedStmtId.clear();
866 d->preparedStmtId = stmtId;
873 if (!
d->preparedQueriesEnabled)
885 d->stmtId =
d->drv_d_func()->sendQuery(stmt);
895 d->result =
d->drv_d_func()->getResult(
d->stmtId);
898 while (
PGresult *nextResultSet =
d->drv_d_func()->getResult(
d->stmtId))
899 d->nextResultSets.push(nextResultSet);
901 return d->processResults();
909 int status = PQresultStatus(
result);
911 return status == PGRES_COMMAND_OK;
917 int status = PQresultStatus(
result);
918 if (status != PGRES_COMMAND_OK)
930 int status = PQresultStatus(
result);
931 if (status != PGRES_COMMAND_OK)
940 int status = PQresultStatus(
result);
941 if (status != PGRES_COMMAND_OK)
955 int status = PQresultStatus(
result);
956 if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK)
1036 if (
match.hasMatch()) {
1041 int vMaj =
match.capturedView(1).toInt();
1046 if (
match.capturedView(2).isEmpty())
1048 vMin =
match.capturedView(2).toInt();
1060 int status = PQresultStatus(
result);
1061 if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK) {
1068#if defined(PG_MAJORVERSION)
1070#elif defined(PG_VERSION)
1077 serverVersion = clientVersion;
1079 qCWarning(lcPsql,
"The server version of this PostgreSQL is unknown, "
1080 "falling back to the client version.");
1088 qCWarning(lcPsql,
"This version of PostgreSQL is not supported and may not work.");
1090 return serverVersion;
1102 d->connection = conn;
1104 d->pro =
d->getPSQLVersion();
1105 d->detectBackslashEscape();
1114 PQfinish(
d->connection);
1157 s.replace(u
'\\',
"\\\\"_L1);
1158 s.replace(u
'\'',
"\\'"_L1);
1159 s.append(u
'\'').prepend(u
'\'');
1185 if (!connOpts.isEmpty()) {
1188 connectString.append(u
' ').append(
opt);
1191 d->connection = PQconnectdb(std::move(connectString).
toLocal8Bit().constData());
1192 if (PQstatus(
d->connection) == CONNECTION_BAD) {
1195 PQfinish(
d->connection);
1196 d->connection =
nullptr;
1200 d->pro =
d->getPSQLVersion();
1201 d->detectBackslashEscape();
1202 if (!
d->setEncodingUtf8()) {
1205 PQfinish(
d->connection);
1206 d->connection =
nullptr;
1210 d->setByteaOutput();
1211 d->setUtcTimeZone();
1229 PQfinish(
d->connection);
1230 d->connection =
nullptr;
1244 qCWarning(lcPsql,
"QPSQLDriver::beginTransaction: Database not open.");
1248 if (!
res || PQresultStatus(
res) != PGRES_COMMAND_OK) {
1262 qCWarning(lcPsql,
"QPSQLDriver::commitTransaction: Database not open.");
1267 bool transaction_failed =
false;
1274 transaction_failed =
qstrcmp(PQcmdStatus(
res),
"ROLLBACK") == 0;
1277 if (!
res || PQresultStatus(
res) != PGRES_COMMAND_OK || transaction_failed) {
1291 qCWarning(lcPsql,
"QPSQLDriver::rollbackTransaction: Database not open.");
1295 if (!
res || PQresultStatus(
res) != PGRES_COMMAND_OK) {
1312 t.setForwardOnly(
true);
1320 "AND (relname LIKE 'pg_%') "));
1322 tl.append(
t.value(0).toString());
1333 schema = tablename.left(
dot);
1334 tablename = tablename.mid(
dot + 1);
1352 "FROM pg_attribute, pg_class "
1353 "WHERE %1 pg_class.oid IN "
1354 "(SELECT indexrelid FROM pg_index WHERE indisprimary = true AND indrelid IN "
1355 "(SELECT oid FROM pg_class WHERE relname = '%2')) "
1356 "AND pg_attribute.attrelid = pg_class.oid "
1357 "AND pg_attribute.attisdropped = false "
1358 "ORDER BY pg_attribute.attnum");
1359 if (schema.isEmpty())
1363 "pg_namespace WHERE pg_namespace.nspname = '%1') AND").
arg(schema));
1365 i.exec(stmt.
arg(tbl));
1366 while (
i.isActive() &&
i.next()) {
1369 idx.
setName(
i.value(2).toString());
1388 :
QStringLiteral(
"pg_get_expr(pg_attrdef.adbin, pg_attrdef.adrelid)");
1392 "pg_namespace WHERE pg_namespace.nspname = '%1')").arg(schema);
1394 QStringLiteral(
"SELECT pg_attribute.attname, pg_attribute.atttypid::int, "
1395 "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, "
1397 "FROM pg_class, pg_attribute "
1398 "LEFT JOIN pg_attrdef ON (pg_attrdef.adrelid = "
1399 "pg_attribute.attrelid AND pg_attrdef.adnum = pg_attribute.attnum) "
1401 "AND pg_class.relname = '%3' "
1402 "AND pg_attribute.attnum > 0 "
1403 "AND pg_attribute.attrelid = pg_class.oid "
1404 "AND pg_attribute.attisdropped = false "
1405 "ORDER BY pg_attribute.attnum").arg(adsrc, nspname, tbl);
1409 while (
query.next()) {
1418 if (!defVal.isEmpty() && defVal.at(0) == u
'\'') {
1421 defVal = defVal.mid(1,
end - 1);
1424 f.setRequired(
query.value(2).toBool());
1427 f.setDefaultValue(defVal);
1434template <
class FloatType>
1452 case QMetaType::QDateTime: {
1459 QLocale::c().toString(dt.toUTC(), u
"yyyy-MM-ddThh:mm:ss.zzz") +
1466 case QMetaType::QTime: {
1469 r = u
'\'' +
QLocale::c().toString(
t, u
"hh:mm:ss.zzz") + u
'\'';
1474 case QMetaType::QString:
1476 if (
d->hasBackslashEscape)
1477 r.replace(u
'\\',
"\\\\"_L1);
1479 case QMetaType::Bool:
1485 case QMetaType::QByteArray: {
1488#if defined PG_VERSION_NUM && PG_VERSION_NUM-0 >= 80200
1499 case QMetaType::Float:
1504 case QMetaType::Double:
1509 case QMetaType::QUuid:
1534 return PQstatus(
d->connection) == CONNECTION_OK;
1547 qCWarning(lcPsql,
"QPSQLDriver::subscribeToNotification: Database not open.");
1551 const bool alreadyContained =
d->seid.contains(
name);
1552 int socket = PQsocket(
d->connection);
1558 if (!alreadyContained)
1562 if (PQresultStatus(
result) != PGRES_COMMAND_OK) {
1563 if (!alreadyContained)
1564 d->seid.removeLast();
1576 qCWarning(lcPsql,
"QPSQLDriver::subscribeToNotificationImplementation: "
1577 "PQsocket didn't return a valid socket to listen on.");
1588 qCWarning(lcPsql,
"QPSQLDriver::unsubscribeFromNotification: Database not open.");
1592 if (!
d->seid.contains(
name)) {
1593 qCWarning(lcPsql,
"QPSQLDriver::unsubscribeFromNotification: not subscribed to '%ls'.",
1600 if (PQresultStatus(
result) != PGRES_COMMAND_OK) {
1607 d->seid.removeAll(
name);
1609 if (
d->seid.isEmpty()) {
1624void QPSQLDriver::_q_handleNotification()
1627 d->pendingNotifyCheck =
false;
1628 PQconsumeInput(
d->connection);
1630 PGnotify *notify =
nullptr;
1631 while ((notify = PQnotifies(
d->connection)) !=
nullptr) {
1633 if (
d->seid.contains(
name)) {
1635#if defined PG_VERSION_NUM && PG_VERSION_NUM-0 >= 70400
1643 qCWarning(lcPsql,
"QPSQLDriver: received notification for '%ls' which isn't subscribed to.",
1652#include "moc_qsql_psql_p.cpp"
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
static QString translate(const char *context, const char *key, const char *disambiguation=nullptr, int n=-1)
\threadsafe
static QLocale c()
Returns a QLocale object initialized to the "C" locale.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void appendTables(QStringList &tl, QSqlQuery &t, QChar type)
void discardResults() const
PGresult * getResult(StatementId stmtId) const
void detectBackslashEscape()
PGresult * exec(const char *stmt)
void finishQuery(StatementId stmtId)
QPSQLDriver::Protocol getPSQLVersion()
StatementId generateStatementId()
StatementId sendQuery(const QString &stmt)
bool setSingleRowMode() const
void checkPendingNotifications() const
QPSQLDriver::Protocol pro
StatementId currentStmtId
QHash< int, QString > oidToTable
QVariant handle() const override
Returns the low-level database handle wrapped in a QVariant or an invalid variant if there is no hand...
bool beginTransaction() override
This function is called to begin a transaction.
QSqlIndex primaryIndex(const QString &tablename) const override
Returns the primary index for table tableName.
QSqlResult * createResult() const override
Creates an empty SQL result on the database.
QPSQLDriver(QObject *parent=nullptr)
bool commitTransaction() override
This function is called to commit a transaction.
bool unsubscribeFromNotification(const QString &name) override
This function is called to unsubscribe from event notifications from the database.
QStringList tables(QSql::TableType) const override
Returns a list of the names of the tables in the database.
bool hasFeature(DriverFeature f) const override
Returns true if the driver supports feature feature; otherwise returns false.
bool rollbackTransaction() override
This function is called to rollback a transaction.
bool isOpen() const override
Returns true if the database connection is open; otherwise returns false.
QStringList subscribedToNotifications() const override
Returns a list of the names of the event notifications that are currently subscribed to.
bool open(const QString &db, const QString &user, const QString &password, const QString &host, int port, const QString &connOpts) override
Derived classes must reimplement this pure virtual function to open a database connection on database...
QString escapeIdentifier(const QString &identifier, IdentifierType type) const override
Returns the identifier escaped according to the database rules.
Protocol protocol() const
bool subscribeToNotification(const QString &name) override
This function is called to subscribe to event notifications from the database.
QSqlRecord record(const QString &tablename) const override
Returns a QSqlRecord populated with the names of the fields in table tableName.
void close() override
Derived classes must reimplement this pure virtual function in order to close the database connection...
QString formatValue(const QSqlField &field, bool trimStrings) const override
Returns a string representation of the field value for the database.
QString fieldSerial(qsizetype i) const override
void deallocatePreparedStmt()
bool preparedQueriesEnabled
std::queue< PGresult * > nextResultSets
bool reset(const QString &query) override
Sets the result to use the SQL statement query for subsequent data retrieval.
int size() override
Returns the size of the SELECT result, or -1 if it cannot be determined or if the query is not a SELE...
QVariant lastInsertId() const override
Returns the object ID of the most recent inserted row if the database supports it.
bool nextResult() override
bool isNull(int field) override
Returns true if the field at position index in the current row is null; otherwise returns false.
QPSQLResult(const QPSQLDriver *db)
bool fetch(int i) override
Positions the result to an arbitrary (zero-based) row index.
bool fetchLast() override
Positions the result to the last record (last row) in the result.
QSqlRecord record() const override
Returns the current record if the query is active; otherwise returns an empty QSqlRecord.
bool fetchNext() override
Positions the result to the next available record (row) in the result.
QVariant data(int i) override
Returns the data for field index in the current row as a QVariant.
bool prepare(const QString &query) override
Prepares the given query for execution; the query will normally use placeholders so that it can be ex...
QVariant handle() const override
Returns the low-level database handle for this result set wrapped in a QVariant or an invalid QVarian...
int numRowsAffected() override
Returns the number of rows affected by the last query executed, or -1 if it cannot be determined or i...
bool fetchFirst() override
Positions the result to the first record (row 0) in the result.
void virtual_hook(int id, void *data) override
bool exec() override
Executes the query, returning true if successful; otherwise returns false.
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
void activated(QSocketDescriptor socket, QSocketNotifier::Type activationEvent, QPrivateSignal)
The QSqlDriver class is an abstract base class for accessing specific SQL databases.
virtual QString formatValue(const QSqlField &field, bool trimStrings=false) const
Returns a string representation of the field value for the database.
IdentifierType
This enum contains a list of SQL identifier types.
virtual QString stripDelimiters(const QString &identifier, IdentifierType type) const
Returns the identifier with the leading and trailing delimiters removed, identifier can either be a t...
DriverFeature
This enum contains a list of features a driver might support.
NotificationSource
This enum contains a list of SQL notification sources.
virtual void setLastError(const QSqlError &e)
This function is used to set the value of the last error, error, that occurred on the database.
void notification(const QString &name, QSqlDriver::NotificationSource source, const QVariant &payload)
virtual void setOpenError(bool e)
This function sets the open error state of the database to error.
virtual void setOpen(bool o)
This function sets the open state of the database to open.
The QSqlError class provides SQL database error information.
ErrorType
This enum type describes the context in which the error occurred, e.g., a connection error,...
The QSqlField class manipulates the fields in SQL database tables and views.
void setName(const QString &name)
Sets \l name to name.
void setMetaType(QMetaType type)
Sets \l metaType to type.
bool isNull() const
Returns true if the field's value is NULL; otherwise returns false.
The QSqlIndex class provides functions to manipulate and describe database indexes.
void setName(const QString &name)
Sets \l name to name.
void append(const QSqlField &field)
Appends the field field to the list of indexed fields.
The QSqlQuery class provides a means of executing and manipulating SQL statements.
The QSqlRecord class encapsulates a database record.
static bool isVariantNull(const QVariant &variant)
QSqlResultPrivate(QSqlResult *q, const QSqlDriver *drv)
The QSqlResult class provides an abstract interface for accessing data from specific SQL databases.
bool isForwardOnly() const
Returns true if you can only scroll forward through the result set; otherwise returns false.
virtual void virtual_hook(int id, void *data)
int at() const
Returns the current (zero-based) row position of the result.
virtual bool prepare(const QString &query)
Prepares the given query for execution; the query will normally use placeholders so that it can be ex...
virtual bool exec()
Executes the query, returning true if successful; otherwise returns false.
bool isSelect() const
Returns true if the current result is from a SELECT statement; otherwise returns false.
virtual void setAt(int at)
This function is provided for derived classes to set the internal (zero-based) row position to index.
virtual void setActive(bool a)
This function is provided for derived classes to set the internal active state to active.
QVariantList & boundValues(QT6_DECL_NEW_OVERLOAD)
QSql::NumericalPrecisionPolicy numericalPrecisionPolicy() const
virtual void setLastError(const QSqlError &e)
This function is provided for derived classes to set the last error to error.
const QSqlDriver * driver() const
Returns the driver associated with the result.
virtual void setForwardOnly(bool forward)
Sets forward only mode to forward.
bool isActive() const
Returns true if the result has records to be retrieved; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QString & replace(qsizetype i, qsizetype len, QChar after)
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
void clear()
Clears the contents of the string and makes it null.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString & append(QChar c)
QByteArray toUtf8() const &
QDateTime toDateTime() const
Returns the variant as a QDateTime if the variant has userType() \l QMetaType::QDateTime,...
double toDouble(bool *ok=nullptr) const
Returns the variant as a double if the variant has userType() \l QMetaType::Double,...
QTime toTime() const
Returns the variant as a QTime if the variant has userType() \l QMetaType::QTime, \l QMetaType::QDate...
float toFloat(bool *ok=nullptr) const
Returns the variant as a float if the variant has userType() \l QMetaType::Double,...
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
bool toBool() const
Returns the variant as a bool if the variant has userType() Bool.
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
QByteArray toByteArray() const
Returns the variant as a QByteArray if the variant has userType() \l QMetaType::QByteArray or \l QMet...
Combined button and popup list for selecting options.
#define Q_BASIC_ATOMIC_INITIALIZER(a)
size_t qstrlen(const char *str)
Q_CORE_EXPORT int qstricmp(const char *, const char *)
Q_CORE_EXPORT int qstrcmp(const char *str1, const char *str2)
DBusConnection * connection
bool qIsNaN(qfloat16 f) noexcept
bool qIsInf(qfloat16 f) noexcept
#define Q_LOGGING_CATEGORY(name,...)
#define qCWarning(category,...)
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qInf()
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qQNaN()
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei GLsizei GLchar * source
GLdouble GLdouble GLdouble GLdouble q
GLenum GLint GLint * precision
static qreal dot(const QPointF &a, const QPointF &b)
static QSqlError qMakeError(const QString &err, QSqlError::ErrorType type, const QDB2DriverPrivate *p)
void PQfreemem(T *t, int=0)
static QSqlError qMakeError(const QString &err, QSqlError::ErrorType type, const QPSQLDriverPrivate *p, PGresult *result=nullptr)
void assignSpecialPsqlFloatValue(FloatType val, QString *target)
static QPSQLDriver::Protocol qFindPSQLVersion(const QString &versionString)
static QMetaType qDecodePSQLType(int t)
static QPSQLDriver::Protocol qMakePSQLVersion(int vMaj, int vMin)
static constexpr StatementId InvalidStatementId
static QString qCreateParamString(const QList< QVariant > &boundValues, const QSqlDriver *driver)
static QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcPsql, "qt.sql.postgresql") using namespace Qt void qPQfreemem(void *buffer)
static constexpr int PGRES_SINGLE_TUPLE
QString qMakePreparedStmtId()
static void qSplitTableName(QString &tablename, QString &schema)
static QString qQuote(QString s)
struct pg_result PGresult
#define Q_DECLARE_SQLDRIVER_PRIVATE(Class)
#define qUtf16Printable(string)
static char * toLocal8Bit(char *out, QStringView in, QStringConverter::State *state)
#define QStringLiteral(str)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
myObject disconnect()
[26]