# 收藏藏藏

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/connected-storage/run/collections/
Language: zh

`storage.run({ action: "collections" })`

每个文件数据库中的每个收藏,每个保存多少文件。

Status: document database · free · no collection needed

与数据库而不是收集工作有关的两个行动之一——因此没有 `collection` 和 。另一个是 [概览概览](/zh/sdk/ref/connected-storage/run/overview).

```javascript
await storage.run({ action: "collections" });
// [{ name: "users", count: 1204 }, { name: "orders", count: 88311 }]
```

## 计数是估计数 {#counts}

> **从元数据阅读,而不是通过文件走过**
>
> 精确地计算一个大型收藏就是读取它。 对于一个您要采取行动的数字, 使用过滤器来计算; 对于“ 这个大小多少 ” , 估计是您想要的, 并且它是免费的 。

## 系统收藏被遗漏 {#system}

内部收藏被过滤, 所以返回的东西就是您放在那里的东西。 您创建的无法看到这里的收藏是一个符号, 您连接到不同的数据库, 可以看到 URI 路径路径 [连接()](/zh/sdk/ref/storage/connect).

```javascript
const collections = await storage.run({ action: "collections" });

if (!collections.length) {
  // Either it is empty, or the connection landed on the wrong database.
  // The database is read from the path of the URI: …/mydb
}
```

- [化学](/zh/sdk/ref/connected-storage/run/schema): 冠军冠军 冠军冠军
- [run()](/zh/sdk/ref/connected-storage/run): 行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动,行动

```python
storage.run(action="collections")
# [{"name": "users", "count": 1204}, {"name": "orders", "count": 88311}]
```

```python
collections = storage.run(action="collections")

if not collections:
    # Either it is empty, or the connection landed on the wrong database.
    # The database is read from the path of the URI: …/mydb
    pass
```
