mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(Postgres Node): Remove reusable connections (no-changelog) (#6259)
This commit is contained in:
@@ -4,9 +4,8 @@ import { NodeOperationError } from 'n8n-workflow';
|
||||
import type { PostgresType } from './node.type';
|
||||
|
||||
import * as database from './database/Database.resource';
|
||||
import { Connections } from '../transport';
|
||||
import { configurePostgres } from '../transport';
|
||||
import { configureQueryRunner } from '../helpers/utils';
|
||||
import type { ConnectionsData } from '../helpers/interfaces';
|
||||
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
let returnData: INodeExecutionData[] = [];
|
||||
@@ -19,11 +18,7 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
|
||||
const options = this.getNodeParameter('options', 0, {});
|
||||
options.nodeVersion = this.getNode().typeVersion;
|
||||
|
||||
const { db, pgp, sshClient } = (await Connections.getInstance(
|
||||
credentials,
|
||||
options,
|
||||
true,
|
||||
)) as ConnectionsData;
|
||||
const { db, pgp, sshClient } = await configurePostgres(credentials, options);
|
||||
|
||||
const runQueries = configureQueryRunner(
|
||||
this.getNode(),
|
||||
|
||||
Reference in New Issue
Block a user