n8n-nodes-base 0.220.1 → 0.221.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.tsbuildinfo +1 -1
- package/dist/credentials/Postgres.credentials.js +115 -0
- package/dist/credentials/Postgres.credentials.js.map +1 -1
- package/dist/credentials/SshPrivateKey.credentials.js +1 -0
- package/dist/credentials/SshPrivateKey.credentials.js.map +1 -1
- package/dist/known/credentials.json +1 -0
- package/dist/nodes/ActionNetwork/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Autopilot/GenericFunctions.js +2 -1
- package/dist/nodes/Autopilot/GenericFunctions.js.map +1 -1
- package/dist/nodes/Aws/Rekognition/GenericFunctions.js +2 -1
- package/dist/nodes/Aws/Rekognition/GenericFunctions.js.map +1 -1
- package/dist/nodes/Aws/S3/GenericFunctions.js +2 -1
- package/dist/nodes/Aws/S3/GenericFunctions.js.map +1 -1
- package/dist/nodes/ClickUp/GenericFunctions.js +2 -1
- package/dist/nodes/ClickUp/GenericFunctions.js.map +1 -1
- package/dist/nodes/Clockify/GenericFunctions.js +2 -1
- package/dist/nodes/Clockify/GenericFunctions.js.map +1 -1
- package/dist/nodes/CompareDatasets/CompareDatasets.node.js +42 -6
- package/dist/nodes/CompareDatasets/CompareDatasets.node.js.map +1 -1
- package/dist/nodes/CompareDatasets/GenericFunctions.js +60 -18
- package/dist/nodes/CompareDatasets/GenericFunctions.js.map +1 -1
- package/dist/nodes/CompareDatasets/test/node/workflow.compareDatasets.fuzzy.missing_keys.json +232 -0
- package/dist/nodes/CompareDatasets/test/node/workflow.compareDatasets.skipFields.json +897 -0
- package/dist/nodes/CrateDb/CrateDb.node.js +7 -7
- package/dist/nodes/CrateDb/CrateDb.node.js.map +1 -1
- package/dist/nodes/DateTime/DateTime.node.js +11 -1
- package/dist/nodes/DateTime/DateTime.node.js.map +1 -1
- package/dist/nodes/DateTime/test/node/workflow.luxonDateTime.json +165 -0
- package/dist/nodes/Filter/Filter.node.js +12 -5
- package/dist/nodes/Filter/Filter.node.js.map +1 -1
- package/dist/nodes/Github/SearchFunctions.js +1 -1
- package/dist/nodes/Github/SearchFunctions.js.map +1 -1
- package/dist/nodes/GoToWebinar/GenericFunctions.d.ts +1 -1
- package/dist/nodes/GoToWebinar/GenericFunctions.js +5 -4
- package/dist/nodes/GoToWebinar/GenericFunctions.js.map +1 -1
- package/dist/nodes/Google/Sheet/GoogleSheetsTrigger.utils.d.ts +7 -1
- package/dist/nodes/HelpScout/GenericFunctions.js +2 -1
- package/dist/nodes/HelpScout/GenericFunctions.js.map +1 -1
- package/dist/nodes/HtmlExtract/HtmlExtract.node.js +4 -2
- package/dist/nodes/HtmlExtract/HtmlExtract.node.js.map +1 -1
- package/dist/nodes/HtmlExtract/test/workflow.dotNotation.json +143 -0
- package/dist/nodes/HttpRequest/GenericFunctions.d.ts +9 -0
- package/dist/nodes/HttpRequest/GenericFunctions.js +18 -1
- package/dist/nodes/HttpRequest/GenericFunctions.js.map +1 -1
- package/dist/nodes/HttpRequest/HttpRequest.node.js +2 -1
- package/dist/nodes/HttpRequest/HttpRequest.node.js.map +1 -1
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js +55 -5
- package/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js.map +1 -1
- package/dist/nodes/Hubspot/GenericFunctions.js +2 -1
- package/dist/nodes/Hubspot/GenericFunctions.js.map +1 -1
- package/dist/nodes/LinkedIn/GenericFunctions.js +16 -4
- package/dist/nodes/LinkedIn/GenericFunctions.js.map +1 -1
- package/dist/nodes/LinkedIn/LinkedIn.node.js +33 -77
- package/dist/nodes/LinkedIn/LinkedIn.node.js.map +1 -1
- package/dist/nodes/Microsoft/Teams/GenericFunctions.js +2 -1
- package/dist/nodes/Microsoft/Teams/GenericFunctions.js.map +1 -1
- package/dist/nodes/Notion/GenericFunctions.js +2 -1
- package/dist/nodes/Notion/GenericFunctions.js.map +1 -1
- package/dist/nodes/Orbit/GenericFunctions.js +2 -1
- package/dist/nodes/Orbit/GenericFunctions.js.map +1 -1
- package/dist/nodes/Postgres/Postgres.node.d.ts +3 -9
- package/dist/nodes/Postgres/Postgres.node.js +9 -319
- package/dist/nodes/Postgres/Postgres.node.js.map +1 -1
- package/dist/nodes/Postgres/v1/PostgresV1.node.d.ts +12 -0
- package/dist/nodes/Postgres/v1/PostgresV1.node.js +345 -0
- package/dist/nodes/Postgres/v1/PostgresV1.node.js.map +1 -0
- package/dist/nodes/Postgres/{Postgres.node.functions.js → v1/genericFunctions.js} +1 -1
- package/dist/nodes/Postgres/v1/genericFunctions.js.map +1 -0
- package/dist/nodes/Postgres/v2/PostgresV2.node.d.ts +13 -0
- package/dist/nodes/Postgres/v2/PostgresV2.node.js +20 -0
- package/dist/nodes/Postgres/v2/PostgresV2.node.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/common.descriptions.d.ts +7 -0
- package/dist/nodes/Postgres/v2/actions/common.descriptions.js +317 -0
- package/dist/nodes/Postgres/v2/actions/common.descriptions.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/Database.resource.d.ts +9 -0
- package/dist/nodes/Postgres/v2/actions/database/Database.resource.js +100 -0
- package/dist/nodes/Postgres/v2/actions/database/Database.resource.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/deleteTable.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/deleteTable.operation.js +110 -0
- package/dist/nodes/Postgres/v2/actions/database/deleteTable.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js +60 -0
- package/dist/nodes/Postgres/v2/actions/database/executeQuery.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.js +129 -0
- package/dist/nodes/Postgres/v2/actions/database/insert.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/select.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/select.operation.js +87 -0
- package/dist/nodes/Postgres/v2/actions/database/select.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/update.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/update.operation.js +164 -0
- package/dist/nodes/Postgres/v2/actions/database/update.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.d.ts +24 -0
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.js +165 -0
- package/dist/nodes/Postgres/v2/actions/database/upsert.operation.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/node.type.d.ts +7 -0
- package/dist/nodes/Postgres/v2/actions/node.type.js +3 -0
- package/dist/nodes/Postgres/v2/actions/node.type.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/router.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/router.js +65 -0
- package/dist/nodes/Postgres/v2/actions/router.js.map +1 -0
- package/dist/nodes/Postgres/v2/actions/versionDescription.d.ts +2 -0
- package/dist/nodes/Postgres/v2/actions/versionDescription.js +65 -0
- package/dist/nodes/Postgres/v2/actions/versionDescription.js.map +1 -0
- package/dist/nodes/Postgres/v2/helpers/interfaces.d.ts +37 -0
- package/dist/nodes/Postgres/v2/helpers/interfaces.js +3 -0
- package/dist/nodes/Postgres/v2/helpers/interfaces.js.map +1 -0
- package/dist/nodes/Postgres/v2/helpers/utils.d.ts +29 -0
- package/dist/nodes/Postgres/v2/helpers/utils.js +258 -0
- package/dist/nodes/Postgres/v2/helpers/utils.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/credentialTest.d.ts +2 -0
- package/dist/nodes/Postgres/v2/methods/credentialTest.js +47 -0
- package/dist/nodes/Postgres/v2/methods/credentialTest.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/index.d.ts +3 -0
- package/dist/nodes/Postgres/v2/methods/index.js +30 -0
- package/dist/nodes/Postgres/v2/methods/index.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/listSearch.d.ts +3 -0
- package/dist/nodes/Postgres/v2/methods/listSearch.js +42 -0
- package/dist/nodes/Postgres/v2/methods/listSearch.js.map +1 -0
- package/dist/nodes/Postgres/v2/methods/loadOptions.d.ts +4 -0
- package/dist/nodes/Postgres/v2/methods/loadOptions.js +40 -0
- package/dist/nodes/Postgres/v2/methods/loadOptions.js.map +1 -0
- package/dist/nodes/Postgres/v2/transport/index.d.ts +10 -0
- package/dist/nodes/Postgres/v2/transport/index.js +168 -0
- package/dist/nodes/Postgres/v2/transport/index.js.map +1 -0
- package/dist/nodes/QuestDb/QuestDb.node.js +3 -3
- package/dist/nodes/QuestDb/QuestDb.node.js.map +1 -1
- package/dist/nodes/Redis/Redis.node.js +35 -4
- package/dist/nodes/Redis/Redis.node.js.map +1 -1
- package/dist/nodes/S3/GenericFunctions.js +2 -1
- package/dist/nodes/S3/GenericFunctions.js.map +1 -1
- package/dist/nodes/Schedule/ScheduleTrigger.node.js +2 -2
- package/dist/nodes/Schedule/ScheduleTrigger.node.js.map +1 -1
- package/dist/nodes/SendGrid/GenericFunctions.js +2 -1
- package/dist/nodes/SendGrid/GenericFunctions.js.map +1 -1
- package/dist/nodes/SentryIo/GenericFunctions.js +2 -1
- package/dist/nodes/SentryIo/GenericFunctions.js.map +1 -1
- package/dist/nodes/ServiceNow/IncidentDescription.js +7 -0
- package/dist/nodes/ServiceNow/IncidentDescription.js.map +1 -1
- package/dist/nodes/Taiga/GenericFunctions.js +2 -1
- package/dist/nodes/Taiga/GenericFunctions.js.map +1 -1
- package/dist/nodes/TimescaleDb/TimescaleDb.node.js +4 -4
- package/dist/nodes/TimescaleDb/TimescaleDb.node.js.map +1 -1
- package/dist/nodes/Zendesk/GenericFunctions.js +2 -1
- package/dist/nodes/Zendesk/GenericFunctions.js.map +1 -1
- package/dist/types/credentials.json +2 -2
- package/dist/types/nodes.json +13 -11
- package/package.json +3 -3
- package/dist/nodes/Postgres/Postgres.node.functions.js.map +0 -1
- /package/dist/nodes/Postgres/{Postgres.node.functions.d.ts → v1/genericFunctions.d.ts} +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.execute = exports.description = void 0;
|
|
4
|
+
const utilities_1 = require("../../../../../utils/utilities");
|
|
5
|
+
const utils_1 = require("../../helpers/utils");
|
|
6
|
+
const common_descriptions_1 = require("../common.descriptions");
|
|
7
|
+
const properties = [
|
|
8
|
+
{
|
|
9
|
+
displayName: 'Data Mode',
|
|
10
|
+
name: 'dataMode',
|
|
11
|
+
type: 'options',
|
|
12
|
+
options: [
|
|
13
|
+
{
|
|
14
|
+
name: 'Auto-Map Input Data to Columns',
|
|
15
|
+
value: 'autoMapInputData',
|
|
16
|
+
description: 'Use when node input properties names exactly match the table column names',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Map Each Column Manually',
|
|
20
|
+
value: 'defineBelow',
|
|
21
|
+
description: 'Set the value for each destination column manually',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
default: 'autoMapInputData',
|
|
25
|
+
description: 'Whether to map node input properties and the table data automatically or manually',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: `
|
|
29
|
+
In this mode, make sure incoming data fields are named the same as the columns in your table. If needed, use a 'Set' node before this node to change the field names.
|
|
30
|
+
`,
|
|
31
|
+
name: 'notice',
|
|
32
|
+
type: 'notice',
|
|
33
|
+
default: '',
|
|
34
|
+
displayOptions: {
|
|
35
|
+
show: {
|
|
36
|
+
dataMode: ['autoMapInputData'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
displayName: 'Column to Match On',
|
|
42
|
+
name: 'columnToMatchOn',
|
|
43
|
+
type: 'options',
|
|
44
|
+
required: true,
|
|
45
|
+
description: 'The column to compare when finding the rows to update. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
46
|
+
typeOptions: {
|
|
47
|
+
loadOptionsMethod: 'getColumns',
|
|
48
|
+
loadOptionsDependsOn: ['schema.value', 'table.value'],
|
|
49
|
+
},
|
|
50
|
+
default: '',
|
|
51
|
+
hint: "Used to find the correct row(s) to update. Doesn't get changed. Has to be unique.",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
displayName: 'Value of Column to Match On',
|
|
55
|
+
name: 'valueToMatchOn',
|
|
56
|
+
type: 'string',
|
|
57
|
+
default: '',
|
|
58
|
+
description: 'Rows with a value in the specified "Column to Match On" that corresponds to the value in this field will be updated. New rows will be created for non-matching items.',
|
|
59
|
+
displayOptions: {
|
|
60
|
+
show: {
|
|
61
|
+
dataMode: ['defineBelow'],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
displayName: 'Values to Send',
|
|
67
|
+
name: 'valuesToSend',
|
|
68
|
+
placeholder: 'Add Value',
|
|
69
|
+
type: 'fixedCollection',
|
|
70
|
+
typeOptions: {
|
|
71
|
+
multipleValueButtonText: 'Add Value',
|
|
72
|
+
multipleValues: true,
|
|
73
|
+
},
|
|
74
|
+
displayOptions: {
|
|
75
|
+
show: {
|
|
76
|
+
dataMode: ['defineBelow'],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
default: {},
|
|
80
|
+
options: [
|
|
81
|
+
{
|
|
82
|
+
displayName: 'Values',
|
|
83
|
+
name: 'values',
|
|
84
|
+
values: [
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Column',
|
|
87
|
+
name: 'column',
|
|
88
|
+
type: 'options',
|
|
89
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
|
90
|
+
typeOptions: {
|
|
91
|
+
loadOptionsMethod: 'getColumnsWithoutColumnToMatchOn',
|
|
92
|
+
loadOptionsDependsOn: ['schema.value', 'table.value'],
|
|
93
|
+
},
|
|
94
|
+
default: [],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Value',
|
|
98
|
+
name: 'value',
|
|
99
|
+
type: 'string',
|
|
100
|
+
default: '',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
common_descriptions_1.optionsCollection,
|
|
107
|
+
];
|
|
108
|
+
const displayOptions = {
|
|
109
|
+
show: {
|
|
110
|
+
resource: ['database'],
|
|
111
|
+
operation: ['upsert'],
|
|
112
|
+
},
|
|
113
|
+
hide: {
|
|
114
|
+
table: [''],
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
exports.description = (0, utilities_1.updateDisplayOptions)(displayOptions, properties);
|
|
118
|
+
async function execute(runQueries, items, nodeOptions, db) {
|
|
119
|
+
items = (0, utils_1.replaceEmptyStringsByNulls)(items, nodeOptions.replaceEmptyStrings);
|
|
120
|
+
const queries = [];
|
|
121
|
+
for (let i = 0; i < items.length; i++) {
|
|
122
|
+
const schema = this.getNodeParameter('schema', i, undefined, {
|
|
123
|
+
extractValue: true,
|
|
124
|
+
});
|
|
125
|
+
const table = this.getNodeParameter('table', i, undefined, {
|
|
126
|
+
extractValue: true,
|
|
127
|
+
});
|
|
128
|
+
const columnToMatchOn = this.getNodeParameter('columnToMatchOn', i);
|
|
129
|
+
const dataMode = this.getNodeParameter('dataMode', i);
|
|
130
|
+
let item = {};
|
|
131
|
+
if (dataMode === 'autoMapInputData') {
|
|
132
|
+
item = items[i].json;
|
|
133
|
+
}
|
|
134
|
+
if (dataMode === 'defineBelow') {
|
|
135
|
+
const valuesToSend = this.getNodeParameter('valuesToSend', i, [])
|
|
136
|
+
.values;
|
|
137
|
+
item = (0, utils_1.prepareItem)(valuesToSend);
|
|
138
|
+
item[columnToMatchOn] = this.getNodeParameter('valueToMatchOn', i);
|
|
139
|
+
}
|
|
140
|
+
const tableSchema = await (0, utils_1.getTableSchema)(db, schema, table);
|
|
141
|
+
item = (0, utils_1.checkItemAgainstSchema)(this.getNode(), item, tableSchema, i);
|
|
142
|
+
let values = [schema, table];
|
|
143
|
+
let valuesLength = values.length + 1;
|
|
144
|
+
const onConflict = ` ON CONFLICT ($${valuesLength}:name) DO UPDATE `;
|
|
145
|
+
valuesLength = valuesLength + 1;
|
|
146
|
+
values.push(columnToMatchOn);
|
|
147
|
+
const insertQuery = `INSERT INTO $1:name.$2:name($${valuesLength}:name) VALUES($${valuesLength}:csv)${onConflict}`;
|
|
148
|
+
valuesLength = valuesLength + 1;
|
|
149
|
+
values.push(item);
|
|
150
|
+
const updateColumns = Object.keys(item).filter((column) => column !== columnToMatchOn);
|
|
151
|
+
const updates = [];
|
|
152
|
+
for (const column of updateColumns) {
|
|
153
|
+
updates.push(`$${valuesLength}:name = $${valuesLength + 1}`);
|
|
154
|
+
valuesLength = valuesLength + 2;
|
|
155
|
+
values.push(column, item[column]);
|
|
156
|
+
}
|
|
157
|
+
let query = `${insertQuery} SET ${updates.join(', ')}`;
|
|
158
|
+
const outputColumns = this.getNodeParameter('options.outputColumns', i, ['*']);
|
|
159
|
+
[query, values] = (0, utils_1.addReturning)(query, outputColumns, values);
|
|
160
|
+
queries.push({ query, values });
|
|
161
|
+
}
|
|
162
|
+
return runQueries(queries, items, nodeOptions);
|
|
163
|
+
}
|
|
164
|
+
exports.execute = execute;
|
|
165
|
+
//# sourceMappingURL=upsert.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upsert.operation.js","sourceRoot":"","sources":["../../../../../../nodes/Postgres/v2/actions/database/upsert.operation.ts"],"names":[],"mappings":";;;AAGA,8DAAsE;AAStE,+CAM6B;AAE7B,gEAA2D;AAE3D,MAAM,UAAU,GAAsB;IACrC;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,gCAAg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G,YAAY,GAAG,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAElB,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,eAAe,CAAC,CAAC;QAEvF,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,KAAK,MAAM,MAAM,IAAI,aAAa,EAAE;YACnC,OAAO,CAAC,IAAI,CAAC,IAAI,YAAY,YAAY,YAAY,GAAG,CAAC,EAAE,CAAC,CAAC;YAC7D,YAAY,GAAG,YAAY,GAAG,CAAC,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAW,CAAC,CAAC;SAC5C;QAED,IAAI,KAAK,GAAG,GAAG,WAAW,QAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAEvD,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,CAAa,CAAC;QAE3F,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAA,oBAAY,EAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;QAE7D,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;KAChC;IAED,OAAO,UAAU,CAAC,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;AAChD,CAAC;AA1ED,0BA0EC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AllEntities, Entity } from 'n8n-workflow';
|
|
2
|
+
type PostgresMap = {
|
|
3
|
+
database: 'deleteTable' | 'executeQuery' | 'insert' | 'select' | 'update' | 'upsert';
|
|
4
|
+
};
|
|
5
|
+
export type PostgresType = AllEntities<PostgresMap>;
|
|
6
|
+
export type PostgresDatabaseType = Entity<PostgresMap, 'database'>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.type.js","sourceRoot":"","sources":["../../../../../nodes/Postgres/v2/actions/node.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.router = void 0;
|
|
27
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
28
|
+
const database = __importStar(require("./database/Database.resource"));
|
|
29
|
+
const transport_1 = require("../transport");
|
|
30
|
+
const utils_1 = require("../helpers/utils");
|
|
31
|
+
async function router() {
|
|
32
|
+
let returnData = [];
|
|
33
|
+
const items = this.getInputData();
|
|
34
|
+
const resource = this.getNodeParameter('resource', 0);
|
|
35
|
+
const operation = this.getNodeParameter('operation', 0);
|
|
36
|
+
const credentials = await this.getCredentials('postgres');
|
|
37
|
+
const options = this.getNodeParameter('options', 0, {});
|
|
38
|
+
const { db, pgp, sshClient } = (await transport_1.Connections.getInstance(credentials, options, true));
|
|
39
|
+
const runQueries = (0, utils_1.configureQueryRunner)(this.getNode(), this.helpers.constructExecutionMetaData, this.continueOnFail(), pgp, db);
|
|
40
|
+
const postgresNodeData = {
|
|
41
|
+
resource,
|
|
42
|
+
operation,
|
|
43
|
+
};
|
|
44
|
+
try {
|
|
45
|
+
switch (postgresNodeData.resource) {
|
|
46
|
+
case 'database':
|
|
47
|
+
returnData = await database[postgresNodeData.operation].execute.call(this, runQueries, items, options, db);
|
|
48
|
+
break;
|
|
49
|
+
default:
|
|
50
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not supported!`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
finally {
|
|
57
|
+
if (sshClient) {
|
|
58
|
+
sshClient.end();
|
|
59
|
+
}
|
|
60
|
+
pgp.end();
|
|
61
|
+
}
|
|
62
|
+
return this.prepareOutputData(returnData);
|
|
63
|
+
}
|
|
64
|
+
exports.router = router;
|
|
65
|
+
//# sourceMappingURL=router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../../nodes/Postgres/v2/actions/router.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAAkD;AAIlD,uEAAyD;AACzD,4CAA2C;AAC3C,4CAAwD;AAGjD,KAAK,UAAU,MAAM;IAC3B,IAAI,UAAU,GAAyB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE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AO,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;AAC3C,CAAC;AAxDD,wBAwDC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.versionDescription = void 0;
|
|
27
|
+
const database = __importStar(require("./database/Database.resource"));
|
|
28
|
+
exports.versionDescription = {
|
|
29
|
+
displayName: 'Postgres',
|
|
30
|
+
name: 'postgres',
|
|
31
|
+
icon: 'file:postgres.svg',
|
|
32
|
+
group: ['input'],
|
|
33
|
+
version: 2,
|
|
34
|
+
subtitle: '={{ $parameter["operation"] }}',
|
|
35
|
+
description: 'Get, add and update data in Postgres',
|
|
36
|
+
defaults: {
|
|
37
|
+
name: 'Postgres',
|
|
38
|
+
},
|
|
39
|
+
inputs: ['main'],
|
|
40
|
+
outputs: ['main'],
|
|
41
|
+
credentials: [
|
|
42
|
+
{
|
|
43
|
+
name: 'postgres',
|
|
44
|
+
required: true,
|
|
45
|
+
testedBy: 'postgresConnectionTest',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
properties: [
|
|
49
|
+
{
|
|
50
|
+
displayName: 'Resource',
|
|
51
|
+
name: 'resource',
|
|
52
|
+
type: 'hidden',
|
|
53
|
+
noDataExpression: true,
|
|
54
|
+
options: [
|
|
55
|
+
{
|
|
56
|
+
name: 'Database',
|
|
57
|
+
value: 'database',
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
default: 'database',
|
|
61
|
+
},
|
|
62
|
+
...database.description,
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=versionDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionDescription.js","sourceRoot":"","sources":["../../../../../nodes/Postgres/v2/actions/versionDescription.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,uEAAyD;AAE5C,QAAA,kBAAkB,GAAyB;IACvD,WAAW,EAAE,UAAU;IACvB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,gCAAgC;IAC1C,WAAW,EAAE,sCAAsC;IACnD,QAAQ,EAAE;QACT,IAAI,EAAE,UAAU;KAChB;IACD,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,OAAO,EAAE,CAAC,MAAM,CAAC;IACjB,WAAW,EAAE;QACZ;YACC,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,wBAAwB;SAClC;KACD;IACD,UAAU,EAAE;QACX;YACC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,gBAAgB,EAAE,IAAI;YACtB,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,UAAU;oBAChB,KAAK,EAAE,UAAU;iBACjB;aACD;YACD,OAAO,EAAE,UAAU;SACnB;QACD,GAAG,QAAQ,CAAC,WAAW;KACvB;CACD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IDataObject, INodeExecutionData, IPairedItemData, NodeExecutionWithMetadata } from 'n8n-workflow';
|
|
2
|
+
import type pgPromise from 'pg-promise';
|
|
3
|
+
import type pg from 'pg-promise/typescript/pg-subset';
|
|
4
|
+
import type { Client } from 'ssh2';
|
|
5
|
+
export type QueryMode = 'single' | 'transaction' | 'independently';
|
|
6
|
+
export type QueryValue = string | number | IDataObject | string[];
|
|
7
|
+
export type QueryValues = QueryValue[];
|
|
8
|
+
export type QueryWithValues = {
|
|
9
|
+
query: string;
|
|
10
|
+
values?: QueryValues;
|
|
11
|
+
};
|
|
12
|
+
export type WhereClause = {
|
|
13
|
+
column: string;
|
|
14
|
+
condition: string;
|
|
15
|
+
value: string | number;
|
|
16
|
+
};
|
|
17
|
+
export type SortRule = {
|
|
18
|
+
column: string;
|
|
19
|
+
direction: string;
|
|
20
|
+
};
|
|
21
|
+
export type ColumnInfo = {
|
|
22
|
+
column_name: string;
|
|
23
|
+
data_type: string;
|
|
24
|
+
is_nullable: string;
|
|
25
|
+
};
|
|
26
|
+
export type PgpClient = pgPromise.IMain<{}, pg.IClient>;
|
|
27
|
+
export type PgpDatabase = pgPromise.IDatabase<{}, pg.IClient>;
|
|
28
|
+
export type PgpConnectionParameters = pg.IConnectionParameters<pg.IClient>;
|
|
29
|
+
export type ConnectionsData = {
|
|
30
|
+
db: PgpDatabase;
|
|
31
|
+
pgp: PgpClient;
|
|
32
|
+
sshClient?: Client;
|
|
33
|
+
};
|
|
34
|
+
export type ConstructExecutionMetaData = (inputData: INodeExecutionData[], options: {
|
|
35
|
+
itemData: IPairedItemData | IPairedItemData[];
|
|
36
|
+
}) => NodeExecutionWithMetadata[];
|
|
37
|
+
export type QueriesRunner = (queries: QueryWithValues[], items: INodeExecutionData[], options: IDataObject) => Promise<INodeExecutionData[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../nodes/Postgres/v2/helpers/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IDataObject, INode, INodeExecutionData } from 'n8n-workflow';
|
|
2
|
+
import { NodeOperationError } from 'n8n-workflow';
|
|
3
|
+
import type { ColumnInfo, ConstructExecutionMetaData, PgpClient, PgpDatabase, QueryValues, QueryWithValues, SortRule, WhereClause } from './interfaces';
|
|
4
|
+
export declare function wrapData(data: IDataObject | IDataObject[]): INodeExecutionData[];
|
|
5
|
+
export declare function prepareErrorItem(items: INodeExecutionData[], error: IDataObject | NodeOperationError | Error, index: number): INodeExecutionData;
|
|
6
|
+
export declare function parsePostgresError(node: INode, error: any, queries: QueryWithValues[], itemIndex?: number): NodeOperationError;
|
|
7
|
+
export declare function addWhereClauses(node: INode, itemIndex: number, query: string, clauses: WhereClause[], replacements: QueryValues, combineConditions: string): [string, QueryValues];
|
|
8
|
+
export declare function addSortRules(query: string, rules: SortRule[], replacements: QueryValues): [string, QueryValues];
|
|
9
|
+
export declare function addReturning(query: string, outputColumns: string[], replacements: QueryValues): [string, QueryValues];
|
|
10
|
+
export declare const configureQueryRunner: (node: INode, constructExecutionMetaData: ConstructExecutionMetaData, continueOnFail: boolean, pgp: PgpClient, db: PgpDatabase) => (queries: QueryWithValues[], items: INodeExecutionData[], options: IDataObject) => Promise<INodeExecutionData[] | {
|
|
11
|
+
json: {
|
|
12
|
+
message: string;
|
|
13
|
+
error: {
|
|
14
|
+
lineNumber: number | undefined;
|
|
15
|
+
node: INode;
|
|
16
|
+
description: string | null | undefined;
|
|
17
|
+
cause: Error | import("n8n-workflow").JsonObject | undefined;
|
|
18
|
+
timestamp: number;
|
|
19
|
+
context: IDataObject;
|
|
20
|
+
name: string;
|
|
21
|
+
message: string;
|
|
22
|
+
stack?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}[]>;
|
|
26
|
+
export declare function replaceEmptyStringsByNulls(items: INodeExecutionData[], replace?: boolean): INodeExecutionData[];
|
|
27
|
+
export declare function prepareItem(values: IDataObject[]): IDataObject;
|
|
28
|
+
export declare function getTableSchema(db: PgpDatabase, schema: string, table: string): Promise<ColumnInfo[]>;
|
|
29
|
+
export declare function checkItemAgainstSchema(node: INode, item: IDataObject, columnsInfo: ColumnInfo[], index: number): IDataObject;
|