Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/tables/azure-data-tables/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 12.0.0b7 (Unreleased)
## 12.0.0b7 (2021-05-11)
**Breaking**
* The `account_url` parameter in the client constructors has been renamed to `endpoint`.
* The `TableEntity` object now acts exclusively like a dictionary, and no longer supports key access via attributes.
Expand Down
3 changes: 2 additions & 1 deletion sdk/tables/azure-data-tables/azure/data/tables/_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class TableTransactionError(HttpResponseError):
Defaults to 0 in the case where an index was not provided, or the error applies across operations.
:ivar ~azure.data.tables.TableErrorCode error_code: The error code.
:ivar str message: The error message.
:ivar Mapping[str, Any] additional_info: Any additional data for the error.
:ivar additional_info: Any additional data for the error.
:vartype additional_info: Mapping[str, Any]
"""

def __init__(self, **kwargs):
Expand Down
10 changes: 5 additions & 5 deletions sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def create(
"""Adds an insert operation to the current batch.

:param entity: The properties for the table entity.
:type entity: TableEntity or dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:return: None
:rtype: None
:raises ValueError:
Expand Down Expand Up @@ -216,9 +216,9 @@ def update(
"""Adds an update operation to the current batch.

:param entity: The properties for the table entity.
:type entity: TableEntity or dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:keyword str etag: Etag of the entity
:keyword match_condition: MatchCondition
:paramtype match_condition: ~azure.core.MatchCondition
Expand Down Expand Up @@ -652,9 +652,9 @@ def upsert(
"""Adds an upsert (update/merge) operation to the batch.

:param entity: The properties for the table entity.
:type entity: TableEntity or dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:raises ValueError:

.. admonition:: Example:
Expand Down
19 changes: 10 additions & 9 deletions sdk/tables/azure-data-tables/azure/data/tables/_table_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def delete_table(
):
# type: (...) -> None
"""Deletes the table under the current account. No error will be raised
if the table does not exist
if the table does not exist

:return: None
:rtype: None
Expand Down Expand Up @@ -288,7 +288,7 @@ def delete_entity(self, entity, **kwargs):
def delete_entity(self, *args, **kwargs):
# type: (Union[TableEntity, str], Any) -> None
"""Deletes the specified entity in a table. No error will be raised if
the entity or PartitionKey-RowKey pairing is not found.
the entity or PartitionKey-RowKey pairing is not found.

:param partition_key: The partition key of the entity.
:type partition_key: str
Expand Down Expand Up @@ -365,7 +365,7 @@ def create_entity(
"""Insert entity in a table.

:param entity: The properties for the table entity.
:type entity: ~azure.data.tables.TableEntity or Dict[str,str]
:type entity: Dict[str,str] or :class:`~azure.data.tables.TableEntity`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Dict[str, Any]?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see we're using Dict[str,str] in a number of places for entity.
So we can probably leave it for this release and address it as part of the mypy fixes for GA.

:return: Dictionary mapping operation metadata returned from the service
:rtype: Dict[str,str]
:raises: :class:`~azure.core.exceptions.HttpResponseError`
Expand Down Expand Up @@ -405,9 +405,9 @@ def update_entity(
"""Update entity in a table.

:param entity: The properties for the table entity.
:type entity: ~azure.data.tables.TableEntity or Dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:keyword str etag: Etag of the entity
:keyword match_condition: MatchCondition
:paramtype match_condition: ~azure.core.MatchCondition
Expand Down Expand Up @@ -523,7 +523,8 @@ def query_entities(
:keyword int results_per_page: Number of entities returned per service request.
:keyword select: Specify desired properties of an entity to return.
:paramtype select: str or List[str]
:keyword Dict[str, Any] parameters: Dictionary for formatting query with additional, user defined parameters
:keyword parameters: Dictionary for formatting query with additional, user defined parameters
:paramtype parameters: Dict[str, Any]
:return: ItemPaged[:class:`~azure.data.tables.TableEntity`]
:rtype: ~azure.core.paging.ItemPaged
:raises: :class:`~azure.core.exceptions.HttpResponseError`
Expand Down Expand Up @@ -612,9 +613,9 @@ def upsert_entity(
"""Update/Merge or Insert entity into table.

:param entity: The properties for the table entity.
:type entity: ~azure.data.tables.TableEntity or Dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:return: Dictionary mapping operation metadata returned from the service
:rtype: Dict[str,str]
:raises: :class:`~azure.core.exceptions.HttpResponseError`
Expand Down Expand Up @@ -679,7 +680,7 @@ def submit_transaction(
:type operations: Iterable[Tuple[str, EntityType]]
:return: A list of mappings with response metadata for each operation in the transaction.
:rtype: List[Mapping[str, Any]]
:raises ~azure.data.tables.TableTransactionError:
:raises: :class:`~azure.data.tables.TableTransactionError`

.. admonition:: Example:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def list_tables(self, **kwargs):
# type: (Any) -> ItemPaged[TableItem]
"""Queries tables under the given account.

:keyword int results_per_page: Number of tables per page in return ItemPaged
:keyword int results_per_page: Number of tables per page in returned ItemPaged
:return: ItemPaged[:class:`~azure.data.tables.TableItem`]
:rtype: ~azure.core.paging.ItemPaged
:raises: :class:`~azure.core.exceptions.HttpResponseError`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def create(
"""Insert entity in a table.

:param entity: The properties for the table entity.
:type entity: TableEntity or dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:return: None
:rtype: None
:raises ValueError:
Expand Down Expand Up @@ -192,9 +192,9 @@ def update(
"""Adds an update operation to the current batch.

:param entity: The properties for the table entity.
:type entity: TableEntity or Dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:keyword str etag: Etag of the entity
:keyword match_condition: MatchCondition
:paramtype match_condition: ~azure.core.MatchCondition
Expand Down Expand Up @@ -616,9 +616,9 @@ def upsert(
"""Update/Merge or Insert entity into table.

:param entity: The properties for the table entity.
:type entity: TableEntity or dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:return: None
:rtype: None
:raises ValueError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ async def create_table(self, **kwargs) -> None:
@distributed_trace_async
async def delete_table(self, **kwargs) -> None:
"""Deletes the table under the current account. No error will be raised if
the given table name is not found.
the given table name is not found.

:return: None
:rtype: None
Expand Down Expand Up @@ -277,7 +277,7 @@ async def delete_entity(self, entity: Union[TableEntity, Mapping[str, Any]], **k
@distributed_trace_async
async def delete_entity(self, *args: Union[TableEntity, str], **kwargs: Any) -> None:
"""Deletes the specified entity in a table. No error will be raised if
the entity or PartitionKey-RowKey pairing is not found.
the entity or PartitionKey-RowKey pairing is not found.

:param partition_key: The partition key of the entity.
:type partition_key: str
Expand Down Expand Up @@ -353,7 +353,7 @@ async def create_entity(
"""Insert entity in a table.

:param entity: The properties for the table entity.
:type entity: ~azure.data.tables.TableEntity or Dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:return: Dictionary mapping operation metadata returned from the service
:rtype: Dict[str,str]
:raises: :class:`~azure.core.exceptions.ResourceExistsError` If the entity already exists
Expand Down Expand Up @@ -393,9 +393,9 @@ async def update_entity(
"""Update entity in a table.

:param entity: The properties for the table entity.
:type entity: dict[str, str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:keyword str etag: Etag of the entity
:keyword match_condition: MatchCondition
:paramtype match_condition: ~azure.core.MatchCondition
Expand Down Expand Up @@ -507,7 +507,8 @@ def query_entities(
:keyword int results_per_page: Number of entities returned per service request.
:keyword select: Specify desired properties of an entity to return.
:paramtype select: str or List[str]
:keyword Dict[str, Any] parameters: Dictionary for formatting query with additional, user defined parameters
:keyword parameters: Dictionary for formatting query with additional, user defined parameters
:paramtype parameters: Dict[str, Any]
:return: AsyncItemPaged[:class:`~azure.data.tables.TableEntity`]
:rtype: ~azure.core.async_paging.AsyncItemPaged
:raises: :class:`~azure.core.exceptions.HttpResponseError`
Expand Down Expand Up @@ -594,9 +595,9 @@ async def upsert_entity(
"""Update/Merge or Insert entity into table.

:param entity: The properties for the table entity.
:type entity: TableEntity or dict[str,str]
:type entity: :class:`~azure.data.tables.TableEntity` or Dict[str,str]
:param mode: Merge or Replace entity
:type mode: ~azure.data.tables.UpdateMode
:type mode: :class:`~azure.data.tables.UpdateMode`
:return: Dictionary mapping operation metadata returned from the service
:rtype: Dict[str,str]
:raises: :class:`~azure.core.exceptions.HttpResponseError`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ async def delete_table(self, table_name: str, **kwargs) -> None:
def list_tables(self, **kwargs) -> AsyncItemPaged[TableItem]:
"""Queries tables under the given account.

:keyword int results_per_page: Number of tables per page in return ItemPaged
:keyword int results_per_page: Number of tables per page in returned ItemPaged
:return: AsyncItemPaged[:class:`~azure.data.tables.TableItem`]
:rtype: ~azure.core.async_paging.AsyncItemPaged
:raises: :class:`~azure.core.exceptions.HttpResponseError`
Expand Down