feat(Postgres Node): Options keepAlive and keepAliveInitialDelayMillis (#9067)

This commit is contained in:
Michael Kret
2024-04-09 18:41:51 +03:00
committed by GitHub
parent c2f4d7d796
commit 58518b684b
16 changed files with 136 additions and 31 deletions

View File

@@ -8,6 +8,7 @@ import { NodeOperationError } from 'n8n-workflow';
import type {
PgpDatabase,
PostgresNodeOptions,
QueriesRunner,
QueryValues,
QueryWithValues,
@@ -194,7 +195,7 @@ export async function execute(
this: IExecuteFunctions,
runQueries: QueriesRunner,
items: INodeExecutionData[],
nodeOptions: IDataObject,
nodeOptions: PostgresNodeOptions,
db: PgpDatabase,
): Promise<INodeExecutionData[]> {
items = replaceEmptyStringsByNulls(items, nodeOptions.replaceEmptyStrings as boolean);
@@ -279,7 +280,7 @@ export async function execute(
const rowExists = await doesRowExist(db, schema, table, matchValues);
if (!rowExists) {
const descriptionValues: string[] = [];
matchValues.forEach((val, index) => {
matchValues.forEach((_, index) => {
if (index % 2 === 0) {
descriptionValues.push(`${matchValues[index]}=${matchValues[index + 1]}`);
}