summaryrefslogtreecommitdiff
path: root/dbaccess/inc
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2018-01-08 15:57:39 +0100
committerTamás Bunth <btomi96@gmail.com>2018-01-27 09:30:29 +0100
commit95bece38ac5c943657ad959cad148c84a91d45a4 (patch)
treea67ea46797cfe4d259f3169c3be43c61bf28e1ce /dbaccess/inc
parent5c0af52feb2a392135489e0c1516cf4566d132cf (diff)
Add HSQLDB schema import
It can be enabled by initializing the DBACCESS_HSQL_MIGRATION variable. Create new library "dbahsql" which is responsible for migrating the embedded hsql database to any database covered by sdbc. The hsqldb schema is stored in a file named "script" in form of SQL statements. The SQL statements used by DBMS's differ mostly by the defined types. Because of that, only the create statements need to be parsed, alter statements will work (with a little luck) without actually modifying it. User / security settings which can occur in the script file (e.g. GRANT statements) are dropped. Statements starting with SET are also dropped (they are hsql specific stuff) Change-Id: I6a22942e8a9a76765f80e50f0ad68f4d72e1ff9d Reviewed-on: https://gerrit.libreoffice.org/48260 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Diffstat (limited to 'dbaccess/inc')
-rw-r--r--dbaccess/inc/pch/precompiled_dbahsql.cxx12
-rw-r--r--dbaccess/inc/pch/precompiled_dbahsql.hxx38
2 files changed, 50 insertions, 0 deletions
diff --git a/dbaccess/inc/pch/precompiled_dbahsql.cxx b/dbaccess/inc/pch/precompiled_dbahsql.cxx
new file mode 100644
index 000000000000..b56d7b2322ab
--- /dev/null
+++ b/dbaccess/inc/pch/precompiled_dbahsql.cxx
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "precompiled_dbahsql.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/inc/pch/precompiled_dbahsql.hxx b/dbaccess/inc/pch/precompiled_dbahsql.hxx
new file mode 100644
index 000000000000..8422b7dd8fdd
--- /dev/null
+++ b/dbaccess/inc/pch/precompiled_dbahsql.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2018-01-22 10:22:30 using:
+ bin/update_pch dbaccess dbahsql --cutoff=2 --exclude:system --exclude:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./dbaccess/inc/pch/precompiled_dbahsql.hxx "make dbaccess.build" --find-conflicts
+*/
+
+#include <cassert>
+#include <cstddef>
+#include <cstring>
+#include <rtl/strbuf.hxx>
+#include <rtl/stringutils.hxx>
+#include <rtl/ustrbuf.h>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/config.h>
+#include <sal/types.h>
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <comphelper/comphelperdllapi.h>
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */