fix(Postgres Node): Re-use connection pool across executions (#12346)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
Danny Martini
2024-12-27 08:15:37 +00:00
committed by GitHub
parent 7b2630d1a0
commit 2ca37f5f7f
10 changed files with 504 additions and 200 deletions

View File

@@ -18,17 +18,13 @@ export async function getColumns(this: ILoadOptionsFunctions): Promise<INodeProp
extractValue: true,
}) as string;
try {
const columns = await getTableSchema(db, schema, table);
const columns = await getTableSchema(db, schema, table);
return columns.map((column) => ({
name: column.column_name,
value: column.column_name,
description: `Type: ${column.data_type.toUpperCase()}, Nullable: ${column.is_nullable}`,
}));
} finally {
if (!db.$pool.ending) await db.$pool.end();
}
return columns.map((column) => ({
name: column.column_name,
value: column.column_name,
description: `Type: ${column.data_type.toUpperCase()}, Nullable: ${column.is_nullable}`,
}));
}
export async function getColumnsMultiOptions(