summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/psql/qsql_psql.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <[email protected]>2023-02-26 20:32:21 +0100
committerChristian Ehrlicher <[email protected]>2023-07-23 16:49:15 +0200
commite532933a2a9ff0219f0179880e05c95e0ec5e19d (patch)
tree7c2eab8afe3f86d67b90a8b03ea44a766f137984 /src/plugins/sqldrivers/psql/qsql_psql.cpp
parent4a7023f5b4c45682f344e5185e82e518b653368a (diff)
SQL/PSQL: Handle jsonb operators in prepared queries
Add an option to disable handling of positional binding so jsonb operators are not screwed up [ChangeLog][QtSql][QSqlQuery] Add setEnablePositionalBinding() to be able to disable positional binding. Fixes: QTBUG-96636 Change-Id: I428a9d3b10274b97292ab86a74d9b3971d6f10e9 Reviewed-by: Andy Shaw <[email protected]>
Diffstat (limited to 'src/plugins/sqldrivers/psql/qsql_psql.cpp')
-rw-r--r--src/plugins/sqldrivers/psql/qsql_psql.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/sqldrivers/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp
index 8fcd9a47af7..1607e1141fb 100644
--- a/src/plugins/sqldrivers/psql/qsql_psql.cpp
+++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp
@@ -247,14 +247,14 @@ void QPSQLDriverPrivate::checkPendingNotifications() const
}
}
-class QPSQLResultPrivate : public QSqlResultPrivate
+class QPSQLResultPrivate final : public QSqlResultPrivate
{
Q_DECLARE_PUBLIC(QPSQLResult)
public:
Q_DECLARE_SQLDRIVER_PRIVATE(QPSQLDriver)
using QSqlResultPrivate::QSqlResultPrivate;
- QString fieldSerial(qsizetype i) const override { return u'$' + QString::number(i + 1); }
+ QString fieldSerial(qsizetype i) const override { return QString("$%1"_L1).arg(i + 1); }
void deallocatePreparedStmt();
std::queue<PGresult*> nextResultSets;