Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cosmos] Query Databases, Query Containers, and expand ContainerProperties to include all relevant properties #1843

Conversation

analogrelay
Copy link
Member

This PR adds the following new APIs:

  • CosmosClient::query_databases to query across the databases in an account
  • DatabaseClient::query_containers to query across the containers in an account

To do this, I was able to make a common send_query_request to our internal CosmosPipeline wrapper, which makes the individual query APIs fairly compact.

In addition, I added missing properties to ContainerProperties, based on the Go SDK. I also added Vector Indexing properties, which aren't currently in the Go SDK.

I took another attempt at removing the #[allow(unused_variables)] from our options parameters. As far as I can tell, there is no escaping it. If an impl is in the same crate as the trait it's implementing, the fact that the trait requires a parameter is not sufficient to suppress the unused_variables lint (see Playground). Annoying, but appears to be by-design, though I may follow up on the rust-lang users discourse board.

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few thoughts, but I see nothing blocking.

@analogrelay
Copy link
Member Author

Added vector embedding stuff. While I don't need a reapproval, I wouldn't mind a quick second look @Pilchie . I'll probably just merge this in later today though, and we can always do a little tidy up afterwards if I missed something. I've verified the vector embedding deserialization against a test account.

Copy link
Member

@Pilchie Pilchie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except the note about the fact that we're changing the size of the dimensions property to be 32 bit.

@analogrelay analogrelay force-pushed the ashleyst/cosmos-other-db-container-apis branch from 671514e to 6a45bed Compare October 14, 2024 20:01
@analogrelay analogrelay merged commit 002dbb3 into Azure:feature/track2 Oct 14, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants