You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#1809 will add querying for Cosmos Items. We need to add the ability to create/update/delete items. The API would be something like this, based on the Go SDK:
pubtraitContainerClientMethods{// ... other methods ...// Will fail if an item with the same ID already exists (POST with Upsert header false)fncreate_item(&self,partition_key:implInto<PartitionKey>,item:implSerialize,options:Option<CreateItemOptions>);// Will replace an item with the same ID if one exists (POST with Upsert header true)fnupsert_item(&self,partition_key:implInto<PartitionKey>,item:implSerialize,options:Option<UpsertItemOptions>);// Will fail if an item with the same ID does NOT exist (PUT)fnreplace_item(&self,partition_key:implInto<PartitionKey>,item:implSerialize,options:Option<ReplaceItemOptions>);// Will fail if an item with the specified ID does not exist (DELETE)fndelete_item(&self,partition_key:implInto<PartitionKey>,item_id:implInto<String>,options:Option<DeleteItemOptions>);}
Notable exclusions: PATCHing documents (requires modelling the patch operations and will be handled separately)
Open Questions:
Does each operation need it's own options? The Go SDK uses a single shared ItemOptions. We can do the same, but if we ever need operation-specific options, it's a breaking change. I'll check if the other SDKs generally accept that risk and use a shared options type. If they do, I think we can here as well.
The text was updated successfully, but these errors were encountered:
#1809 will add querying for Cosmos Items. We need to add the ability to create/update/delete items. The API would be something like this, based on the Go SDK:
Notable exclusions: PATCHing documents (requires modelling the patch operations and will be handled separately)
Open Questions:
ItemOptions
. We can do the same, but if we ever need operation-specific options, it's a breaking change. I'll check if the other SDKs generally accept that risk and use a shared options type. If they do, I think we can here as well.The text was updated successfully, but these errors were encountered: