Xyna-Factory / xyna-factory

Sources of the Xyna Factory Server, Xyna runtime applications (like GuiHttp or gitintegration), and installation scripts.
Apache License 2.0
15 stars 3 forks source link

Refactor SQL-PL to add new ones #220

Open csc-gip opened 1 year ago

csc-gip commented 1 year ago

Xyna suppports Orcale and MySQL/MariaDB as DB persistencelayers. There is quite some code duplication going on. This should be cleaned up to make it easier do add new SQL persistencelayers like e.g. PostgresSQL or SQLIte. https://github.com/GIP-SmartMercial/xyna-factory/tree/main/persistencelayers

Adding PostgresSQL should be straightforward as it seems to have a similar information_schema as MySQL/MairaDB. https://www.postgresql.org/docs/current/information-schema.html https://dev.mysql.com/doc/refman/8.0/en/information-schema.html https://jdbc.postgresql.org/ => https://github.com/pgjdbc/pgjdbc

SQLite seems trickier but might be usefull in scenarios where we need SQL but not a full DB. E.g. test-runs for nighbuilds or unittests. https://www.sqlite.org/schematab.html https://www.sqlite.org/pragma.html#pragfunc https://github.com/xerial/sqlite-jdbc

csc-gip commented 8 months ago

H2 seems to be a better fit than SQLite, as it is a native Java DB and it supports parallel connections. https://www.h2database.com/html/main.html