Store Get
Store Get is a Pipe for reading data from storage (MongoDB) by a given key. The result is written to $in.<name>. It supports branching in case the record is not found.
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | — | Key for lookup. Supports templating |
name | string | No | value of key | Field name in $in where the result will be written ($in.<name>) |
delete | bool | No | false | If true — the record is deleted immediately after reading |
table | string | No | "" | Virtual collection name (tag) |
not_found | number | No | — | Pipe id to which the event will transition if the record is not found |
Possible Errors
- Error processing the template in
params.keyorparams.table - Database query error (except "Not found", if
params.not_foundis specified)
Example
{
"id": 2,
"type": "store_get",
"params": {
"key": "session_id",
"not_found": 3
},
"outs": {
"success": 28,
"error": 14
}
}