From f03833ff25fea8c512b8f21eab600bbb4660ef4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Sat, 11 Sep 2021 12:58:48 +0200 Subject: [PATCH] :zap: Open edit window for SQL query fields (#2188) --- packages/nodes-base/nodes/CrateDb/CrateDb.node.ts | 2 +- .../nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts | 2 +- packages/nodes-base/nodes/MySql/MySql.node.ts | 8 ++++---- packages/nodes-base/nodes/Postgres/Postgres.node.ts | 2 +- packages/nodes-base/nodes/QuestDb/QuestDb.node.ts | 2 +- packages/nodes-base/nodes/Snowflake/Snowflake.node.ts | 2 +- packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts index 26c7f80da1..a1bcd308da 100644 --- a/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts +++ b/packages/nodes-base/nodes/CrateDb/CrateDb.node.ts @@ -72,7 +72,7 @@ export class CrateDb implements INodeType { name: 'query', type: 'string', typeOptions: { - rows: 5, + alwaysOpenEditWindow: true, }, displayOptions: { show: { diff --git a/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts b/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts index b387b8f9f0..4868548662 100644 --- a/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts @@ -91,7 +91,7 @@ export class MicrosoftSql implements INodeType { name: 'query', type: 'string', typeOptions: { - rows: 5, + alwaysOpenEditWindow: true, }, displayOptions: { show: { diff --git a/packages/nodes-base/nodes/MySql/MySql.node.ts b/packages/nodes-base/nodes/MySql/MySql.node.ts index d6db615b63..9eedfd0040 100644 --- a/packages/nodes-base/nodes/MySql/MySql.node.ts +++ b/packages/nodes-base/nodes/MySql/MySql.node.ts @@ -65,7 +65,7 @@ export class MySql implements INodeType { name: 'query', type: 'string', typeOptions: { - rows: 5, + alwaysOpenEditWindow: true, }, displayOptions: { show: { @@ -295,12 +295,12 @@ export class MySql implements INodeType { const options = this.getNodeParameter('options', 0) as IDataObject; const insertIgnore = options.ignore as boolean; const insertPriority = options.priority as string; - + const insertSQL = `INSERT ${insertPriority || ''} ${insertIgnore ? 'IGNORE' : ''} INTO ${table}(${columnString}) VALUES ${items.map(item => insertPlaceholder).join(',')};`; const queryItems = insertItems.reduce((collection, item) => collection.concat(Object.values(item as any)), []); // tslint:disable-line:no-any - + const queryResult = await connection.query(insertSQL, queryItems); - + returnItems = this.helpers.returnJsonArray(queryResult[0] as unknown as IDataObject); } catch (error) { if (this.continueOnFail()) { diff --git a/packages/nodes-base/nodes/Postgres/Postgres.node.ts b/packages/nodes-base/nodes/Postgres/Postgres.node.ts index 8b38fb6128..669e61ba01 100644 --- a/packages/nodes-base/nodes/Postgres/Postgres.node.ts +++ b/packages/nodes-base/nodes/Postgres/Postgres.node.ts @@ -65,7 +65,7 @@ export class Postgres implements INodeType { name: 'query', type: 'string', typeOptions: { - rows: 5, + alwaysOpenEditWindow: true, }, displayOptions: { show: { diff --git a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts index 2522be7231..4171304e6f 100644 --- a/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts +++ b/packages/nodes-base/nodes/QuestDb/QuestDb.node.ts @@ -63,7 +63,7 @@ export class QuestDb implements INodeType { name: 'query', type: 'string', typeOptions: { - rows: 5, + alwaysOpenEditWindow: true, }, displayOptions: { show: { diff --git a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts index 8be88202fb..ee779c2763 100644 --- a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts +++ b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts @@ -72,7 +72,7 @@ export class Snowflake implements INodeType { name: 'query', type: 'string', typeOptions: { - rows: 5, + alwaysOpenEditWindow: true, }, displayOptions: { show: { diff --git a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts index 693c57b302..478dfedf31 100644 --- a/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts +++ b/packages/nodes-base/nodes/TimescaleDb/TimescaleDb.node.ts @@ -72,7 +72,7 @@ export class TimescaleDb implements INodeType { name: 'query', type: 'string', typeOptions: { - rows: 5, + alwaysOpenEditWindow: true, }, displayOptions: { show: {