diff options
Diffstat (limited to 'dbaccess/source/filter/hsqldb/utils.cxx')
-rw-r--r-- | dbaccess/source/filter/hsqldb/utils.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dbaccess/source/filter/hsqldb/utils.cxx b/dbaccess/source/filter/hsqldb/utils.cxx index b6c5396e0c8e..dfdbee40c37b 100644 --- a/dbaccess/source/filter/hsqldb/utils.cxx +++ b/dbaccess/source/filter/hsqldb/utils.cxx @@ -19,6 +19,9 @@ */ #include <comphelper/string.hxx> +#include <comphelper/processfactory.hxx> +#include <connectivity/dbexception.hxx> + #include "utils.hxx" using namespace dbahsql; @@ -45,4 +48,16 @@ OUString utils::getTableNameFromStmt(const OUString& sSql) return *wordIter; } +void utils::ensureFirebirdTableLength(const OUString& sName) +{ + if (sName.getLength() > 30) // Firebird limitation + { + constexpr char NAME_TOO_LONG[] = "Firebird 3 doesn't currently support table names of more " + "than 30 characters, please shorten your table names in " + "the original file and try again."; + dbtools::throwGenericSQLException(NAME_TOO_LONG, + ::comphelper::getProcessComponentContext()); + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |