这里的一切手都举起 同样的物体—— 连接连接的系统 关键在于:你的代码读数据库的方式 和我们主机或你连接它的方式相同。
三个家庭
| 家庭家庭家庭家庭家庭家庭家庭 | 编 造 人 制 | 持有 |
|---|---|---|
| IaGenify 云云 | (创建{ 服务} ) | ASQL 基数, a SQL 基地或物体储存。 |
| 已连接 | 连接( { 类型、 提供者、 终点 } | 自己的数据库或桶,通过我们读。 |
| 设备 | 排 SDK,或设备() | 一台电脑或一部电话——它的文件一直放在电脑上。 |
电脑在 SDK 电话不能登记,不能登记。 SDK 上面没有写,所以 设备( ) 同一案件存在。
方法
| 方法 | 功能 |
|---|---|
| 创建({ 服务、 标签 }) | 打开 IaGenify 云层储存 没有证书可以提供 |
| 连接({ 标签、 类型、 提供者、 终点 } | 登记你们中的一个 |
| 设备( { 设备ID, 名称, 用户Agents} ) | 登记电话 |
| ({ id} ) | 一次存储,或默认默认,没有争论。 |
| list() | 所有人,最新的先。 |
| 删除( id) | 断开或删除一个。 |
看起来像什么
// Ours — nothing to configure
const base = await api.storage.create({ service: "nosql", label: "App data" });
// Yours — put the URI in credentials, which is encrypted
const mongo = await api.storage.connect({
label: "Prod", type: "database", provider: "mongodb",
endpoint: { credentials: { uri: "mongodb+srv://…/mydb" } },
});
// Read either one the same way
await base.run({ action: "collections" });
await mongo.run({ action: "find", collection: "users", filter: {}, options: { limit: 20 } });# Ours — nothing to configure
base = api.storage.create(service="nosql", label="App data")
# Yours — put the URI in credentials, which is encrypted
mongo = api.storage.connect(
label="Prod", type="database", provider="mongodb",
endpoint={"credentials": {"uri": "mongodb+srv://…/mydb"}},
)
# Read either one the same way
base.run(action="collections")
mongo.run(action="find", collection="users", filter={}, options={"limit": 20})全权证书附全权证书
将连接 URI 内 endpoint.credentials存储器不会把端点交回——服务器用它连接,而你提供它。
默认默认
每个账户都是用自己的对象存储创建的,而每个账户都带有默认的旗帜,所以一个没有目标的储蓄有地方可以去。 完全一个活动存储账户携带它;删除一个和国旗是交给另一个而不是留下一个。
仓库不是在某个代理商工作的地方
代理于设备上工作 给它
机器是默认存储的单独选择。 代理读取它打开的磁盘; 连接存储是它查询的东西, 而不是它住在哪里 。