@lowdefy/connection-mongodb 0.0.0-experimental-20251010122007 → 0.0.0-experimental-20251203145918
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/package.json +3 -3
- package/dist/connections/MongoDBCollection/MongoDBAggregation/documentation.md +0 -101
- package/dist/connections/MongoDBCollection/MongoDBBulkWrite/documentation.md +0 -359
- package/dist/connections/MongoDBCollection/MongoDBDeleteMany/documentation.md +0 -89
- package/dist/connections/MongoDBCollection/MongoDBDeleteOne/documentation.md +0 -92
- package/dist/connections/MongoDBCollection/MongoDBFind/documentation.md +0 -114
- package/dist/connections/MongoDBCollection/MongoDBFindOne/documentation.md +0 -109
- package/dist/connections/MongoDBCollection/MongoDBInsertMany/documentation.md +0 -98
- package/dist/connections/MongoDBCollection/MongoDBInsertOne/documentation.md +0 -94
- package/dist/connections/MongoDBCollection/MongoDBUpdateMany/documentation.md +0 -113
- package/dist/connections/MongoDBCollection/MongoDBUpdateOne/documentation.md +0 -133
- package/dist/connections/MongoDBCollection/documentation.md +0 -137
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/connection-mongodb",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20251203145918",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"dist/*"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@lowdefy/helpers": "0.0.0-experimental-
|
|
43
|
+
"@lowdefy/helpers": "0.0.0-experimental-20251203145918",
|
|
44
44
|
"@next-auth/mongodb-adapter": "1.1.3",
|
|
45
45
|
"mongodb": "6.3.0",
|
|
46
46
|
"saslprep": "1.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@lowdefy/ajv": "0.0.0-experimental-
|
|
49
|
+
"@lowdefy/ajv": "0.0.0-experimental-20251203145918",
|
|
50
50
|
"@shelf/jest-mongodb": "4.3.2",
|
|
51
51
|
"@swc/cli": "0.1.63",
|
|
52
52
|
"@swc/core": "1.3.99",
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<TITLE>
|
|
2
|
-
MongoDBAggregation
|
|
3
|
-
</TITLE>
|
|
4
|
-
|
|
5
|
-
<DESCRIPTION>
|
|
6
|
-
|
|
7
|
-
The `MongoDBAggregation` request executes an [aggregation pipeline](https://docs.mongodb.com/manual/core/aggregation-pipeline/) in the collection specified in the connectionId. It returns the array of documents returned by the aggregation. Aggregation pipelines are MongoDB's data processing and aggregation framework. They are based on a series of stages, each of which apply a transformation to the data passed through them, like sorting, grouping or calculating additional fields.
|
|
8
|
-
|
|
9
|
-
>Cursors are not supported. The request will return the whole body of the response as an array.
|
|
10
|
-
|
|
11
|
-
### Properties
|
|
12
|
-
|
|
13
|
-
- `pipeline: object[]`: __Required__ - Array containing all the aggregation framework commands for the execution.
|
|
14
|
-
- `options: object`: Optional settings. See the [driver documentation](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#aggregate) for more information. Supported settings are:
|
|
15
|
-
- `allowDiskUse: boolean`: Default: `false` - Allow disk use on the MongoDB server to store temporary results for the aggregation.
|
|
16
|
-
- `authdb: string`: Specifies the authentication information to be used.
|
|
17
|
-
- `batchSize: number`: The number of documents to return per batch.
|
|
18
|
-
- `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
|
|
19
|
-
- `bypassDocumentValidation: boolean`: Default: `false` - Allow driver to bypass schema validation in MongoDB 3.2 or higher.
|
|
20
|
-
- `checkKeys: boolean`: The serializer will check if keys are valid.
|
|
21
|
-
- `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
|
|
22
|
-
- `comment: string`: Add a [comment](https://docs.mongodb.com/manual/reference/operator/query/comment/index.html) to the aggregation. These comments are visible in the MongoDB profile log, making them easier to interpret.
|
|
23
|
-
- `dbName: string`: The database name.
|
|
24
|
-
- `explain: boolean`: Specifies to return the information on the processing of the pipeline.
|
|
25
|
-
- `fullResponse: boolean`: Return the full server response for the command.
|
|
26
|
-
- `hint: string | object`: Add an index selection hint to an aggregation command.
|
|
27
|
-
- `ignoreUndefined: boolean`: Default: `true` - Serialize will not emit undefined fields.
|
|
28
|
-
- `let: object`: Specifies an object with a list of variables. This allows you to improve command readability by separating the variables from the query text.
|
|
29
|
-
- `maxAwaitTimeMS: number`: The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.
|
|
30
|
-
- `maxTimeMS: number`: Specifies a cumulative time limit in milliseconds for processing operations on the cursor.
|
|
31
|
-
- `noResponse: boolean`: Admin command option.
|
|
32
|
-
- `readConcern: object`: Specifies the level of isolation for read operations.
|
|
33
|
-
- `readPreference: string | object`: The read preference.
|
|
34
|
-
- `retryWrites: boolean`: Should retry failed writes.
|
|
35
|
-
- `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
|
|
36
|
-
- `willRetryWrites: boolean`: Option whether to retry writes.
|
|
37
|
-
- `writeConcern: object`: An object that expresses the write concern to use with the $out or $merge stage.
|
|
38
|
-
|
|
39
|
-
</DESCRIPTION>
|
|
40
|
-
|
|
41
|
-
<CONNECTION>
|
|
42
|
-
MongoDBCollection
|
|
43
|
-
</CONNECTION>
|
|
44
|
-
|
|
45
|
-
<SCHEMA>
|
|
46
|
-
|
|
47
|
-
```js
|
|
48
|
-
export default {
|
|
49
|
-
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
50
|
-
title: 'Lowdefy Request Schema - MongoDBAggregation',
|
|
51
|
-
type: 'object',
|
|
52
|
-
required: ['pipeline'],
|
|
53
|
-
properties: {
|
|
54
|
-
pipeline: {
|
|
55
|
-
type: 'array',
|
|
56
|
-
description: 'Array containing all the aggregation framework commands for the execution.',
|
|
57
|
-
errorMessage: {
|
|
58
|
-
type: 'MongoDBAggregation request property "pipeline" should be an array.',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
options: {
|
|
62
|
-
type: 'object',
|
|
63
|
-
description: 'Optional settings.',
|
|
64
|
-
errorMessage: {
|
|
65
|
-
type: 'MongoDBAggregation request property "options" should be an object.',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
errorMessage: {
|
|
70
|
-
type: 'MongoDBAggregation request properties should be an object.',
|
|
71
|
-
required: 'MongoDBAggregation request should have required property "pipeline".',
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
</SCHEMA>
|
|
77
|
-
|
|
78
|
-
<EXAMPLES>
|
|
79
|
-
|
|
80
|
-
### Calculate average score by region
|
|
81
|
-
|
|
82
|
-
```yaml
|
|
83
|
-
requests:
|
|
84
|
-
- id: avg_spend_by_region
|
|
85
|
-
type: MongoDBAggregation
|
|
86
|
-
connectionId: my_mongodb_collection_id
|
|
87
|
-
properties:
|
|
88
|
-
pipeline:
|
|
89
|
-
- $group:
|
|
90
|
-
_id: $region
|
|
91
|
-
score:
|
|
92
|
-
$avg: $score
|
|
93
|
-
- $project:
|
|
94
|
-
_id: 0
|
|
95
|
-
region: $_id
|
|
96
|
-
score: 1
|
|
97
|
-
- $sort:
|
|
98
|
-
score: 1
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
</EXAMPLES>
|
|
@@ -1,359 +0,0 @@
|
|
|
1
|
-
<TITLE>
|
|
2
|
-
MongoDBBulkWrite
|
|
3
|
-
</TITLE>
|
|
4
|
-
|
|
5
|
-
<DESCRIPTION>
|
|
6
|
-
|
|
7
|
-
The `MongoDBBulkWrite` request executes [bulkWrite operations](https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite/#write-operations) in the collection specified in the connectionId.
|
|
8
|
-
|
|
9
|
-
### Properties
|
|
10
|
-
|
|
11
|
-
- `operations: object[]`: __Required__ - Array containing all the bulkWrite operations for the execution.
|
|
12
|
-
- `insertOne: object`:
|
|
13
|
-
- `document: object`: The document to be inserted.
|
|
14
|
-
- `deleteOne: object`:
|
|
15
|
-
- `filter: object`: __Required__ - The filter used to select the document to delete.
|
|
16
|
-
- `collation: object`: Specify collation settings for update operation.
|
|
17
|
-
- `deleteMany: object`:
|
|
18
|
-
- `filter: object`: __Required__ - The filter used to select the documents to delete.
|
|
19
|
-
- `collation: object`: Specify collation settings for update operation.
|
|
20
|
-
- `updateOne: object`:
|
|
21
|
-
- `filter: object`: __Required__ - The filter used to select the document to update.
|
|
22
|
-
- `update: object | object[]`: __Required__ - The update operations to be applied to the document.
|
|
23
|
-
- `upsert: object`: Insert document if no match is found.
|
|
24
|
-
- `arrayFilters: string[]`: Array filters for the [`$[<identifier>]`](https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/) array update operator.
|
|
25
|
-
- `collation: object`: Specify collation settings for update operation.
|
|
26
|
-
- `hint: object | string`: 'An optional hint for query optimization.'
|
|
27
|
-
- `updateMany: object`:
|
|
28
|
-
- `filter: object`: __Required__ - The filter used to select the documents to update.
|
|
29
|
-
- `update: object | object[]`: __Required__ - The update operations to be applied to the documents.
|
|
30
|
-
- `upsert: object`: Insert document if no match is found.
|
|
31
|
-
- `arrayFilters: string[]`: Array filters for the [`$[<identifier>]`](https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/) array update operator.
|
|
32
|
-
- `collation: object`: Specify collation settings for update operation.
|
|
33
|
-
- `hint: object | string`: An optional hint for query optimization.
|
|
34
|
-
- `replaceOne: object`:
|
|
35
|
-
- `filter: object`: __Required__ - The filter used to select the document to replace.
|
|
36
|
-
- `replacement: object`: __Required__ - The document to be inserted.
|
|
37
|
-
- `upsert: object`: Insert document if no match is found.
|
|
38
|
-
- `collation: object`: Specify collation settings for update operation.
|
|
39
|
-
- `hint: object | string`: An optional hint for query optimization.
|
|
40
|
-
- `options: object`: Optional settings. See the [driver documentation](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#aggregate) for more information. Supported settings are:
|
|
41
|
-
- `ordered: boolean`: Default: `true` - A boolean specifying whether the mongod instance should perform an ordered or unordered operation execution.
|
|
42
|
-
- `writeConcern: object`: An object that expresses the write concern to use.
|
|
43
|
-
|
|
44
|
-
</DESCRIPTION>
|
|
45
|
-
|
|
46
|
-
<CONNECTION>
|
|
47
|
-
MongoDBCollection
|
|
48
|
-
</CONNECTION>
|
|
49
|
-
|
|
50
|
-
<SCHEMA>
|
|
51
|
-
|
|
52
|
-
```js
|
|
53
|
-
export default {
|
|
54
|
-
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
55
|
-
title: 'Lowdefy Request Schema - MongoDBBulkWrite',
|
|
56
|
-
type: 'object',
|
|
57
|
-
required: ['operations'],
|
|
58
|
-
errorMessage: {
|
|
59
|
-
type: 'MongoDBBulkWrite request properties should be an object.',
|
|
60
|
-
required: 'MongoDBBulkWrite request should have required property "operations".',
|
|
61
|
-
},
|
|
62
|
-
properties: {
|
|
63
|
-
operations: {
|
|
64
|
-
type: 'array',
|
|
65
|
-
description: 'Array containing all the write operations for the execution.',
|
|
66
|
-
errorMessage: {
|
|
67
|
-
type: 'MongoDBBulkWrite request property "operations" should be an array.',
|
|
68
|
-
},
|
|
69
|
-
items: {
|
|
70
|
-
type: 'object',
|
|
71
|
-
errorMessage: {
|
|
72
|
-
type: 'MongoDBBulkWrite request property "operations" should be an array of write operation objects.',
|
|
73
|
-
additionalProperties: 'MongoDBBulkWrite operation should be a write operation.',
|
|
74
|
-
maxProperties: 'MongoDBBulkWrite operation should be a write operation.',
|
|
75
|
-
},
|
|
76
|
-
additionalProperties: false,
|
|
77
|
-
maxProperties: 1,
|
|
78
|
-
properties: {
|
|
79
|
-
insertOne: {
|
|
80
|
-
type: 'object',
|
|
81
|
-
required: ['document'],
|
|
82
|
-
errorMessage: {
|
|
83
|
-
type: 'insertOne operation should be an object.',
|
|
84
|
-
required: 'insertOne operation should have required property "document".',
|
|
85
|
-
},
|
|
86
|
-
properties: {
|
|
87
|
-
document: {
|
|
88
|
-
type: 'object',
|
|
89
|
-
description: 'The document to be inserted.',
|
|
90
|
-
errorMessage: {
|
|
91
|
-
type: 'insertOne operation property "document" should be an object.',
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
updateOne: {
|
|
97
|
-
type: 'object',
|
|
98
|
-
required: ['filter', 'update'],
|
|
99
|
-
errorMessage: {
|
|
100
|
-
type: 'updateOne operation should be an object.',
|
|
101
|
-
required: {
|
|
102
|
-
filter: 'updateOne operation should have required property "filter".',
|
|
103
|
-
update: 'updateOne operation should have required property "update".',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
properties: {
|
|
107
|
-
filter: {
|
|
108
|
-
type: 'object',
|
|
109
|
-
description: 'The filter used to select the document to update.',
|
|
110
|
-
errorMessage: {
|
|
111
|
-
type: 'updateOne operation property "filter" should be an object.',
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
update: {
|
|
115
|
-
type: ['object', 'array'],
|
|
116
|
-
description: 'The update operations to be applied to the document.',
|
|
117
|
-
errorMessage: {
|
|
118
|
-
type: 'updateOne operation property "update" should be an object or an array.',
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
upsert: {
|
|
122
|
-
type: 'boolean',
|
|
123
|
-
description: 'Insert document if no match is found.',
|
|
124
|
-
errorMessage: {
|
|
125
|
-
type: 'updateOne operation property "upsert" should be a boolean.',
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
arrayFilters: {
|
|
129
|
-
type: 'array',
|
|
130
|
-
description: 'Array filters for the `$[<identifier>]` array update operator.',
|
|
131
|
-
errorMessage: {
|
|
132
|
-
type: 'updateOne operation property "arrayFilters" should be an array.',
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
collation: {
|
|
136
|
-
type: 'object',
|
|
137
|
-
description: 'Specify collation settings for update operation.',
|
|
138
|
-
errorMessage: {
|
|
139
|
-
type: 'updateOne operation property "collation" should be an object.',
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
hint: {
|
|
143
|
-
type: ['object', 'string'],
|
|
144
|
-
description: 'An optional hint for query optimization.',
|
|
145
|
-
errorMessage: {
|
|
146
|
-
type: 'updateOne operation property "hint" should be an object or a string.',
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
updateMany: {
|
|
152
|
-
type: 'object',
|
|
153
|
-
required: ['filter', 'update'],
|
|
154
|
-
errorMessage: {
|
|
155
|
-
type: 'updateMany operation should be an object.',
|
|
156
|
-
required: {
|
|
157
|
-
filter: 'updateMany operation should have required property "filter".',
|
|
158
|
-
update: 'updateMany operation should have required property "update".',
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
properties: {
|
|
162
|
-
filter: {
|
|
163
|
-
type: 'object',
|
|
164
|
-
description: 'The filter used to select the documents to update.',
|
|
165
|
-
errorMessage: {
|
|
166
|
-
type: 'updateMany operation property "filter" should be an object.',
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
update: {
|
|
170
|
-
type: ['object', 'array'],
|
|
171
|
-
description: 'The update operations to be applied to the document.',
|
|
172
|
-
errorMessage: {
|
|
173
|
-
type: 'updateMany operation property "update" should be an object or an array.',
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
upsert: {
|
|
177
|
-
type: 'boolean',
|
|
178
|
-
description: 'Insert document if no match is found.',
|
|
179
|
-
errorMessage: {
|
|
180
|
-
type: 'updateMany operation property "upsert" should be a boolean.',
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
arrayFilters: {
|
|
184
|
-
type: 'array',
|
|
185
|
-
description: 'Array filters for the `$[<identifier>]` array update operator.',
|
|
186
|
-
errorMessage: {
|
|
187
|
-
type: 'updateMany operation property "arrayFilters" should be an array.',
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
collation: {
|
|
191
|
-
type: 'object',
|
|
192
|
-
description: 'Specify collation settings for update operation.',
|
|
193
|
-
errorMessage: {
|
|
194
|
-
type: 'updateMany operation property "collation" should be an object.',
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
hint: {
|
|
198
|
-
type: ['object', 'string'],
|
|
199
|
-
description: 'An optional hint for query optimization.',
|
|
200
|
-
errorMessage: {
|
|
201
|
-
type: 'updateMany operation property "hint" should be an object or a string.',
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
deleteOne: {
|
|
207
|
-
type: 'object',
|
|
208
|
-
required: ['filter'],
|
|
209
|
-
errorMessage: {
|
|
210
|
-
type: 'deleteOne operation should be an object.',
|
|
211
|
-
required: 'deleteOne operation should have required property "filter".',
|
|
212
|
-
},
|
|
213
|
-
properties: {
|
|
214
|
-
filter: {
|
|
215
|
-
type: 'object',
|
|
216
|
-
description: 'The filter used to select the document to update.',
|
|
217
|
-
errorMessage: {
|
|
218
|
-
type: 'deleteOne operation property "filter" should be an object.',
|
|
219
|
-
},
|
|
220
|
-
},
|
|
221
|
-
collation: {
|
|
222
|
-
type: 'object',
|
|
223
|
-
description: 'Specify collation settings for update operation.',
|
|
224
|
-
errorMessage: {
|
|
225
|
-
type: 'deleteOne operation property "collation" should be an object.',
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
},
|
|
230
|
-
deleteMany: {
|
|
231
|
-
type: 'object',
|
|
232
|
-
required: ['filter'],
|
|
233
|
-
errorMessage: {
|
|
234
|
-
type: 'deleteMany operation should be an object.',
|
|
235
|
-
required: 'deleteMany operation should have required property "filter".',
|
|
236
|
-
},
|
|
237
|
-
properties: {
|
|
238
|
-
filter: {
|
|
239
|
-
type: 'object',
|
|
240
|
-
description: 'The filter used to select the documents to delete.',
|
|
241
|
-
errorMessage: {
|
|
242
|
-
type: 'deleteMany operation property "filter" should be an object.',
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
collation: {
|
|
246
|
-
type: 'object',
|
|
247
|
-
description: 'Specify collation settings for update operation.',
|
|
248
|
-
errorMessage: {
|
|
249
|
-
type: 'deleteMany operation property "collation" should be an object.',
|
|
250
|
-
},
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
replaceOne: {
|
|
255
|
-
type: 'object',
|
|
256
|
-
required: ['filter', 'replacement'],
|
|
257
|
-
errorMessage: {
|
|
258
|
-
type: 'replaceOne operation should be an object.',
|
|
259
|
-
required: {
|
|
260
|
-
filter: 'replaceOne operation should have required property "filter".',
|
|
261
|
-
replacement: 'replaceOne operation should have required property "replacement".',
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
properties: {
|
|
265
|
-
filter: {
|
|
266
|
-
type: 'object',
|
|
267
|
-
description: 'The filter used to select the documents to update.',
|
|
268
|
-
errorMessage: {
|
|
269
|
-
type: 'replaceOne operation property "filter" should be an object.',
|
|
270
|
-
},
|
|
271
|
-
},
|
|
272
|
-
replacement: {
|
|
273
|
-
type: 'object',
|
|
274
|
-
description: 'The document to be inserted.',
|
|
275
|
-
errorMessage: {
|
|
276
|
-
type: 'replaceOne operation property "replacement" should be an object.',
|
|
277
|
-
},
|
|
278
|
-
},
|
|
279
|
-
upsert: {
|
|
280
|
-
type: 'boolean',
|
|
281
|
-
description: 'Insert document if no match is found.',
|
|
282
|
-
errorMessage: {
|
|
283
|
-
type: 'replaceOne operation property "upsert" should be a boolean.',
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
collation: {
|
|
287
|
-
type: 'object',
|
|
288
|
-
description: 'Specify collation settings for update operation.',
|
|
289
|
-
errorMessage: {
|
|
290
|
-
type: 'replaceOne operation property "collation" should be an object.',
|
|
291
|
-
},
|
|
292
|
-
},
|
|
293
|
-
hint: {
|
|
294
|
-
type: ['object', 'string'],
|
|
295
|
-
description: 'An optional hint for query optimization.',
|
|
296
|
-
errorMessage: {
|
|
297
|
-
type: 'replaceOne operation property "hint" should be an object or a string.',
|
|
298
|
-
},
|
|
299
|
-
},
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
},
|
|
305
|
-
options: {
|
|
306
|
-
type: 'object',
|
|
307
|
-
description: 'Optional settings.',
|
|
308
|
-
errorMessage: {
|
|
309
|
-
type: 'MongoDBBulkWrite request property "options" should be an object.',
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
};
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
</SCHEMA>
|
|
317
|
-
|
|
318
|
-
<EXAMPLES>
|
|
319
|
-
|
|
320
|
-
### Update pizzas
|
|
321
|
-
|
|
322
|
-
```yaml
|
|
323
|
-
requests:
|
|
324
|
-
- id: update_pizzas
|
|
325
|
-
type: MongoDBBulkWrite
|
|
326
|
-
connectionId: my_mongodb_collection_id
|
|
327
|
-
properties:
|
|
328
|
-
operations:
|
|
329
|
-
- insertOne:
|
|
330
|
-
document:
|
|
331
|
-
_id: 3
|
|
332
|
-
type: "beef"
|
|
333
|
-
size: "medium"
|
|
334
|
-
price: 6
|
|
335
|
-
- insertOne:
|
|
336
|
-
document:
|
|
337
|
-
_id: 4
|
|
338
|
-
type: "sausage"
|
|
339
|
-
size: "large"
|
|
340
|
-
price: 10
|
|
341
|
-
- updateOne:
|
|
342
|
-
filter:
|
|
343
|
-
type: "cheese"
|
|
344
|
-
update:
|
|
345
|
-
$set:
|
|
346
|
-
price: 8
|
|
347
|
-
- deleteOne:
|
|
348
|
-
filter:
|
|
349
|
-
type: "pepperoni"
|
|
350
|
-
- replaceOne:
|
|
351
|
-
filter:
|
|
352
|
-
type: "vegan"
|
|
353
|
-
replacement:
|
|
354
|
-
type: "tofu"
|
|
355
|
-
size: "small"
|
|
356
|
-
price: 4
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
</EXAMPLES>
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<TITLE>
|
|
2
|
-
MongoDBDeleteMany
|
|
3
|
-
</TITLE>
|
|
4
|
-
|
|
5
|
-
<DESCRIPTION>
|
|
6
|
-
|
|
7
|
-
The `MongoDBDeleteMany` request deletes multiple documents in the collection specified in the connectionId. It requires a filter, which is written in the query syntax, to select a documents to delete.
|
|
8
|
-
|
|
9
|
-
### Properties
|
|
10
|
-
|
|
11
|
-
- `filter: object`: __Required__ - The filter used to select the document to update.
|
|
12
|
-
- `options: object`: Optional settings. See the [driver documentation](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#deletemany) for more information. Supported settings are:
|
|
13
|
-
- `authdb: string`: Specifies the authentication information to be used.
|
|
14
|
-
- `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
|
|
15
|
-
- `checkKeys: boolean`: Default: `false` - If true, will throw if bson documents start with $ or include a . in any key value.
|
|
16
|
-
- `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
|
|
17
|
-
- `comment: string`: A user-provided comment to attach to this command.
|
|
18
|
-
- `dbName: string`: The database name.
|
|
19
|
-
- `explain: boolean`: Specifies the verbosity mode for the explain output.
|
|
20
|
-
- `fullResponse: boolean`: Return the full server response for the command.
|
|
21
|
-
- `hint: string | object`: An optional hint for query optimization.
|
|
22
|
-
- `ignoreUndefined: boolean`: Default: `false` - Specify if the BSON serializer should ignore undefined fields.
|
|
23
|
-
- `let: object`: Map of parameter names and values that can be accessed using `$$var` (requires MongoDB 5.0).
|
|
24
|
-
- `maxTimeMS: number`: Specifies a cumulative time limit in milliseconds for processing operations on the cursor.
|
|
25
|
-
- `noResponse: boolean`: Admin command option.
|
|
26
|
-
- `ordered: boolean`: If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.
|
|
27
|
-
- `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
|
|
28
|
-
- `readPreference: string | object`: The read preference.
|
|
29
|
-
- `retryWrites: boolean`: Should retry failed writes.
|
|
30
|
-
- `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
|
|
31
|
-
- `willRetryWrites: boolean`: Option whether to retry writes.
|
|
32
|
-
- `writeConcern: object`: An object that expresses the write concern.
|
|
33
|
-
|
|
34
|
-
</DESCRIPTION>
|
|
35
|
-
|
|
36
|
-
<CONNECTION>
|
|
37
|
-
MongoDBCollection
|
|
38
|
-
</CONNECTION>
|
|
39
|
-
|
|
40
|
-
<SCHEMA>
|
|
41
|
-
|
|
42
|
-
```js
|
|
43
|
-
export default {
|
|
44
|
-
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
45
|
-
title: 'Lowdefy Request Schema - MongoDBDeleteMany',
|
|
46
|
-
type: 'object',
|
|
47
|
-
required: ['filter'],
|
|
48
|
-
properties: {
|
|
49
|
-
filter: {
|
|
50
|
-
type: 'object',
|
|
51
|
-
description: 'The filter used to select the document to update.',
|
|
52
|
-
errorMessage: {
|
|
53
|
-
type: 'MongoDBDeleteMany request property "filter" should be an object.',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
options: {
|
|
57
|
-
type: 'object',
|
|
58
|
-
description: 'Optional settings.',
|
|
59
|
-
errorMessage: {
|
|
60
|
-
type: 'MongoDBDeleteMany request property "options" should be an object.',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
errorMessage: {
|
|
65
|
-
type: 'MongoDBDeleteMany request properties should be an object.',
|
|
66
|
-
required: 'MongoDBDeleteMany request should have required property "filter".',
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
</SCHEMA>
|
|
72
|
-
|
|
73
|
-
<EXAMPLES>
|
|
74
|
-
|
|
75
|
-
### Delete all documents older than a specific date
|
|
76
|
-
|
|
77
|
-
```yaml
|
|
78
|
-
requests:
|
|
79
|
-
- id: delete_old_documents
|
|
80
|
-
type: MongoDBDeleteMany
|
|
81
|
-
connectionId: my_mongodb_collection_id
|
|
82
|
-
properties:
|
|
83
|
-
filter:
|
|
84
|
-
created_date:
|
|
85
|
-
$lt:
|
|
86
|
-
_date: 2020-01-01
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
</EXAMPLES>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<TITLE>
|
|
2
|
-
MongoDBDeleteOne
|
|
3
|
-
</TITLE>
|
|
4
|
-
|
|
5
|
-
<DESCRIPTION>
|
|
6
|
-
|
|
7
|
-
The `MongoDBDeleteOne` request deletes a single document in the collection specified in the connectionId. It requires a filter, which is written in the query syntax, to select a document to delete. It will delete the first document that matches the filter.
|
|
8
|
-
> MongoDBDeleteOne response differs when the connection has a log collection. When a log collection is set on the connection, a findOneAndDelete operation is performed compared to the standard deleteOne operation.
|
|
9
|
-
|
|
10
|
-
### Properties
|
|
11
|
-
|
|
12
|
-
- `filter: object`: __Required__ - The filter used to select the document to update.
|
|
13
|
-
- `options: object`: Optional settings. See the [driver documentation](https://mongodb.github.io/node-mongodb-native/4.0/classes/collection.html#deleteone) for more information. Supported settings are:
|
|
14
|
-
- `authdb: string`: Specifies the authentication information to be used.
|
|
15
|
-
- `bsonRegExp: boolean`: Return the BSON regular expressions as BSONRegExp instances.
|
|
16
|
-
- `checkKeys: boolean`: Default: `false` - If true, will throw if bson documents start with $ or include a . in any key value.
|
|
17
|
-
- `collation: object`: Specify collation (MongoDB 3.4 or higher) settings for update operation.
|
|
18
|
-
- `comment: string`: A user-provided comment to attach to this command.
|
|
19
|
-
- `dbName: string`: The database name.
|
|
20
|
-
- `explain: boolean`: Specifies the verbosity mode for the explain output.
|
|
21
|
-
- `fullResponse: boolean`: Return the full server response for the command.
|
|
22
|
-
- `hint: string | object`: An optional hint for query optimization.
|
|
23
|
-
- `ignoreUndefined: boolean`: Default: `false` - Specify if the BSON serializer should ignore undefined fields.
|
|
24
|
-
- `let: object`: Map of parameter names and values that can be accessed using `$$var` (requires MongoDB 5.0).
|
|
25
|
-
- `maxTimeMS: number`: Specifies a cumulative time limit in milliseconds for processing operations on the cursor.
|
|
26
|
-
- `noResponse: boolean`: Admin command option.
|
|
27
|
-
- `ordered: boolean`: If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails.
|
|
28
|
-
- `readConcern: object`: Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported).
|
|
29
|
-
- `readPreference: string | object`: The read preference.
|
|
30
|
-
- `retryWrites: boolean`: Should retry failed writes.
|
|
31
|
-
- `serializeFunctions: boolean`: Default: `false` - Serialize the javascript functions.
|
|
32
|
-
- `willRetryWrites: boolean`: Option whether to retry writes.
|
|
33
|
-
- `writeConcern: object`: An object that expresses the write concern.
|
|
34
|
-
|
|
35
|
-
</DESCRIPTION>
|
|
36
|
-
|
|
37
|
-
<CONNECTION>
|
|
38
|
-
MongoDBCollection
|
|
39
|
-
</CONNECTION>
|
|
40
|
-
|
|
41
|
-
<SCHEMA>
|
|
42
|
-
|
|
43
|
-
```js
|
|
44
|
-
export default {
|
|
45
|
-
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
46
|
-
title: 'Lowdefy Request Schema - MongoDBDeleteOne',
|
|
47
|
-
type: 'object',
|
|
48
|
-
required: ['filter'],
|
|
49
|
-
properties: {
|
|
50
|
-
filter: {
|
|
51
|
-
type: 'object',
|
|
52
|
-
description: 'The filter used to select the document to update.',
|
|
53
|
-
errorMessage: {
|
|
54
|
-
type: 'MongoDBDeleteOne request property "filter" should be an object.',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
options: {
|
|
58
|
-
type: 'object',
|
|
59
|
-
description: 'Optional settings.',
|
|
60
|
-
errorMessage: {
|
|
61
|
-
type: 'MongoDBDeleteOne request property "options" should be an object.',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
errorMessage: {
|
|
66
|
-
type: 'MongoDBDeleteOne request properties should be an object.',
|
|
67
|
-
required: 'MongoDBDeleteOne request should have required property "filter".',
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
</SCHEMA>
|
|
73
|
-
|
|
74
|
-
<EXAMPLES>
|
|
75
|
-
|
|
76
|
-
### Delete a document by _id
|
|
77
|
-
|
|
78
|
-
```yaml
|
|
79
|
-
requests:
|
|
80
|
-
- id: delete_selected_document
|
|
81
|
-
type: MongoDBDeleteOne
|
|
82
|
-
connectionId: my_mongodb_collection_id
|
|
83
|
-
payload:
|
|
84
|
-
selected_id
|
|
85
|
-
_state: selected_id
|
|
86
|
-
properties:
|
|
87
|
-
filter:
|
|
88
|
-
_id:
|
|
89
|
-
_payload: selected_id
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
</EXAMPLES>
|