对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

将管道导出为特定语言

您可以使用聚合管道构建器来格式化和导出已完成的管道。您可以将管道导出为所选语言以在应用程序中使用。

您可以将管道导出为以下语言:

  • C#

  • Go

  • Java

  • Node

  • PHP

  • Python

  • Ruby

  • Rust

1

在聚合管道窗格中,点击 Export Data 按钮以打开管道导出卡。

聚合构建器导出按钮
点击放大
2

在卡的右侧,点击 Exported Pipeline(已导出管道)下的下拉菜单,然后选择您所需的编程语言。

The My Pipeline pane on the left of the export card displays your pipeline in mongosh syntax. The Exported Pipeline pane to the right displays your pipeline in the selected programming language.

3

点击 Include Import Statements(包含导入语句)复选框,以包含所选编程语言所需的导入语句。

4

点击 Include Driver Syntax(包含驱动程序语法)复选框以包含所选编程语言的应用程序代码。如果包含驱动程序语法,可复制代码会反映项目排序maxtimems排序规则跳过限制选项。

5

点击管道右上角的 图标,以复制所选编程语言的管道。现在,您可以在应用程序中集成和执行创建的管道。

给本页内容打分