summaryrefslogtreecommitdiff
path: root/dbaccess/Library_dbahsql.mk
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/Library_dbahsql.mk
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/Library_dbahsql.mk')
-rw-r--r--dbaccess/Library_dbahsql.mk40
1 files changed, 40 insertions, 0 deletions
diff --git a/dbaccess/Library_dbahsql.mk b/dbaccess/Library_dbahsql.mk
new file mode 100644
index 000000000000..f85660e6b3a8
--- /dev/null
+++ b/dbaccess/Library_dbahsql.mk
@@ -0,0 +1,40 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+$(eval $(call gb_Library_Library,dbahsql))
+
+$(eval $(call gb_Library_set_include,dbahsql,\
+ $$(INCLUDE) \
+ -I$(WORKDIR)/YaccTarget/connectivity/source/parse \
+))
+
+$(eval $(call gb_Library_use_external,dbahsql,boost_headers))
+
+$(eval $(call gb_Library_set_precompiled_header,dbahsql,$(SRCDIR)/dbaccess/inc/pch/precompiled_dbahsql))
+
+$(eval $(call gb_Library_use_sdk_api,dbahsql))
+
+$(eval $(call gb_Library_use_libraries,dbahsql,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ salhelper \
+ dbtools \
+))
+
+$(eval $(call gb_Library_add_exception_objects,dbahsql,\
+ dbaccess/source/filter/hsqldb/hsqlimport \
+ dbaccess/source/filter/hsqldb/parseschema \
+ dbaccess/source/filter/hsqldb/createparser \
+ dbaccess/source/filter/hsqldb/columndef \
+ dbaccess/source/filter/hsqldb/fbcreateparser \
+))
+
+# vim: set noet sw=4 ts=4: