Add HSQLDB schema import

Desktop / LibreOffice - Tamas Bunth [collabora.co.uk] - 27 January 2018 08:30 EST

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

95bece38ac5c Add HSQLDB schema import
Repository.mk | 3 +-
.../source/drivers/firebird/Connection.cxx | 8 +-
dbaccess/Library_dba.mk | 2 +
dbaccess/Library_dbahsql.mk | 40 ++++
dbaccess/Module_dbaccess.mk | 1 +
dbaccess/README.vars | 1 +
dbaccess/inc/pch/precompiled_dbahsql.cxx | 12 ++
dbaccess/inc/pch/precompiled_dbahsql.hxx | 38 ++++
dbaccess/source/core/dataaccess/datasource.cxx | 26 +++
dbaccess/source/filter/hsqldb/columndef.cxx | 41 ++++
dbaccess/source/filter/hsqldb/columndef.hxx | 59 ++++++
dbaccess/source/filter/hsqldb/createparser.cxx | 223 +++++++++++++++++++++
dbaccess/source/filter/hsqldb/createparser.hxx | 51 +++++
dbaccess/source/filter/hsqldb/fbcreateparser.cxx | 163 +++++++++++++++
dbaccess/source/filter/hsqldb/fbcreateparser.hxx | 38 ++++
dbaccess/source/filter/hsqldb/hsqlimport.cxx | 56 ++++++
dbaccess/source/filter/hsqldb/hsqlimport.hxx | 47 +++++
dbaccess/source/filter/hsqldb/parseschema.cxx | 82 ++++++++
dbaccess/source/filter/hsqldb/parseschema.hxx | 44 ++++
19 files changed, 929 insertions(+), 6 deletions(-)

Upstream: cgit.freedesktop.org


  • Share