gpt4 book ai didi

azure - 如何将 Azure Cosmos DB 与双 API(SQL 和 Mongo)连接

转载 作者:行者123 更新时间:2023-12-02 07:39:25 25 4
gpt4 key购买 nike

我是 Azure Cosmos DB 新手。我已使用 SQL API 创建了 Azure Cosmos DB,并加载了数据并使用了 SQL 查询。现在我想访问同一个数据库的Mongo API。是否可以?

在网上搜索时,我发现了令人困惑的答案。

Connecting The Same Cosmos DB Database Using SQL API And Mongo API From A Blazor App

The extensible APIs that you can use include .NET, .NET Core, Node.js, Java, Python, and MongoDB. If you’re using .NET, you can use DocumentDB API, MongoDB API, Graph API, or Table API. Java and Node.js will only work with the Document DB APIs, MongoDB APIs, and Graph APIs. Python will only work with the DocumentDB API, and Gremlin, only the Graph API.

我知道只要我使用.NET,就可以使用 SQL API 和 Mongo API 访问同一个数据库

我说得对吗?

如果是,请告诉我程序。

最佳答案

I understand that the same DB can be accessed with SQL API and Mongo API, as long as I use .NET

Am I right?

没有。虽然技术上可能可行,但不支持使用多个 API。您必须坚持创建数据库时选择的数据库。

唯一的异常(exception)是 Gremlin 和 SQL API。 https://learn.microsoft.com/en-us/azure/cosmos-db/faq#can-i-use-multiple-apis-to-access-my-data

关于azure - 如何将 Azure Cosmos DB 与双 API(SQL 和 Mongo)连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60057155/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com