mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Postgres Node): Re-use connection pool across executions (#12346)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user