SYNC: Merge branch 'feature/dblogs'

This commit is contained in:
SPRINX0\prochazka
2025-08-06 12:34:25 +02:00
committed by Diflow
parent 4ed437fd4e
commit ed7605eccd
15 changed files with 241 additions and 153 deletions

View File

@@ -78,6 +78,7 @@ const drivers = driverBases.map(driverBase => ({
async connect(props) {
const {
conid,
engine,
server,
port,
@@ -137,6 +138,7 @@ const drivers = driverBases.map(driverBase => ({
const dbhan = {
client,
database,
conid,
};
const datatypes = await this.query(dbhan, `SELECT oid, typname FROM pg_type WHERE typname in ('geography')`);
@@ -228,7 +230,7 @@ const drivers = driverBases.map(driverBase => ({
});
query.on('error', error => {
logger.error(extractErrorLogData(error), 'DBGM-00201 Stream error');
logger.error(extractErrorLogData(error, this.getLogDbInfo(dbhan)), 'DBGM-00201 Stream error');
const { message, position, procName } = error;
let line = null;
if (position) {
@@ -382,7 +384,7 @@ const drivers = driverBases.map(driverBase => ({
const defaultSchemaRows = await this.query(dbhan, 'SELECT current_schema');
const defaultSchema = defaultSchemaRows.rows[0]?.current_schema?.trim();
logger.debug(`DBGM-00142 Loaded ${schemaRows.rows.length} postgres schemas`);
logger.debug(this.getLogDbInfo(dbhan), `DBGM-00142 Loaded ${schemaRows.rows.length} postgres schemas`);
const schemas = schemaRows.rows.map(x => ({
schemaName: x.schema_name,