Skip to content

Insert

Insert one or many primitive or container objects

Prefix: insert

Value: Vector of object

Can start the pipeline: Yes

Steps before: -

Steps after: -

Example

Input:

collection|test|:insert[
    s|foo|,
    n|100|,
    b|true|,
    v[
        n|1|,
        n|2|,
        n|3|,
    ],
    m{
        s|bar|:s|baz|,
    },
];

Output:

result:ok[
    response{
        s|data|:ids[
            test|fdb48035-d16d-4616-8ee2-aad704e94740|,
            test|30e74bba-d6ca-4a49-a06c-55755cba54ee|,
            test|fd00b0a5-3d77-46b7-adeb-f7d6ee510863|,
            test|da616bf9-edd2-45aa-91fb-46cf39bb28c2|,
            test|854b8d89-ca2a-4adf-9125-f761f638fcd7|,
        ],
        s|meta|:insert_meta{
            s|count|:n|5|,
        },
    },
];