n8n-nodes-couchbase
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -73,2 +73,31 @@ "use strict"; | ||
{ | ||
displayName: 'Options', | ||
name: 'options', | ||
type: 'collection', | ||
displayOptions: { | ||
show: { | ||
operation: ['insert'], | ||
}, | ||
}, | ||
default: {}, | ||
placeholder: 'Add options', | ||
description: 'Add query options', | ||
options: [ | ||
{ | ||
displayName: 'Specify Document ID', | ||
name: 'specified', | ||
type: 'string', | ||
default: "", | ||
description: 'Specify ID', | ||
}, | ||
{ | ||
displayName: 'Generate Document ID', | ||
name: 'generate', | ||
type: 'boolean', | ||
default: false, | ||
description: 'Whether Generated ID', | ||
}, | ||
], | ||
}, | ||
{ | ||
displayName: 'Value', | ||
@@ -169,3 +198,2 @@ name: 'myDocument', | ||
let item3; | ||
let item4; | ||
let item5; | ||
@@ -198,9 +226,19 @@ let myDocument; | ||
if (operation === 'insert') { | ||
item = items[itemIndex]; | ||
item.json['myDocument'] = myDocument; | ||
await collection.insert(id, item.json); | ||
const options = this.getNodeParameter('options', 0); | ||
const specified = options.specified; | ||
const generate = options.generate; | ||
if (generate == true) { | ||
item = items[itemIndex]; | ||
item.json['Document'] = myDocument; | ||
await collection.insert(id, item.json); | ||
} | ||
else if (specified != "") { | ||
item = items[itemIndex]; | ||
item.json['Document'] = myDocument; | ||
await collection.insert(specified, item.json); | ||
} | ||
} | ||
else if (operation === 'update') { | ||
item2 = items[itemIndex]; | ||
item2.json['myDocument'] = myNewValue; | ||
item2.json['Document'] = myNewValue; | ||
await collection.upsert(myDocument, item2.json); | ||
@@ -210,2 +248,4 @@ } | ||
await collection.remove(myDocument); | ||
item = items[itemIndex]; | ||
item.json[''] = 'Document Deleted'; | ||
} | ||
@@ -218,6 +258,3 @@ else if (operation === 'find') { | ||
item3 = items[itemIndex]; | ||
item3.json[''] = readJson; | ||
item4 = items[itemIndex]; | ||
item4.json[' ']; | ||
await collection.get(myDocument); | ||
item3.json[''] = getResult.content; | ||
} | ||
@@ -224,0 +261,0 @@ else if (operation === 'import') { |
{ | ||
"name": "n8n-nodes-couchbase", | ||
"version": "0.1.4", | ||
"description": "N8N Node to add, get, update, delete and import data to couchbase", | ||
"version": "0.1.5", | ||
"description": "N8N Node to add, get, update, delete import and query data to couchbase", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "n8n-community-node-package" |
{ | ||
"name": "n8n-nodes-couchbase", | ||
"version": "0.1.4", | ||
"description": "N8N Node to add, get, update, delete and import data to couchbase", | ||
"version": "0.1.5", | ||
"description": "N8N Node to add, get, update, delete import and query data to couchbase", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "n8n-community-node-package" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
149266
565