Documentation for version v73
Store Get
Description
Store Get the pipe takes data from mongodb for a given key and writes it to $in.<name/>.
Stucture
| Field | Type of value | Example | Required | Description |
|---|---|---|---|---|
| id | number | 10 | yes | Pipe's ID |
| type | string | "store_get" | yes | Type of a pipe |
| params | StoreGetParamsObject | no | Type-specific parameters | |
| outs | OutsObject | no | Pipe's outputs |
| StoreGetParamsObject | |||||
|---|---|---|---|---|---|
| Field | Type | Example | Reqiered | Default | Description |
| key | string | "key_name" | yes | - | Key name |
| name | string | "name" | no | <key> | Name of the field where value will be written
|
| delete | bool | true | no | false | Flag for deleting a record immediately after it is read. |
| table | string | "some" | no | "" | The name of the virtual collection into which the key-value pair will be written. From an implementation point of view, it’s just a tag. Therefore, it does not require any additional database configuration. |
| not_found | number | 12 | no | - | ID of the pipe to which the event will go if a record for the given key is not found. |
Errors
Error processing params.key and params.table - the template is incorrect or the field was not found.
Error when querying the database, except Not found, if params.not_found is specified
Example
{
"id": 2,
"type": "store_get",
"params": {
"key": "session_id",
"not_found": 3
},
"outs": {
"success": 28,
"error": 14
}
}