提供商

蒙戈DB

api.storage.connect({ type: "database", provider: "mongodb", endpoint })

自己的文档数据库。 9 个读取动作, 4 个写动作, 以及您已有的收藏 - 没有任何被重新命名, 也没有被迁移 。

type: database9 reads · 4 writesconnection pooled
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

这是最富有的连通提供者, 代理工具是围绕这个工具形成的: 一个它从未见过的数据库 可以在没有宣布任何计划的情况下 被映射、查询和写成。

连接连接中

const db = await api.storage.connect({
  label: "Production",
  type: "database",
  provider: "mongodb",
  endpoint: { credentials: { uri: "mongodb+srv://user:password@cluster.example.net/shop" } },
});
db = api.storage.connect(
    label="Production",
    type="database",
    provider="mongodb",
    endpoint={"credentials": {"uri": "mongodb+srv://user:password@cluster.example.net/shop"}},
)
credentials.uristring必填

连接字符串。它带有密码,所以属于 credentials,它是加密的休息。

数据库名称是 URI

…/shop 选择数据库。 A URI 默认的“我的收藏”通常没有“我的收藏”,

接受什么运行() 接受

操作读写需要收藏
概览概览读为无 无
收藏藏藏读为无 无
化学读为否 是
查找查找查找查找查找读为否 是
数数读为否 是
合计合计读为否 是
搜索搜索读为无 无
插入插入写写否 是
更新更新更新写写否 是
删除删除删除写写否 是
保存保存写写否 是
创建集合写写否 是
浮点数写写否 是

任何其它的调 Action MongoDB inconnue. tables, execute, list, object 和 upload 属于其他提供者。

id 可能是字符串

以 24 字符串 书写的身份识别符, 将转换成 对象 , 不论在哪里 : 直接对等 , $in, $nin 和 $ne。 JSON - 出 find,以一个形式, 回到一个 update - 中间没有你的演员

const [order] = await db.run({ action: "find", collection: "orders", options: { limit: 1 } });

// order._id arrived as a string; it goes back as one
await db.run({
  action: "update",
  collection: "orders",
  filter: { _id: order._id },
  update: { $set: { status: "shipped" } },
});
order = db.run(action="find", collection="orders", options={"limit": 1})[0]

# order["_id"] arrived as a string; it goes back as one
db.run(
    action="update",
    collection="orders",
    filter={"_id": order["_id"]},
    update={"$set": {"status": "shipped"}},
)

五个操作员被拒绝

$where, $function 和 $accumulator 运行中 JavaScript 数据库内部; $out 和 $merge 写作,但您所看的不在此处。 全部五人被拒绝 find, count, update, delete 和 aggregate,通过检查过滤器或你发送的管道。

await db.run({ action: "find", collection: "users", filter: { $where: "this.age > 30" } });
// Error: find : l'operateur $where n'est pas autorise.
db.run(action="find", collection="users", filter={"$where": "this.age > 30"})
# IaGenifyError: find : l'operateur $where n'est pas autorise.

强制实施的伤口

事 事 事限制
aggregate 结果结果结果结果结果结果500份文件
aggregate 和 count 寿命期限30秒30秒
insert 批批批次1至500份文件
overview30个藏书、25个字段、每个样本1个样本
schema20个最近文件,150个领域

写入时拒绝打开空过滤器

全部: 说真的,你的意思是

更新并删除时没有过滤器会触动每个文档, 所以它们会停止, 除非您添加全部 : 正确 。 读者没有这样的保护 。 查找上的空过滤器是一个普通查询 。

保留连接

每1个客户1个客户 URI 持有并重新使用电话,所以第二个 run() 不再连接。 A URI 更改是一个新的连接, 即旋转密码, 新的主机, 但它不会继承旧的连接 。

系统收藏被过滤出

collections 和 overview 任何外漏在 system. 名称空间。 你看到的是您放在那里的东西。