fix(Postgres Node): Convert js arrays to postgres type, if column type is ARRAY (#9160)

This commit is contained in:
Michael Kret
2024-04-18 12:58:04 +03:00
committed by GitHub
parent d756609826
commit 08e35027f1
8 changed files with 160 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ import {
prepareItem,
replaceEmptyStringsByNulls,
configureTableSchemaUpdater,
convertArraysToPostgresFormat,
} from '../../helpers/utils';
import { optionsCollection } from '../common.descriptions';
@@ -171,7 +172,7 @@ const properties: INodeProperties[] = [
},
displayOptions: {
show: {
'@version': [2.2, 2.3],
'@version': [{ _cnd: { gte: 2.2 } }],
},
},
},
@@ -270,6 +271,10 @@ export async function execute(
tableSchema = await updateTableSchema(db, tableSchema, schema, table);
if (nodeVersion >= 2.4) {
convertArraysToPostgresFormat(item, tableSchema, this.getNode(), i);
}
item = checkItemAgainstSchema(this.getNode(), item, tableSchema, i);
let values: QueryValues = [schema, table];