This page explains the MongoDB Adapter in Bridge context. If you were looking for the same information regarding the PAS Designer, refer to MongoDB Adapter in the Designer guide.
Tagged Values
<<MongoDBAlias>>
The settings on the <<MongoDBAlias>> are used to build the MongoDB connection string and to set database connection options. Each alias will create a separate connection pool. For each request, the xUML Runtime will use one connection from this pool for the entire request duration.
To use the MongoDB adapter it is helpful if you are familiar with the MongoDB options. Each listed tagged value is setting the MongoDB option having the same name.
Please refer to the MongoDB manual for more information on each option.
There were errors rendering macro:
-
An unknown error occurred.
<<MongoDBAdapter>>
|
Tagged Value |
Description |
Allowed Values |
|
|---|---|---|---|
|
Alias
|
Specify the MongoDB alias resp. the database the adapter should connect to. |
a valid MongoDB alias
|
|
|
Database
|
Overwrite the database given in the alias. |
|
|
|
Collection
|
Overwrite the collection given in the alias. |
|
|
|
Action
|
Holds the action to perform on the database. |
insert |
Insert a new document. |
|
find |
Find a document. |
||
|
aggregate |
Execute an aggregation operation. |
||
|
fetch |
Fetch the next document from a result set. |
||
|
update |
Update a document. |
||
|
replace |
Replace a document. |
||
|
delete |
Delete a document. |
||
MongoDB Adapter Parameters
Action "find"
There were errors rendering macro:
-
An unknown error occurred.
Action "fetch"
There were errors rendering macro:
-
An unknown error occurred.
Action "aggregate"
|
Name |
Type |
Direction |
Description |
|
|---|---|---|---|---|
|
database |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
|
collection |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
|
pipeline |
Array of String |
in |
Pipeline you want to use with aggregation.
|
|
|
handle |
out |
Handle to a result set. You can use fetch to get documents from this result set. |
||
|
result |
Array of String |
Array of all resulting documents in JSON format. |
out |
Result set as an array. Depending on the array element specified on this parameter, the resulting documents are either presented in extended JSON format (String), or serialized into xUML model structures (<document class>). |
|
Array of <document class> |
Array of objects of an xUML class representing the document structure. |
|||
Action "insert"
|
Name |
Type |
Direction |
Description |
|---|---|---|---|
|
database |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
collection |
String |
in |
Error rendering macro 'multiexcerpt-include' : Page loading failed
|
|
document |
<document class> |
in |
A data structure representing the document you want to insert. The data structure will be serialized. |
|
documents |
Array of <document class> |
in |
Array of documents you want to insert. Each array element is treated as a single document parameter and all of them will be inserted. |
Action "update"
There were errors rendering macro:
-
An unknown error occurred.
Action "replace"
Error rendering macro 'multiexcerpt' : Page loading failed
Action "delete"
Error rendering macro 'multiexcerpt' : Page loading failed
MongoDB Adapter Parameter Types
MongoDBFindOptions
|
Attribute |
Type |
Description |
Allowed Values / Examples |
|---|---|---|---|
|
limit |
Integer |
Limits the number of returned documents. |
any integer between -231 and 231 |
|
skip |
Integer |
Specifies the number of documents to skip in the result set (counted from the beginning). |
any positive integer |
|
projection |
String |
An aggregation document that projects the results accordingly. It defines the final shape of the returned documents. |
valid JSON |
|
sort |
String |
A sort document. |
valid JSON |
MongoDBHandle
|
Attribute |
Type |
Description |
|---|---|---|
|
id |
Integer |
ID of the MongoDB handle. |
MongoDBReplaceOptions
|
Attribute |
Type |
Description |
Allowed Values / Examples |
|
|---|---|---|---|---|
|
upsert |
Boolean |
Specifies if the document should be inserted if no document matches the query. |
true |
Insert document. |
|
false |
Do nothing. |
|||
MongoDBUpdateOptions
|
Attribute |
Type |
Description |
Allowed Values / Examples |
|
|---|---|---|---|---|
|
upsert |
Boolean |
Specifies if the document should be inserted if no document matches the query |
true |
Insert document. |
|
false |
Do nothing. |
|||
|
arrayFilters |
Array of String |
Sets conditions for the filtered positional operators during the update. |
array of filter document as valid JSON strings |
|