OBDC Support (#1933)

* add possibility to connect to SQL Base by ODBC

---------

Co-authored-by: suchaudn <nicolas.suchaud@legrand.fr>
Co-authored-by: nicho2 <nicho2@laposte.net>
This commit is contained in:
Timothy Carambat
2024-07-23 12:42:53 -07:00
committed by GitHub
parent 42235fcd8a
commit cd597a361e
8 changed files with 116 additions and 6 deletions

View File

@@ -2,7 +2,7 @@ const { SystemSettings } = require("../../../../../../models/systemSettings");
const { safeJsonParse } = require("../../../../../http");
/**
* @typedef {('postgresql'|'mysql'|'sql-server')} SQLEngine
* @typedef {('postgresql'|'mysql'|'sql-server'|'odbc')} SQLEngine
*/
/**
@@ -36,6 +36,9 @@ function getDBClient(identifier = "", connectionConfig = {}) {
case "sql-server":
const { MSSQLConnector } = require("./MSSQL");
return new MSSQLConnector(connectionConfig);
case "odbc":
const { ODBCConnector } = require("./ODBC");
return new ODBCConnector(connectionConfig);
default:
throw new Error(
`There is no supported database connector for ${identifier}`