summaryrefslogtreecommitdiffstats
path: root/src/plugins/sqldrivers/oci/qsql_oci.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2023-03-12 14:50:05 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2023-03-17 20:33:16 +0100
commit1981ebe8ada68f600ecb10d9e9b7270cf9e19866 (patch)
treedf0f563b03004e737ae3865dae137a450092fab6 /src/plugins/sqldrivers/oci/qsql_oci.cpp
parentf49f3f2f942e98a44277eea09fa2e985b8b2924a (diff)
SQL/OCI: add maximumIdentifierLength()
A table name or identifier must not be longer than 30 (< Oracle 12.2) or 128 bytes (sadly not characters). Change-Id: I49192afaf908e12f5cfd20c754640b6117b03a71 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/plugins/sqldrivers/oci/qsql_oci.cpp')
-rw-r--r--src/plugins/sqldrivers/oci/qsql_oci.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp
index ffad5e88cd..b670efc15b 100644
--- a/src/plugins/sqldrivers/oci/qsql_oci.cpp
+++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp
@@ -2759,4 +2759,11 @@ QString QOCIDriver::escapeIdentifier(const QString &identifier, IdentifierType t
return res;
}
+int QOCIDriver::maximumIdentifierLength(IdentifierType type) const
+{
+ Q_D(const QOCIDriver);
+ Q_UNUSED(type);
+ return d->serverVersion > 12 ? 128 : 30;
+}
+
QT_END_NAMESPACE