Add delete option to MongoDb-Node

This commit is contained in:
Jan Oberhauser
2020-06-13 19:22:49 +02:00
parent 75e96a35bb
commit 2af04e775d
2 changed files with 41 additions and 2 deletions

View File

@@ -28,6 +28,11 @@ export const nodeDescription: INodeTypeDescription = {
name: 'operation',
type: 'options',
options: [
{
name: 'Delete',
value: 'delete',
description: 'Delete documents.'
},
{
name: 'Find',
value: 'find',
@@ -57,13 +62,36 @@ export const nodeDescription: INodeTypeDescription = {
description: 'MongoDB Collection'
},
// ----------------------------------
// delete
// ----------------------------------
{
displayName: 'Delete Query (JSON format)',
name: 'query',
type: 'json',
typeOptions: {
rows: 5
},
displayOptions: {
show: {
operation: [
'delete'
],
},
},
default: '{}',
placeholder: `{ "birth": { "$gt": "1950-01-01" } }`,
required: true,
description: 'MongoDB Delete query.'
},
// ----------------------------------
// find
// ----------------------------------
{
displayName: 'Query (JSON format)',
name: 'query',
type: 'string',
type: 'json',
typeOptions: {
rows: 5
},