# storage.write

Canonical URL: https://developers.iagenify.com/zh/sdk/workflows/steps/storage-write/
Language: zh

`type: "storage.write"`

更改连接的数据库或桶。 八次动作, 每个动作都要求它做什么, 空过滤器两次被拒绝 。

Status: storage required · 8 actions · empty filter needs all

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `storage` | string | 必填 | 储藏室 |
| `action` | string | 必填 | `insert` · `update` · `delete` · `sql` · `put` · `remove` · `createCollection` · `dropCollection`. |
| `collection` | string |  | 5项文件行动要求采取的行动。 |
| `sql` | string |  | 需要 `sql`. |
| `key` | string |  | 需要 `put` 和 `remove`. |
| `all` | boolean |  | 确认使用空过滤器的更改 。 |

```javascript
{ id: "file", type: "storage.write", config: {
    storage: "…", action: "insert", collection: "tickets",
    documents: [{ text: "{{input.text}}", at: "{{input.receivedAt}}" }] } }
```

## 拒绝一个空过滤器 - 两次 {#guard}

> **保存时保存一次,运行时保存一次**
>
> 保存的过滤器如书写的那样空空, 保存时会抓取过滤器 。 但是 {} @ {}steps.find.output.id」 。 校對:Soup

## 输出 {#output}

```javascript
{{steps.file.output.result}}
{{steps.file.output.action}}
{{steps.file.output.storage}}
```

## 没有撤消 {#no-undo}

也无需批准, 这笔钱留在帐户内。 [重试](/zh/sdk/ref/workflow-run/retry) 重试写作链之前, 需要思考。

- [storage.query](/zh/sdk/workflows/steps/storage-query): 先看书
- [write_storage](/zh/sdk/agent/tools/write-storage): 探员的版本
- [工作流步骤](/zh/sdk/workflows/steps): 全部 23 种类型。

```python
{"id": "file", "type": "storage.write", "config": {
    "storage": "…", "action": "insert", "collection": "tickets",
    "documents": [{"text": "{{input.text}}", "at": "{{input.receivedAt}}"}]}}
```

```python
"{{steps.file.output.result}}"
"{{steps.file.output.action}}"
"{{steps.file.output.storage}}"
```
