-
Notifications
You must be signed in to change notification settings - Fork 243
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
[Cosmos] Query Databases, Query Containers, and expand ContainerProperties to include all relevant properties #1843
Conversation
There was a problem hiding this 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.
sdk/cosmos/azure_data_cosmos/src/models/container_properties.rs
Outdated
Show resolved
Hide resolved
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. |
There was a problem hiding this 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.
sdk/cosmos/azure_data_cosmos/src/models/container_properties.rs
Outdated
Show resolved
Hide resolved
671514e
to
6a45bed
Compare
This PR adds the following new APIs:
CosmosClient::query_databases
to query across the databases in an accountDatabaseClient::query_containers
to query across the containers in an accountTo do this, I was able to make a common
send_query_request
to our internalCosmosPipeline
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 ouroptions
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 theunused_variables
lint (see Playground). Annoying, but appears to be by-design, though I may follow up on the rust-lang users discourse board.